> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Endpoint Limits

> Size bounds, supported methods and error codes for MCP endpoints

<Warning>MCP endpoints are in beta.</Warning>

MCP endpoints are deliberately small. Every request and response is bounded, so
one agent can't exhaust your deployment, and every refusal has a stable code
that clients can act on.

## Limits

| Limit | Value |
| - | - |
| Tools per endpoint | 1 to 32 |
| Tool name | A letter followed by letters, digits or underscores; 64 characters max |
| Tool description | 4,096 characters |
| Request body | 64 KiB |
| Argument nesting depth | 32 |
| JSON-RPC request `id` | A number, or a string of at most 256 bytes |
| `request_key` and `grant_id` in `_meta` | 1 to 256 characters |
| Tool result | 144 KiB, counting both the text and structured copies |
| HTTP response | 160 KiB |
| Operation result retention | 14 days |

A query result that exceeds the tool result limit fails with
`result_too_large`. Return a smaller projection or paginate instead. An
operation whose result is too large still succeeds: the tool returns
`accepted_result_omitted` with the invocation ID, and the client can recover the
full result later.

After 14 days an operation's result expires and recovery returns
`OperationResultExpired`. The request key still refuses to run the operation
again.

For hosts using `bijection/mcp/node`, a request journal record is at most
256 KiB, a call ID at most 2,048 characters, and each discovery, recovery or
status attempt has a 10-second deadline.

## Supported methods

The endpoint accepts only HTTP `POST` and answers with fixed JSON responses. It
handles these MCP methods:

* `initialize` and `notifications/initialized`
* `server/discover`
* `ping`
* `tools/list`
* `tools/call`

Any other method, including resources, prompts and subscriptions, is refused
with `400 unsupported_method`. The endpoint doesn't stream responses.

## Errors

### HTTP errors

When the endpoint refuses a request, it responds with a JSON body of the form
`{ "error": "<code>" }` and `Cache-Control: no-store`.

| Status | Code | Cause |
| - | - | - |
| 400 | `missing_request` | The request has no body. |
| 400 | `invalid_request` | The body isn't a JSON object. |
| 400 | `unsupported_method` | The MCP method isn't [supported](#supported-methods). |
| 400 | `invalid_request_id` | The JSON-RPC `id` is too long or of the wrong type. |
| 400 | `invalid_request_metadata` | The tool call's request metadata is malformed, or is sent both in `_meta` and in the arguments. |
| 401 | `authentication_required` | The request has no authenticated identity. See [Authentication](/mcp/authentication). |
| 403 | `origin_refused` | The `Origin` header doesn't match the endpoint's resource. |
| 403 | `access_refused` | The caller has no valid [grant](/mcp/authentication#grants). |
| 403 | `request_refused` | The grant stopped being valid while the request ran, or the request failed; the response was withheld. |
| 405 | `method_not_allowed` | The request wasn't a `POST`. |
| 409 | `publication_changed` | The URL's revision isn't the current one. Get the new endpoint URL. |
| 413 | `request_too_large` | The body is larger than 64 KiB. |
| 429 | `capacity_exhausted` | Your admission mutation refused the request. Retry after the `Retry-After` header's seconds. |
| 500 | `result_too_large` | The complete response is larger than 160 KiB. |

### Tool errors

A tool call that is admitted but fails returns a normal MCP result with
`isError: true` and `structuredContent` of the form `{ "error": "<code>" }`.
Messages thrown by your own functions are never passed to the agent.

| Code | Cause |
| - | - |
| `tool_unavailable` | The tool isn't published, or isn't in the caller's grant. |
| `request_scope_mismatch` | An operation call didn't carry the caller's grant `id`. |
| `tool_refused` | An operation call was refused, for example by argument validation or by the operation. |
| `read_unavailable` | A query, status or recovery call failed, including on invalid arguments. This says nothing about a write's outcome. |
| `result_too_large` | The result is larger than the tool result limit. |
| `result_encoding_failed` | The result contains a value that can't be encoded, such as a non-finite number. |
| `OperationRequestConflict` | The request key was already used with different arguments or by a different caller. |
| `OperationDefinitionChanged` | The operation's contract differs from the one the tool was published with. |
| `OperationRetired` | The operation no longer accepts new requests. |
| `OperationResultExpired` | The operation's retained result has expired. |

If the data behind a read changes while its result is being released, the
endpoint retries that read up to three times in total, rechecking the grant each
time. Writes are never retried by the endpoint.
