Expand description
MCP server exposing the gonzalo code graph to agents (EPIC D).
GonzaloMcp implements rmcp’s [ServerHandler] over a
Service: agents spawn the gonzalo-mcp binary
(stdio) and call tools that answer from the local store. It exposes a
view-independent status and views tools plus two families of code-graph
query, each taking a (repo, view_id) view selector:
- Discovery —
viewslists the indexed(repo, view_id)pairs andstatusreports how many exist. A selector naming no indexed view is a tool error that lists the real ones, never an empty result: the two are otherwise indistinguishable, and an agent reads[]as “nothing calls this” rather than “you asked the wrong question” (#210). - Per-symbol —
search/node/callers/callees/impact/exploreanswer questions about a name the caller already has, anddiffcompares two views. - Whole-view —
overview/top/list/unreferencedanswer questions about the graph (what is here, what is heavily referenced, what is ambiguous, what nothing calls) so a caller can orient without knowing a symbol name first.unreferencedis explicitly heuristic; its tool description carries the caveats.
The tool logic lives in plain methods (GonzaloMcp::tools,
GonzaloMcp::dispatch) so it is unit-testable without an rmcp
[RequestContext]; the trait methods are thin adapters over them.
Structs§
- Gonzalo
Mcp - An MCP server backed by a gonzalo
Service.