Documentation
¶
Overview ¶
Package registration finds where MCP tools, prompts and resources are registered, across direct SDK calls, decorators/annotations/attributes, a wrapper function that forwards into the SDK, and registration inside a loop - working entirely off the graph the parser already built, so it never re-reads source. A registration that cannot be fully resolved is retained with unresolved flags so coverage records uncertainty instead of dropping it.
requesthandler.go recognizes the low-level SDK's request-based registration form, used by the reference MCP servers: a ListToolsRequestSchema (or Python's @app.list_tools()) handler returns the capabilities themselves - an array literal, or an object literal with a "tools"/"prompts"/"resources" array field - and a separate CallToolRequestSchema (@app.call_tool()) handler dispatches every call by name
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Discover ¶
Discover finds every tool, prompt and resource registration reachable from the graph's calls, decorators and annotations, and appends them to g.Capabilities
func FileImportsMCPSDK ¶
FileImportsMCPSDK reports whether f imports a module this build recognizes as an MCP SDK
func TreeImportsMCPSDK ¶
TreeImportsMCPSDK reports whether any file in the graph imports a recognized MCP SDK, which is what qualifies a bare `.tool(` call anywhere in it as a registration. The check is tree-wide because helper modules commonly receive a server object without importing its SDK.
Types ¶
This section is empty.