# Inbound MCP contracts

Source: https://usecns.dev/cortex-topic-inbound-mcp-contracts/

[Start here](https://usecns.dev/manual-cortex/)
[CLI commands](https://usecns.dev/commands-cortex/)
[Configuration & integration](https://usecns.dev/cortex-topics/)

`/mcp` supports JSON-RPC requests `initialize`, `ping`, `tools/list`, `tools/call`, `resources/list`, `resources/templates/list`, `resources/read`. Initialize negotiates a supported protocol version and returns tools/resources capabilities and server info. POST accepts one request or a batch; notifications produce no response (202 if none). Replies are JSON, not a long-lived SSE stream: GET returns 405 with `Allow: POST, DELETE`; DELETE removes the supplied `Mcp-Session-Id` and returns 204. Initialization supplies a session header to retain. Invalid JSON returns HTTP 400 JSON-RPC parse error (-32700); unknown methods return -32601; caught method/resource failures return -32603. Tool execution failures instead return `result.isError:true` with a text message, usually HTTP 200.

Every tool accepts optional string `seatId` and numeric `conversationId`; omitted seat uses the default, omitted conversation uses that seat's root. Invalid/nonpositive conversation ID is a tool error. Successful `content` is an array of text blocks containing serialized JSON, not a top-level structured object. No inbound `durable_reset`, seat-creation or generic shell tool is registered.

* [durable\_submit](https://usecns.dev/cortex-mcp-durable-submit/)
* [durable\_inspect](https://usecns.dev/cortex-mcp-durable-inspect/)
* [durable\_configure](https://usecns.dev/cortex-mcp-durable-configure/)
* [durable\_fork](https://usecns.dev/cortex-mcp-durable-fork/)
* [durable\_abort](https://usecns.dev/cortex-mcp-durable-abort/)
* [durable\_compact](https://usecns.dev/cortex-mcp-durable-compact/)
* [durable\_classify\_system1](https://usecns.dev/cortex-mcp-durable-classify-system1/)

Example JSON-RPC request (after initialization):

```
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"durable_inspect","arguments":{"seatId":"example","conversationId":1,"includeTranscriptLimit":5}}}
```

The result's first text block decodes to `{"ok":true,"snapshot":…, "taskGraph":…, "recentMessages":[…]}`. An invalid ID such as -1 instead yields `isError:true` and text `Invalid conversationId: -1`; check both JSON-RPC errors and tool errors.

Read resources with `resources/read` and `params:{uri:…}`. Collections are `durable://seats`, `durable://conversations`, `durable://tasks/graph`, and seat-scoped `durable://seats/{encodedSeatId}/conversations` / `tasks/graph`. Four templates cover default/seat-scoped `conversations/{id}/transcript` and `/workflow`. Resource results have `contents:[{uri,mimeType:"application/json",text}]`. Transcript contains seat/conversation IDs, active-context `messages`, and up to 200 ascending `entries` (not the entire history). Workflow contains workflow, runtimeConfig, agent and usage. Unknown URIs are method errors, not empty resources; use HTTP pagination for full exports.