Expand description
Protocol types of the targeted revision.
Protocol types for MCP specification revision 2026-07-28.
Generated from the official schema.json and schema.ts (commit 271ecc9accafdd9b83a3c869fa67c22953b2af80).
Modules§
- error_
codes - JSON-RPC error codes defined by the schema.
- methods
- Method names defined by the schema.
Structs§
- Annotations
- Optional annotations for the client. The client can use annotations to inform how objects are used or displayed
- Audio
Content - Audio provided to or from an LLM.
- Base
Metadata - Base interface for metadata with name (identifier) and title (display name) properties.
- Blob
Resource Contents - Boolean
Schema - Cacheable
Result - A result that supports a time-to-live (TTL) hint for client-side caching.
- Call
Tool Request - Used by the client to invoke a tool provided by the server.
- Call
Tool Request Params - Parameters for a
tools/callrequest. - Call
Tool Result - The result returned by the server for a
CallToolRequesttools/callrequest. - Call
Tool Result Response - A successful response from the server for a
CallToolRequesttools/callrequest. - Cancelled
Notification - This notification is sent by the client to indicate that it is cancelling a request it previously issued.
- Cancelled
Notification Params - Parameters for a
notifications/cancellednotification. - Client
Capabilities - Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.
- Client
Capabilities Elicitation - Present if the client supports elicitation from the server.
- Client
Capabilities Roots - Present if the client supports listing roots.
- Client
Capabilities Sampling - Present if the client supports sampling from an LLM.
- Client
Notification - This notification is sent by the client to indicate that it is cancelling a request it previously issued.
- Complete
Request - A request from the client to the server, to ask for completion options.
- Complete
Request Params - Parameters for a
completion/completerequest. - Complete
Request Params Argument - The argument’s information
- Complete
Request Params Context - Additional, optional context for completions
- Complete
Result - The result returned by the server for a
CompleteRequestcompletion/completerequest. - Complete
Result Completion - Complete
Result Response - A successful response from the server for a
CompleteRequestcompletion/completerequest. - Create
Message Request Deprecated - A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.
- Create
Message Request Params Deprecated - Parameters for a
sampling/createMessagerequest. - Create
Message Result Deprecated - The result returned by the client for a
CreateMessageRequestsampling/createMessagerequest. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it. - Discover
Request - A request from the client asking the server to advertise its supported
protocol versions, capabilities, and other metadata. Servers MUST
implement
server/discover. Clients MAY call it but are not required to — version negotiation can also happen inline via per-request_meta. - Discover
Result - The result returned by the server for a
DiscoverRequestserver/discoverrequest. - Discover
Result Response - A successful response from the server for a
DiscoverRequestserver/discoverrequest. - Elicit
Request - A request from the server to elicit additional information from the user via the client.
- Elicit
Request Form Params - The parameters for a request to elicit non-sensitive information from the user via a form in the client.
- Elicit
Request Form Params Requested Schema - A restricted subset of JSON Schema. Only top-level properties are allowed, without nesting.
- Elicit
Request UrlParams - The parameters for a request to elicit information from the user via a URL in the client.
- Elicit
Result - The result returned by the client for an
ElicitRequestelicitation/createrequest. - Embedded
Resource - The contents of a resource, embedded into a prompt or tool call result.
- Error
- GetPrompt
Request - Used by the client to get a prompt provided by the server.
- GetPrompt
Request Params - Parameters for a
prompts/getrequest. - GetPrompt
Result - The result returned by the server for a
GetPromptRequestprompts/getrequest. - GetPrompt
Result Response - A successful response from the server for a
GetPromptRequestprompts/getrequest. - Header
Mismatch Error - Returned when a server rejects a request because the values in the HTTP
headers do not match the corresponding values in the request body, or
because required headers are missing or malformed. For HTTP, the response
status code MUST be
400 Bad Request. - Header
Mismatch Error Object - Icon
- An optionally-sized icon that can be displayed in a user interface.
- Icons
- Base interface to add
iconsproperty. - Image
Content - An image provided to or from an LLM.
- Implementation
- Describes the MCP implementation.
- Input
Required Result - An InputRequiredResult sent by the server to indicate that additional input is needed before the request can be completed.
- Input
Response Request Params - Internal
Error - A JSON-RPC error indicating that an internal error occurred on the receiver. This error is returned when the receiver encounters an unexpected condition that prevents it from fulfilling the request.
- Invalid
Params Error - A JSON-RPC error indicating that the method parameters are invalid or malformed.
- Invalid
Request Error - A JSON-RPC error indicating that the request is not a valid request object. This error is returned when the message structure does not conform to the JSON-RPC 2.0 specification requirements for a request (e.g., missing required fields like
jsonrpcormethod, or using invalid types for these fields). - Json
RpcError Response - A response to a request that indicates an error occurred.
- Json
RpcNotification - A notification which does not expect a response.
- Json
RpcRequest - A request that expects a response.
- Json
RpcResult Response - A successful (non-error) response to a request.
- Legacy
Titled Enum Schema - Use
TitledSingleSelectEnumSchemainstead. This interface will be removed in a future version. - List
Prompts Request - Sent from the client to request a list of prompts and prompt templates the server has.
- List
Prompts Result - The result returned by the server for a
ListPromptsRequestprompts/listrequest. - List
Prompts Result Response - A successful response from the server for a
ListPromptsRequestprompts/listrequest. - List
Resource Templates Request - Sent from the client to request a list of resource templates the server has.
- List
Resource Templates Result - The result returned by the server for a
ListResourceTemplatesRequestresources/templates/listrequest. - List
Resource Templates Result Response - A successful response from the server for a
ListResourceTemplatesRequestresources/templates/listrequest. - List
Resources Request - Sent from the client to request a list of resources the server has.
- List
Resources Result - The result returned by the server for a
ListResourcesRequestresources/listrequest. - List
Resources Result Response - A successful response from the server for a
ListResourcesRequestresources/listrequest. - List
Roots Request Deprecated - Sent from the server to request a list of root URIs from the client. Roots allow servers to ask for specific directories or files to operate on. A common example for roots is providing a set of repositories or directories a server should operate on.
- List
Roots Request Params - List
Roots Result Deprecated - The result returned by the client for a
ListRootsRequestroots/listrequest. This result contains an array ofRootobjects, each representing a root directory or file that the server can operate on. - List
Tools Request - Sent from the client to request a list of tools the server has.
- List
Tools Result - The result returned by the server for a
ListToolsRequesttools/listrequest. - List
Tools Result Response - A successful response from the server for a
ListToolsRequesttools/listrequest. - Logging
Message Notification Deprecated - JSONRPCNotification of a log message passed from server to client. The client opts in by setting
"io.modelcontextprotocol/logLevel"in a request’s_meta. - Logging
Message Notification Params Deprecated - Parameters for a
notifications/messagenotification. - Method
NotFound Error - A JSON-RPC error indicating that the requested method does not exist or is not available.
- Missing
Required Client Capability Error - Returned when processing a request requires a capability the client did not
declare in
clientCapabilities. For HTTP, the response status code MUST be400 Bad Request. - Missing
Required Client Capability Error Data - Missing
Required Client Capability Error Object - Model
Hint Deprecated - Hints to use for model selection.
- Model
Preferences Deprecated - The server’s preferences for model selection, requested of the client during sampling.
- Notification
- Notification
Meta Object - Extends
MetaObjectwith additional notification-specific fields. All key naming rules fromMetaObjectapply. - Notification
Params - Common params for any notification.
- Number
Schema - Paginated
Request - Paginated
Request Params - Common params for paginated requests.
- Paginated
Result - Parse
Error - A JSON-RPC error indicating that invalid JSON was received by the server. This error is returned when the server cannot parse the JSON text of a message.
- Progress
Notification - An out-of-band notification used to inform the receiver of a progress update for a long-running request.
- Progress
Notification Params - Parameters for a
ProgressNotificationnotifications/progressnotification. - Prompt
- A prompt or prompt template that the server offers.
- Prompt
Argument - Describes an argument that a prompt can accept.
- Prompt
List Changed Notification - An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This is only delivered on a
SubscriptionsListenRequestsubscriptions/listenstream when the client requested it via thepromptsListChangedfilter field. - Prompt
Message - Describes a message returned as part of a prompt.
- Prompt
Reference - Identifies a prompt.
- Read
Resource Request - Sent from the client to the server, to read a specific resource URI.
- Read
Resource Request Params - Parameters for a
resources/readrequest. - Read
Resource Result - The result returned by the server for a
ReadResourceRequestresources/readrequest. - Read
Resource Result Response - A successful response from the server for a
ReadResourceRequestresources/readrequest. - Request
- Request
Meta Object - Extends
MetaObjectwith additional request-specific fields. All key naming rules fromMetaObjectapply. - Request
Params - Common params for any request.
- Resource
- A known resource that the server is capable of reading.
- Resource
Contents - The contents of a specific resource or sub-resource.
- Resource
Link - A resource that the server is capable of reading, included in a prompt or tool call result.
- Resource
List Changed Notification - An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This is only delivered on a
SubscriptionsListenRequestsubscriptions/listenstream when the client requested it via theresourcesListChangedfilter field. - Resource
Request Params - Common params for resource-related requests.
- Resource
Template - A template description for resources available on the server.
- Resource
Template Reference - A reference to a resource or resource template definition.
- Resource
Updated Notification - A notification from the server to the client, informing it that a resource has changed and may need to be read again. This is only sent for resources the client opted in to via the
resourceSubscriptionsfield of aSubscriptionsListenRequestsubscriptions/listenrequest. - Resource
Updated Notification Params - Parameters for a
notifications/resources/updatednotification. - Result
- Common result fields.
- Result
Meta Object - Extends
MetaObjectwith additional result-specific fields. All key naming rules fromMetaObjectapply. - Root
Deprecated - Represents a root directory or file that the server can operate on.
- Sampling
Message Deprecated - Describes a message issued to or received from an LLM API.
- Server
Capabilities - Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.
- Server
Capabilities Prompts - Present if the server offers any prompt templates.
- Server
Capabilities Resources - Present if the server offers any resources to read.
- Server
Capabilities Tools - Present if the server offers any tools to call.
- String
Schema - Subscription
Filter - The set of notification types a client may opt in to on a
SubscriptionsListenRequestsubscriptions/listenrequest. - Subscriptions
Acknowledged Notification - Sent by the server to acknowledge that a
SubscriptionsListenRequestsubscriptions/listensubscription has been established and to report which notification types it agreed to honor. - Subscriptions
Acknowledged Notification Params - Parameters for a
SubscriptionsAcknowledgedNotificationnotifications/subscriptions/acknowledgednotification. - Subscriptions
Listen Request - Sent from the client to open a long-lived channel for receiving notifications outside the context of a specific request. Replaces the previous HTTP GET endpoint and ensures consistent behavior between HTTP and STDIO.
- Subscriptions
Listen Request Params - Parameters for a
SubscriptionsListenRequestsubscriptions/listenrequest. - Subscriptions
Listen Result - The response to a
SubscriptionsListenRequestsubscriptions/listenrequest, signalling that the subscription has ended gracefully (for example, during server shutdown). Because the listen stream is long-lived, this result is sent only when the server tears the subscription down; an abrupt transport close carries no response. The result body is otherwise empty. - Subscriptions
Listen Result Meta Object - Extends
ResultMetaObjectwith the subscription-stream identifier carried by aSubscriptionsListenResult. All key naming rules fromMetaObjectapply. - Subscriptions
Listen Result Response - A successful response from the server for a
SubscriptionsListenRequestsubscriptions/listenrequest, sent when the server tears the subscription down gracefully. - Text
Content - Text provided to or from an LLM.
- Text
Resource Contents - Titled
Multi Select Enum Schema - Schema for multiple-selection enumeration with display titles for each option.
- Titled
Multi Select Enum Schema Items - Schema for array items with enum options and display labels.
- Titled
Multi Select Enum Schema Items AnyOf Item - Titled
Single Select Enum Schema - Schema for single-selection enumeration with display titles for each option.
- Titled
Single Select Enum Schema OneOf Item - Tool
- Definition for a tool the client can call.
- Tool
Annotations - Additional properties describing a
Toolto clients. - Tool
Choice Deprecated - Controls tool selection behavior for sampling requests.
- Tool
Input Schema - A JSON Schema object defining the expected parameters for the tool.
- Tool
List Changed Notification - An optional notification from the server to the client, informing it that the list of tools it offers has changed. This is only delivered on a
SubscriptionsListenRequestsubscriptions/listenstream when the client requested it via thetoolsListChangedfilter field. - Tool
Output Schema - An optional JSON Schema object defining the structure of the tool’s output returned in
the structuredContent field of a
CallToolResult. This can be any valid JSON Schema 2020-12. - Tool
Result Content Deprecated - The result of a tool use, provided by the user back to the assistant.
- Tool
UseContent Deprecated - A request from the assistant to call a tool.
- Unsupported
Protocol Version Error - Returned when the request’s protocol version is unknown to the server or
unsupported (e.g., a known experimental or draft version the server has
chosen not to implement). For HTTP, the response status code MUST be
400 Bad Request. - Unsupported
Protocol Version Error Data - Unsupported
Protocol Version Error Object - Untitled
Multi Select Enum Schema - Schema for multiple-selection enumeration without display titles for options.
- Untitled
Multi Select Enum Schema Items - Schema for the array items.
- Untitled
Single Select Enum Schema - Schema for single-selection enumeration without display titles for options.
Enums§
- Array
Type - The constant
"array". - Audio
Type - The constant
"audio". - Boolean
Type - The constant
"boolean". - Cache
Scope - Indicates the intended scope of the cached response, analogous to HTTP
Cache-Control: publicvsCache-Control: private. - Call
Tool Result Response Result - Client
Request - Complete
Request Params Ref - Completion
Complete Method - The constant
"completion/complete". - Content
Block - Create
Message Request Params Include Context - A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
- Create
Message Result Content - Elicit
Request Params - The parameters for a request to elicit additional information from the user via the client.
- Elicit
Result Action - The user action in response to the elicitation.
- Elicit
Result Content Value - Elicit
Result Content Value Scalar - Elicitation
Create Method - The constant
"elicitation/create". - Embedded
Resource Resource - Enum
Schema - Form
Mode - The constant
"form". - GetPrompt
Result Response Result - Icon
Theme - Optional specifier for the theme this icon is designed for.
"light"indicates the icon is designed to be used with a light background, and"dark"indicates the icon is designed to be used with a dark background. - Image
Type - The constant
"image". - Input
Request - Input
Response - Json
RpcMessage - Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
- Json
RpcResponse - A response to a request, containing either the result or error.
- Json
RpcVersion - The constant
"2.0". - Logging
Level Deprecated - The severity of a log message.
- Multi
Select Enum Schema - Notifications
Cancelled Method - The constant
"notifications/cancelled". - Notifications
Message Method - The constant
"notifications/message". - Notifications
Progress Method - The constant
"notifications/progress". - Notifications
Prompts List Changed Method - The constant
"notifications/prompts/list_changed". - Notifications
Resources List Changed Method - The constant
"notifications/resources/list_changed". - Notifications
Resources Updated Method - The constant
"notifications/resources/updated". - Notifications
Subscriptions Acknowledged Method - The constant
"notifications/subscriptions/acknowledged". - Notifications
Tools List Changed Method - The constant
"notifications/tools/list_changed". - Number
Schema Type - Object
Type - The constant
"object". - Primitive
Schema Definition - Restricted schema definitions that only allow primitive types without nested objects or arrays.
- Progress
Token - A progress token, used to associate progress notifications with the original request.
- Prompts
GetMethod - The constant
"prompts/get". - Prompts
List Method - The constant
"prompts/list". - Read
Resource Result Contents Item - Read
Resource Result Response Result - RefPrompt
Type - The constant
"ref/prompt". - RefResource
Type - The constant
"ref/resource". - Request
Id - A uniquely identifying ID for a request in JSON-RPC.
- Resource
Link Type - The constant
"resource_link". - Resource
Type - The constant
"resource". - Resources
List Method - The constant
"resources/list". - Resources
Read Method - The constant
"resources/read". - Resources
Templates List Method - The constant
"resources/templates/list". - Role
- The sender or recipient of messages and data in a conversation.
- Roots
List Method - The constant
"roots/list". - Sampling
Create Message Method - The constant
"sampling/createMessage". - Sampling
Message Content - Sampling
Message Content Block Deprecated - Server
Discover Method - The constant
"server/discover". - Server
Notification - Single
Select Enum Schema - String
Schema Format - String
Type - The constant
"string". - Subscriptions
Listen Method - The constant
"subscriptions/listen". - Text
Type - The constant
"text". - Tool
Choice Mode - Controls the tool use ability of the model:
- Tool
Result Type - The constant
"tool_result". - Tool
UseType - The constant
"tool_use". - Tools
Call Method - The constant
"tools/call". - Tools
List Method - The constant
"tools/list". - UrlMode
- The constant
"url".
Constants§
- PROTOCOL_
VERSION - The protocol revision these types describe.
Type Aliases§
- Cursor
- An opaque token used to represent a cursor for pagination.
- Empty
Result - Common result fields.
- Input
Requests - A map of server-initiated requests that the client must fulfill. Keys are server-assigned identifiers; values are the request objects.
- Input
Responses - A map of client responses to server-initiated requests.
Keys correspond to the keys in the
InputRequestsmap; values are the client’s result for each request. - Meta
Object - Represents the contents of a
_metafield, which clients and servers use to attach additional metadata to their interactions. - Result
Type - Indicates the type of a
Resultobject, allowing the client to determine how to parse the response.