Follow Discord
Sweep 04 Dec 2026 · 17:52Z Build v2.1.337 554 read Stable v2.1.332 Latest v2.1.337 Next v2.1.337 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

766 pages for errors.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

SEP-3415: Events Extension Model Context Protocol · in the page seps/3415-events-extension …client (see [Appendix A](#appendix-a-sdk-guidance-non-normative)). * Errors (`NotFound`, `Forbidden`, `InvalidParams`, `Unsupported`) are returned as a standard JSON-RPC error response. There is no p… SEP-986: Specify Format for Tool Names Model Context Protocol · in the page seps/986-specify-format-for-tool-names …casing, and character sets. This inconsistency can lead to confusion, errors in tool invocation, and difficulties in documentation and automation. Standardizing the allowed characters and length will:… Specification Enhancement Proposals (SEPs) Model Context Protocol · in the page seps/index …[SEP-1303](https://modelcontextprotocol.io/seps/1303-input-validation-errors-as-tool-execution-errors.md) | Input Validation Errors as Tool Execution Errors | Final | Standards Track | 2025-08-05 | |… Architecture Model Context Protocol · in the page specification/2024-11-05/architecture/index …arameters expecting a response * **Responses**: Successful results or errors matching specific request IDs * **Notifications**: One-way messages requiring no response Each message type follows the JS… Overview Model Context Protocol · in the page specification/2024-11-05/basic/index …s** are further sub-categorized as either **successful results** or **errors**. Results can follow any JSON object structure, while errors must include an error code and message at minimum. ## Protoc… Roots Model Context Protocol · in the page specification/2024-11-05/client/roots …] ``` ## Error Handling Clients **SHOULD** return standard JSON-RPC errors for common failure cases: * Client does not support roots: `-32601` (Method not found) * Internal errors: `-32603` Exampl… Sampling Model Context Protocol · in the page specification/2024-11-05/client/sampling …n similar capabilities. ## Error Handling Clients **SHOULD** return errors for common failure cases: Example error: ```json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -… Prompts Model Context Protocol · in the page specification/2024-11-05/server/prompts …flow. ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Invalid prompt name: `-32602` (Invalid params) * Missing required arguments: `-32602` (Invalid… Resources Model Context Protocol · in the page specification/2024-11-05/server/resources …tion. ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Resource not found: `-32002` * Internal errors: `-32603` Example error: ```json theme={null}… Tools Model Context Protocol · in the page specification/2024-11-05/server/tools …or Handling Tools use two error reporting mechanisms: 1. **Protocol Errors**: Standard JSON-RPC errors for issues like: * Unknown tools * Invalid arguments * Server errors 2. **Tool Execut… Logging Model Context Protocol · in the page specification/2024-11-05/server/utilities/logging …e ``` ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Invalid log level: `-32602` (Invalid params) * Configuration errors: `-32603` (Internal error)… Authorization Model Context Protocol · in the page specification/2025-03-26/basic/authorization …rvers **MUST** return appropriate HTTP status codes for authorization errors: | Status Code | Description | Usage | | - | - | - | | 401 | Unauthorized | Authorization required or token invalid | | 40… Overview Model Context Protocol · in the page specification/2025-03-26/basic/index …* are further sub-categorized as either **successful results** or **errors**. Either a `result` or an `error` **MUST** be set. A response **MUST NOT** set both. * Results **MAY** follow any JSON o… Roots Model Context Protocol · in the page specification/2025-03-26/client/roots …] ``` ## Error Handling Clients **SHOULD** return standard JSON-RPC errors for common failure cases: * Client does not support roots: `-32601` (Method not found) * Internal errors: `-32603` Exampl… Sampling Model Context Protocol · in the page specification/2025-03-26/client/sampling …n similar capabilities. ## Error Handling Clients **SHOULD** return errors for common failure cases: Example error: ```json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -… Prompts Model Context Protocol · in the page specification/2025-03-26/server/prompts …flow. ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Invalid prompt name: `-32602` (Invalid params) * Missing required arguments: `-32602` (Invalid… Resources Model Context Protocol · in the page specification/2025-03-26/server/resources …tion. ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Resource not found: `-32002` * Internal errors: `-32603` Example error: ```json theme={null}… Tools Model Context Protocol · in the page specification/2025-03-26/server/tools …or Handling Tools use two error reporting mechanisms: 1. **Protocol Errors**: Standard JSON-RPC errors for issues like: * Unknown tools * Invalid arguments * Server errors 2. **Tool Execut… Completion Model Context Protocol · in the page specification/2025-03-26/server/utilities/completion …flag ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Method not found: `-32601` (Capability not supported) * Invalid prompt name: `-32602` (Invalid… Logging Model Context Protocol · in the page specification/2025-03-26/server/utilities/logging …e ``` ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Invalid log level: `-32602` (Invalid params) * Configuration errors: `-32603` (Internal error)… Authorization Model Context Protocol · in the page specification/2025-06-18/basic/authorization …rvers **MUST** return appropriate HTTP status codes for authorization errors: | Status Code | Description | Usage | | - | - | - | | 401 | Unauthorized | Authorization required or token invalid | | 40… Overview Model Context Protocol · in the page specification/2025-06-18/basic/index …* are further sub-categorized as either **successful results** or **errors**. Either a `result` or an `error` **MUST** be set. A response **MUST NOT** set both. * Results **MAY** follow any JSON o… Roots Model Context Protocol · in the page specification/2025-06-18/client/roots …] ``` ## Error Handling Clients **SHOULD** return standard JSON-RPC errors for common failure cases: * Client does not support roots: `-32601` (Method not found) * Internal errors: `-32603` Exampl… Sampling Model Context Protocol · in the page specification/2025-06-18/client/sampling …n similar capabilities. ## Error Handling Clients **SHOULD** return errors for common failure cases: Example error: ```json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -… Schema Reference Model Context Protocol · in the page specification/2025-06-18/schema …ber is defined by the sender (e.g. detailed error information, nested errors etc.).</p> </div></li></ul></div></section> </div> <div class="type"> ### `JSONRPCMessage` <div class="tsd-signature"… Prompts Model Context Protocol · in the page specification/2025-06-18/server/prompts …flow. ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Invalid prompt name: `-32602` (Invalid params) * Missing required arguments: `-32602` (Invalid… Resources Model Context Protocol · in the page specification/2025-06-18/server/resources …ount. ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Resource not found: `-32002` * Internal errors: `-32603` Example error: ```json theme={null}… Tools Model Context Protocol · in the page specification/2025-06-18/server/tools …or Handling Tools use two error reporting mechanisms: 1. **Protocol Errors**: Standard JSON-RPC errors for issues like: * Unknown tools * Invalid arguments * Server errors 2. **Tool Execut… Completion Model Context Protocol · in the page specification/2025-06-18/server/utilities/completion …flag ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Method not found: `-32601` (Capability not supported) * Invalid prompt name: `-32602` (Invalid… Logging Model Context Protocol · in the page specification/2025-06-18/server/utilities/logging …e ``` ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Invalid log level: `-32602` (Invalid params) * Configuration errors: `-32603` (Internal error)… Authorization Model Context Protocol · in the page specification/2025-11-25/basic/authorization …rvers **MUST** return appropriate HTTP status codes for authorization errors: | Status Code | Description | Usage | | - | - | - | | 401 | Unauthorized | Authorization required or token invalid | | 40… Tasks Model Context Protocol · in the page specification/2025-11-25/basic/utilities/tasks …or Handling Tasks use two error reporting mechanisms: 1. **Protocol Errors**: Standard JSON-RPC errors for protocol-level issues 2. **Task Execution Errors**: Errors in the underlying request execut… Key Changes Model Context Protocol · in the page specification/2025-11-25/changelog …t/basic/security_best_practices.md). 5. Clarify that input validation errors should be returned as Tool Execution Errors rather than Protocol Errors to enable model self-correction ([SEP-1303](https:/… Elicitation Model Context Protocol · in the page specification/2025-11-25/client/elicitation …zation. ## Error Handling Servers **MUST** return standard JSON-RPC errors for common failure cases: * When a request cannot be processed until an elicitation is completed: `-32042` (`URLElicitatio… Roots Model Context Protocol · in the page specification/2025-11-25/client/roots …] ``` ## Error Handling Clients **SHOULD** return standard JSON-RPC errors for common failure cases: * Client does not support roots: `-32601` (Method not found) * Internal errors: `-32603` Exampl… Sampling Model Context Protocol · in the page specification/2025-11-25/client/sampling …n similar capabilities. ## Error Handling Clients **SHOULD** return errors for common failure cases: * User rejected sampling request: `-1` * Tool result missing in request: `-32602` (Invalid param… Schema Reference Model Context Protocol · in the page specification/2025-11-25/schema …ber is defined by the sender (e.g. detailed error information, nested errors etc.).</p> </div></section> </div> <div class="type"> ### `Icon` <div class="tsd-signature"><span class="tsd-signatur… Prompts Model Context Protocol · in the page specification/2025-11-25/server/prompts …flow. ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Invalid prompt name: `-32602` (Invalid params) * Missing required arguments: `-32602` (Invalid… Resources Model Context Protocol · in the page specification/2025-11-25/server/resources …ount. ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Resource not found: `-32002` * Internal errors: `-32603` Example error: ```json theme={null}… Tools Model Context Protocol · in the page specification/2025-11-25/server/tools …or Handling Tools use two error reporting mechanisms: 1. **Protocol Errors**: Standard JSON-RPC errors for issues like: * Unknown tools * Malformed requests (requests that fail to satisfy [Cal… Completion Model Context Protocol · in the page specification/2025-11-25/server/utilities/completion …flag ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Method not found: `-32601` (Capability not supported) * Invalid prompt name: `-32602` (Invalid… Logging Model Context Protocol · in the page specification/2025-11-25/server/utilities/logging …e ``` ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Invalid log level: `-32602` (Invalid params) * Configuration errors: `-32603` (Internal error)… Authorization Model Context Protocol · in the page specification/2026-07-28/basic/authorization/index …rvers **MUST** return appropriate HTTP status codes for authorization errors: | Status Code | Description | Usage | | - | - | - | | 401 | Unauthorized | Authorization required or token invalid | | 40… Overview Model Context Protocol · in the page specification/2026-07-28/basic/index …ata` member with additional information of any type, such as nested errors. #### Error Codes MCP uses the standard JSON-RPC 2.0 error codes (`-32700`, `-32600` to `-32603`) for general protocol fa… Multi Round-Trip Requests Model Context Protocol · in the page specification/2026-07-28/basic/patterns/mrtr …ect and that the information inside can be correctly parsed. Protocol errors (malformed JSON, invalid schema, internal server errors) **SHOULD** return a JSON-RPC error response with an appropriate er… stdio Model Context Protocol · in the page specification/2026-07-28/basic/transports/stdio …pond to unknown pre-`initialize` requests with implementation-defined errors (commonly `-32601` or `-32602`) or not at all. A client that only supports modern versions does not need to probe, but pro… Streamable HTTP Model Context Protocol · in the page specification/2026-07-28/basic/transports/streamable-http …rom the sub-range the MCP specification reserves for protocol-defined errors. See [Error Codes](https://modelcontextprotocol.io/specification/2026-07-28/basic/index.md#error-codes). **Example error r… Schema Reference Model Context Protocol · in the page specification/2026-07-28/schema …cipient of messages and data in a conversation.</p> </div> </div> ## Errors <div class="type"> ### `Error` <div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span… Prompts Model Context Protocol · in the page specification/2026-07-28/server/prompts …flow. ## Error Handling Servers **SHOULD** return standard JSON-RPC errors for common failure cases: * Invalid prompt name: `-32602` (Invalid params) * Missing required arguments: `-32602` (Invalid… Resources Model Context Protocol · in the page specification/2026-07-28/server/resources …02` (Invalid Params). Servers **SHOULD** return `-32603` for internal errors. For backwards compatibility, clients **SHOULD** also accept `-32002` as a resource not found error, as earlier protocol v…
Feedback