1.6 KiB
1.6 KiB
MCP Tooling Contracts (JSON-RPC over stdio)
listTools
- Method:
listTools - Params: none
- Result:
tools: array of Tool objectsname: string (unique)description: stringinputs: array of InputParamname: stringtype: string (constrained to allowed primitives)required: booleandescription: string
docsAnchor: objectpath: string (underdocs/)anchor: string (heading id)summary: string
invokeTool
- Method:
invokeTool - Params:
name: string (must match Tool.name)args: object (key/value per Tool.inputs)
- Result:
status: enum (ok,invalid_input,failed,unsupported)output: string (human-readable result or guidance)actions: array of suggested follow-ups (optional)docsAnchor: object (same shape as listTools.docsAnchor) for quick navigation
syncDocs
- Method:
syncDocs - Purpose: Validate that documented tools match the live catalog.
- Params: none
- Result:
status: enum (ok,drift_detected)missingInDocs: array of tool namesmissingInCatalog: array of doc anchors without toolsmismatches: array of objectsname: stringexpected: string (description/input summary)actual: string
Error Handling
- Transport errors: standard JSON-RPC error object with code/message.
- Validation errors: return
invalid_inputwith details inoutput. - Unknown methods: return
unsupportedstatus with guidance to runlistTools.