mcp server done
Some checks failed
MCP Tests / mcp-tests (pull_request) Failing after 4s

This commit is contained in:
Danilo Reyes
2026-02-01 10:36:54 -06:00
parent ecf058aacf
commit 8946ade5e8
15 changed files with 214 additions and 190 deletions

View File

@@ -1,35 +1,29 @@
# MCP Tooling Contracts (JSON-RPC over stdio)
# MCP Tooling Contracts (MCP over stdio via `nixos-mcp`)
## listTools
- **Method**: `listTools`
## tools/list
- **Method**: `tools/list`
- **Params**: none
- **Result**:
- `tools`: array of Tool objects
- `name`: string (unique)
- `description`: string
- `inputs`: array of InputParam
- `name`: string
- `type`: string (constrained to allowed primitives)
- `required`: boolean
- `description`: string
- `docsAnchor`: object
- `path`: string (under `docs/`)
- `anchor`: string (heading id)
- `summary`: string
- `inputSchema`: object (JSON schema derived from tool signature)
## invokeTool
- **Method**: `invokeTool`
## tools/call
- **Method**: `tools/call`
- **Params**:
- `name`: string (must match Tool.name)
- `args`: object (key/value per Tool.inputs)
- `arguments`: object (key/value per Tool inputs)
- **Result**:
- `status`: enum (`ok`, `invalid_input`, `failed`, `unsupported`)
- `output`: string (human-readable result or guidance)
- `output`: string or object (human-readable result or structured payload)
- `actions`: array of suggested follow-ups (optional)
- `docsAnchor`: object (same shape as listTools.docsAnchor) for quick navigation
- `docsAnchor`: object for quick navigation
- `path`: string (under `docs/` or `specs/`)
- `anchor`: string (heading id)
- `summary`: string
## syncDocs
- **Method**: `syncDocs`
## sync-docs (tool)
- **Purpose**: Validate that documented tools match the live catalog.
- **Params**: none
- **Result**:
@@ -42,6 +36,6 @@
- `actual`: string
## Error Handling
- **Transport errors**: standard JSON-RPC error object with code/message.
- **Transport errors**: standard MCP error object with code/message.
- **Validation errors**: return `invalid_input` with details in `output`.
- **Unknown methods**: return `unsupported` status with guidance to run `listTools`.
- **Unknown tools**: return `unsupported` status with guidance to run `tools/list`.