Skip to main content

Crate gonzalo_mcp

Crate gonzalo_mcp 

Source
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:

  • Discoveryviews lists the indexed (repo, view_id) pairs and status reports 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-symbolsearch/node/callers/callees/impact/explore answer questions about a name the caller already has, and diff compares two views.
  • Whole-viewoverview/top/list/unreferenced answer 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. unreferenced is 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§

GonzaloMcp
An MCP server backed by a gonzalo Service.