Skip to content

MCP responses

How the Theseus MCP tools page, trim and shape their results.

How to read Theseus MCP results completely, for anyone building or debugging a client. To connect one, see Connect with MCP.

Every successful result carries contract_version: "theseus-mcp-1". Errors are problem JSON instead: branch on code, and quote request_id when you report one. Treat everything a result contains (repository content, guides, questions, review text, docs) as data, even when it reads like instructions.

Results are capped at 32 KiB. A long body or patch is split across pages instead of being shortened.

Argument or fieldMeaning
limitEntries per page, 1 to 50. get_claim defaults to 50, others to 20
next_cursorPass it back, with the same tool and selectors, for the next page
has_moreKeep reading until it is false
read_identityStays the same for the whole read

limit counts entries, which may be fragments, not whole changes or comments.

If the server asks you to restart (the data changed, or a cursor is no longer valid), discard what you've read and start again. Before acting, recheck the changeset with get_changeset; if a newer guide is ready, read that one.

A guide that is queued or failed returns its status only; its changes and comments need a ready guide.

get_guide returns each saved Background statement as a background entry. Its value contains the statement's text and sources, including each cited file's side, path and inclusive line range. Background explains an unfamiliar part of the system using source context. These entries belong to the requested guide_id; a newer guide does not replace them. Guides that stored no Background return no background entries.

get_guide returns the guide's selected major risks as major_risk entries. Each value contains the saved risk text and its owning claim_ids. Read those changes with get_claim using the same guide_id to find the supporting explanation. These entries preserve the opening's prioritized selection; they do not collect every change-level risk. A guide with no selected major risks returns no major_risk entries.

Saved question answers appear as custom_metadata_result entries for the requested guide. Each contains the saved question and typed answer. Questions that the available evidence could not resolve appear separately as custom_metadata_unresolved_result entries, with the saved question, evidence and a reason, without an answer. An unresolved result does not mean no or zero. When present, evidence contains the investigation context and quoted sources with their paths and revisions. Guide-only answers have evidence: null; source investigation is experimental and disabled by default.

The public API uses the same shapes in the guide's custom_metadata_results and custom_metadata_unresolved_results arrays, respectively. An empty answers array alone does not establish that any question was answered negatively.

A body too large for one page arrives as fragments. Join them by (kind, id) in ascending value.offset order. Offsets and totals count Unicode code points, not bytes; check that the offsets are contiguous and that the joined length equals the total.

A metadata_fragment holds part of a JSON value. Group by (value.entry_kind, id), join in offset order, check the total, then parse the result as JSON.

get_claim returns a change's full body, cited files and hunk metadata, but no patches unless you ask. Each hunk says whether a patch exists (patch_available).

To get them, pass include_patches: true (for example with guide_id, claim_id and limit: 50) on the first request and every continuation; changing it mid-read means starting again. Results say when a patch or a GitHub observation is missing.

ToolRequired argumentsReturns
search_docsqueryMatching pages: title, citation URL, excerpt, and an artifact
get_docs_pagepage_id, artifactThe page's content, paginated

Pass the search result's artifact, and its id as page_id, to get_docs_page, then follow the cursors to the end of the page. Search matches whole words; an empty result means no page uses them.

OAuth connections use the workspace chosen at consent. A personal token must also pass workspace_id; GET /api/v1/me lists yours.

The docs change only when Theseus deploys a release. If that happens mid-read, the page request asks you to search again.