Skip to main content
← MCP Tools

get_subsystem_brief

Facts for explaining what runs when control enters a subsystem: the call spine by depth, every call that leaves the component, who calls in, and the shape. Returns the facts to write an explanation from, not a written document.

Requires semantic (full cross-file) analysis, since it walks call edges; it says so plainly if that analysis has not run for the language involved.

Availability: single-repo stdio (travsr mcp) only. Not in global stdio or SSE.

Input schema​

{
"type": "object",
"properties": {
"entry": {
"type": "string",
"description": "A single symbol to trace from, e.g. 'fn:get_context'. Omit to use `component`, or omit both to list what is available."
},
"component": {
"type": "string",
"description": "A component path from the listing, e.g. 'crates/travsr-retrieval'. Traced from the symbols most called from outside it."
},
"provenance": {
"type": "string",
"description": "'ratified' (default) excludes the un-ratified live overlay so a bare-name guess cannot invent a call; '' accepts everything; any other value names one provenance exactly."
},
"depth": {
"type": "integer",
"description": "How many calls from the entry to follow (default 4, max 8)."
},
"width": {
"type": "integer",
"description": "Same-component callees kept per function, ranked by reach (default 6). Calls that leave the component are never cut."
},
"token_budget": {
"type": "integer",
"description": "Approximate size cap for the returned brief, in tokens (default 8000). A brief is meant to be read whole; raise it for a large repository."
}
},
"additionalProperties": false
}

No required fields. Call with {} (both entry and component omitted) to list the subsystems in the repo and their entry points first.

Output format​

Plain text, not JSON.

With no entry and no component: a SUBSYSTEMS (components called from outside, N of M) listing, one block per component that receives external calls, each showing its total external call count, entry point count, and up to 3 of its most-called-into symbols with their caller counts. Ends with a prompt to pass one of the listed components back as component, or a symbol as entry.

With entry or component given:

  1. SUBSYSTEM BRIEF: <symbol or component> header, plus a provenance=... line.
  2. ## Entry: the root symbol(s) the walk starts from.
  3. ## Called from: up to 8 callers of the entry, ranked by reach, or a note that nothing in the graph calls it.
  4. ## Call spine, by depth from the entry: one ### depth N section per level, each line giving the symbol, its component, its reach (total incoming references), and its path. Same-component callees are capped by width per function; calls that leave the component are never cut.
  5. ## Calls that leave the component (the contracts): every cross-component call the walk found, grouped under a ### -> <component> (N) heading per target component, or a - none; ... line when control stays in one component.
  6. ## Shape: the symbol, call, and component counts of the traced spine.
  7. ## Freshness: present only when the semantic index is behind (it carries the staleness note) or when no outgoing calls resolved from the entry (it says the edges are unresolved rather than absent).
  8. ## What this brief cannot tell you: a fixed list of limits: a missing call means the graph did not resolve it, Phase B coverage varies by language, and nothing states why a call exists.

Example​

Run against the Travsr repository itself:

Request:

{ "entry": "fn:get_context", "depth": 1, "width": 2 }

Response:

SUBSYSTEM BRIEF: get_context
provenance=ratified | snapshot of the code as indexed; not maintained

## Entry
- get_context - crates/travsr-mcp/src/tools.rs

## Called from
- handle_tool_call - crates/travsr-mcp/src/server.rs

## Call spine, by depth from the entry
(depth is calls from the entry, NOT elapsed order; reach = references arriving at that symbol)
### depth 0
- get_context [crates/travsr-mcp] reach=1 - crates/travsr-mcp/src/tools.rs
### depth 1
- get_context_with_filter [crates/travsr-mcp] reach=2 - crates/travsr-mcp/src/tools.rs

## Calls that leave the component (the contracts)
- none; control stays in one component for the traced depth

## Shape
- 2 symbols, 1 calls, 1 components

## Freshness
[note: call-graph index incomplete; semantic analysis has not caught up with the current commit; call edges may be missing and empty results are not authoritative. Run `travsr status` to check progress.]

## What this brief cannot tell you
- a missing call means the graph did not resolve it, not that it does not happen
- Phase B coverage varies by language; absence is unknown, never no
- nothing here states WHY a call exists; read the source for that

Discovery request (no arguments):

{}

Response (trimmed; <- arrives escaped as &lt;- inside the envelope):

SUBSYSTEMS (components called from outside, 18 of 18)

crates/travsr-store (260 external calls, 84 entry points)
SqliteStore.get_meta &lt;- 29 callers
SqliteStore.get_nodes &lt;- 16 callers
SqliteStore.search_nodes_by_name &lt;- 13 callers
crates/travsr-retrieval (10 external calls, 6 entry points)
context_candidates &lt;- 2 callers
knapsack &lt;- 2 callers
ppr_weighted &lt;- 2 callers

Take one with `component`, or a single symbol with `entry`.

When to use​

  • Explaining what happens when a request comes in, without reading every file along the path yourself.
  • Checking a component's real public contract: what other components actually call into it, as opposed to what its README claims.
  • Following up on get_architecture_brief, once it has named the component you want to understand at call-graph depth.

Notes​

  • Returns a plain-text explanation when no call edges exist at all in the index, when none survive the provenance filter, or when every remaining call runs between excluded (test/noise) symbols; each of these three cases gets a distinct message rather than one generic empty answer.
  • depth is clamped to 8, width bounds same-component fan-out per function only; a call that crosses a component boundary is always kept.