Documentation Index
Fetch the complete documentation index at: https://modelcontextprotocol.io/llms.txt Use this file to discover all available pages before exploring further.
Schema Reference
JSON-RPC
JSONRPCErrorResponse
interface JSONRPCErrorResponse {
jsonrpc: “2.0”;
id?: RequestId;
error: Error;
}A response to a request that indicates an error occurred. jsonrpc: “2.0”Permalink id?: RequestIdPermalink error: ErrorPermalink
JSONRPCMessage
JSONRPCMessage: JSONRPCRequest | JSONRPCNotification | JSONRPCResponseRefers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
JSONRPCNotification
interface JSONRPCNotification {
method: string;
params?: { [key: string]: any };
jsonrpc: “2.0”;
}A notification which does not expect a response. method: stringPermalink Inherited from Notification.method params?: { [key: string]: any }Permalink Inherited from Notification.params jsonrpc: “2.0”Permalink
JSONRPCRequest
interface JSONRPCRequest {
method: string;
params?: { [key: string]: any };
jsonrpc: “2.0”;
id: RequestId;
}A request that expects a response. method: stringPermalink Inherited from Request.method params?: { [key: string]: any }Permalink Inherited from Request.params jsonrpc: “2.0”Permalink id: RequestIdPermalink
JSONRPCResponse
JSONRPCResponse: JSONRPCResultResponse | JSONRPCErrorResponseA response to a request, containing either the result or error.
JSONRPCResultResponse
interface JSONRPCResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: Result;
}A successful (non-error) response to a request. jsonrpc: “2.0”Permalink id: RequestIdPermalink result: ResultPermalink
Common Types
Annotations
interface Annotations {
audience?: Role[];
priority?: number;
lastModified?: string;
}Optional annotations for the client. The client can use annotations to inform how objects are used or displayed audience?: Role[]Permalink Describes who the intended audience of this object or data is. It can include multiple entries to indicate content useful for multiple audiences (e.g., ["user", "assistant"]). priority?: numberPermalink Describes how important this data is for operating the server. A value of 1 means “most important,” and indicates that the data is
effectively required, while 0 means “least important,” and indicates that
the data is entirely optional. lastModified?: stringPermalink The moment the resource was last modified, as an ISO 8601 formatted string. Should be an ISO 8601 formatted string (e.g., “2025-01-12T15:00:58Z”). Examples: last activity timestamp in an open file, timestamp when the resource
was attached, etc.
Cursor
Cursor: stringAn opaque token used to represent a cursor for pagination.
EmptyResult
EmptyResult: ResultA result that indicates success but carries no data.
Icon
interface Icon {
src: string;
mimeType?: string;
sizes?: string[];
theme?: “light” | “dark”;
}An optionally-sized icon that can be displayed in a user interface. src: stringPermalink A standard URI pointing to an icon resource. May be an HTTP/HTTPS URL or a data: URI with Base64-encoded image data. Consumers SHOULD take steps to ensure URLs serving icons are from the
same domain as the client/server or a trusted domain. Consumers SHOULD take appropriate precautions when consuming SVGs as they can contain
executable JavaScript. mimeType?: stringPermalink Optional MIME type override if the source MIME type is missing or generic.
For example: "image/png", "image/jpeg", or "image/svg+xml". sizes?: string[]Permalink Optional array of strings that specify sizes at which the icon can be used.
Each string should be in WxH format (e.g., "48x48", "96x96") or "any" for scalable formats like SVG. If not provided, the client should assume that the icon can be used at any size. theme?: “light” | “dark”Permalink 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. If not provided, the client should assume the icon can be used with any theme.
InputResponseRequestParams
interface InputResponseRequestParams {
_meta: RequestMetaObject;
inputResponses?: InputResponses;
requestState?: string;
}Common params for any request. _meta: RequestMetaObjectPermalink Inherited from RequestParams._meta inputResponses?: InputResponsesPermalink requestState?: stringPermalink
JSONArray
JSONArray: JSONValue[]
JSONObject
JSONObject: { [key: string]: JSONValue } Type Declaration <ul> <li> [key: string]: JSONValue
JSONValue
JSONValue: string | number | boolean | null | JSONObject | JSONArray
LoggingLevel
LoggingLevel:
| “debug”
| “info”
| “notice”
| “warning”
| “error”
| “critical”
| “alert”
| “emergency“The severity of a log message. These map to syslog message severities, as specified in RFC-5424: [https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1](https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1) DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry.
MetaObject
MetaObject: Record\<string, unknown>Represents the contents of a _meta field, which clients and servers use to attach additional metadata to their interactions. Certain key names are reserved by MCP for protocol-level metadata; implementations MUST NOT make assumptions about values at these keys. Additionally, specific schema definitions may reserve particular names for purpose-specific metadata, as declared in those definitions. Valid keys have two segments: Prefix: <ul> <li>Optional — if specified, MUST be a series of labels separated by dots (.), followed by a slash (/). <li>Labels MUST start with a letter and end with a letter or digit. Interior characters may be letters, digits, or hyphens (-). <li>Implementations SHOULD use reverse DNS notation (e.g., com.example/ rather than example.com/). <li>Any prefix where the second label is modelcontextprotocol or mcp is reserved for MCP use. For example: io.modelcontextprotocol/, dev.mcp/, org.modelcontextprotocol.api/, and com.mcp.tools/ are all reserved. However, com.example.mcp/ is NOT reserved, as the second label is example. Name: <ul> <li>Unless empty, MUST start and end with an alphanumeric character ([a-z0-9A-Z]). <li>Interior characters may be alphanumeric, hyphens (-), underscores (_), or dots (.). SeeGeneral fields: _meta for more details.
NotificationMetaObject
interface NotificationMetaObject {
“io.modelcontextprotocol/subscriptionId”?: RequestId;
[key: string]: unknown;
}Extends MetaObject with additional notification-specific fields. All key naming rules from MetaObject apply. See<ul> <li>MetaObject for key naming rules and reserved prefixes. <li>General fields: _meta for more details. “io.modelcontextprotocol/subscriptionId”?: RequestIdPermalink Identifies the subscription stream a notification was delivered on. The
server MUST include this key on every notification delivered via a subscriptions/listen stream, so the
client can correlate the notification with the originating subscription.
The key is absent on notifications not delivered via a subscription
stream (e.g. progress notifications for an in-flight request), which is
why it is optional here. The value is the JSON-RPC ID of the subscriptions/listen request that
opened the stream.
NotificationParams
interface NotificationParams {
_meta?: NotificationMetaObject;
}Common params for any notification. _meta?: NotificationMetaObjectPermalink
PaginatedRequestParams
interface PaginatedRequestParams {
_meta: RequestMetaObject;
cursor?: string;
}Common params for paginated requests. <details> <summary>Example: List request with cursorPermalink
{ "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "cursor": "eyJwYWdlIjogMn0="} Copy _meta: RequestMetaObjectPermalink Inherited from RequestParams._meta cursor?: stringPermalink An opaque token representing the current pagination position.
If provided, the server should return results starting after this cursor.
ProgressToken
ProgressToken: string | numberA progress token, used to associate progress notifications with the original request.
RequestId
RequestId: string | numberA uniquely identifying ID for a request in JSON-RPC.
RequestMetaObject
interface RequestMetaObject {
progressToken?: ProgressToken;
“io.modelcontextprotocol/protocolVersion”: string;
“io.modelcontextprotocol/clientInfo”?: Implementation;
“io.modelcontextprotocol/clientCapabilities”: ClientCapabilities;
“io.modelcontextprotocol/logLevel”?: LoggingLevel;
[key: string]: unknown;
}Extends MetaObject with additional request-specific fields. All key naming rules from MetaObject apply. See<ul> <li>MetaObject for key naming rules and reserved prefixes. <li>General fields: _meta for more details. progressToken?: ProgressTokenPermalink If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. “io.modelcontextprotocol/protocolVersion”: stringPermalink The MCP Protocol Version being used for this request. Required. For the HTTP transport, this value MUST match the MCP-Protocol-Version
header; otherwise the server MUST return a 400 Bad Request. If the
server does not support the requested version, it MUST return an UnsupportedProtocolVersionError. “io.modelcontextprotocol/clientInfo”?: ImplementationPermalink Identifies the client software making the request. Clients SHOULD
include this field on every request unless specifically configured not
to do so. The Implementation schema requires name and version; other
fields are optional. The value is self-reported by the client and is not verified by the
protocol. It is intended for display, logging, and debugging. Servers
SHOULD NOT use it to change their behavior, and SHOULD NOT rely on it for
security decisions. “io.modelcontextprotocol/clientCapabilities”: ClientCapabilitiesPermalink The client’s capabilities for this specific request. Required. Capabilities are declared per-request rather than once at initialization;
an empty object means the client supports no optional capabilities.
Servers MUST NOT infer capabilities from prior requests. “io.modelcontextprotocol/logLevel”?: LoggingLevelPermalink The desired log level for this request. Optional. If absent, the server MUST NOT send any notifications/message
notifications for this request. The client opts in to log messages by
explicitly setting a level. Replaces the former logging/setLevel RPC. DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry.
RequestParams
interface RequestParams {
_meta: RequestMetaObject;
}Common params for any request. _meta: RequestMetaObjectPermalink
Result
interface Result {
_meta?: ResultMetaObject;
resultType: string;
[key: string]: unknown;
}Common result fields. _meta?: ResultMetaObjectPermalink resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".
ResultMetaObject
interface ResultMetaObject {
“io.modelcontextprotocol/serverInfo”?: Implementation;
[key: string]: unknown;
}Extends MetaObject with additional result-specific fields. All key naming rules from MetaObject apply. See<ul> <li>MetaObject for key naming rules and reserved prefixes. <li>General fields: _meta for more details. “io.modelcontextprotocol/serverInfo”?: ImplementationPermalink Identifies the server software producing the response. Servers SHOULD
include this field on every response unless specifically configured not
to do so. The Implementation schema requires name and version; other
fields are optional. The value is self-reported by the server and is not verified by the
protocol. It is intended for display, logging, and debugging. Clients
SHOULD NOT use it to change their behavior, and SHOULD NOT rely on it for
security decisions.
ResultType
ResultType: “complete” | “input_required” | stringIndicates the type of a Result object, allowing the client to determine how to parse the response. complete - the request completed successfully and the result contains the final content. input_required - the request requires additional input and the result contains an InputRequiredResult object with instructions for the client to provide additional input before retrying the original request.
Role
Role: “user” | “assistant“The sender or recipient of messages and data in a conversation.
Errors
Error
interface Error {
code: number;
message: string;
data?: unknown;
} code: numberPermalink The error type that occurred. message: stringPermalink A short description of the error. The message SHOULD be limited to a concise single sentence. data?: unknownPermalink Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
HEADER_MISMATCH
HEADER_MISMATCH: -32020Error code returned when the HTTP headers of a request do not match the corresponding values in the request body, or required headers are missing or malformed.
HeaderMismatchError
interface HeaderMismatchError {
jsonrpc: “2.0”;
id?: RequestId;
error: Error & { code: -32020 };
}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. <details> <summary>Example: Header mismatchPermalink
{ "jsonrpc": "2.0", "id": 1, "error": { "code": -32020, "message": "Header mismatch: Mcp-Name header value 'foo' does not match body value 'bar'" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCErrorResponse.jsonrpc id?: RequestIdPermalink Inherited from JSONRPCErrorResponse.id error: Error & { code: -32020 }Permalink
InternalError
interface InternalError {
message: string;
data?: unknown;
code: -32603;
}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. SeeJSON-RPC 2.0 Error Object <details> <summary>Example: Unexpected errorPermalink
{ "code": -32603, "message": "Internal error"} Copy message: stringPermalink A short description of the error. The message SHOULD be limited to a concise single sentence. Inherited from Error.message data?: unknownPermalink Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). Inherited from Error.data code: -32603Permalink The error type that occurred. Overrides Error.code
InvalidParamsError
interface InvalidParamsError {
message: string;
data?: unknown;
code: -32602;
}A JSON-RPC error indicating that the method parameters are invalid or malformed. In MCP, this error is returned in various contexts when request parameters fail validation: <ul> <li>Tools: Unknown tool name or invalid tool arguments <li>Prompts: Unknown prompt name or missing required arguments <li>Pagination: Invalid or expired cursor values <li>Logging: Invalid log level <li>Elicitation: Server requests an elicitation mode not declared in client capabilities <li>Sampling: Missing tool result or tool results mixed with other content SeeJSON-RPC 2.0 Error Object <details> <summary>Example: Unknown toolPermalink
{ "code": -32602, "message": "Unknown tool: invalid_tool_name"} Copy <details> <summary>Example: Invalid tool argumentsPermalink{ "code": -32602, "message": "Invalid arguments for tool calculate: Missing required property 'expression'"} Copy <details> <summary>Example: Unknown promptPermalink{ "code": -32602, "message": "Unknown prompt: invalid_prompt_name"} Copy <details> <summary>Example: Invalid cursorPermalink{ "code": -32602, "message": "Invalid cursor"} Copy message: stringPermalink A short description of the error. The message SHOULD be limited to a concise single sentence. Inherited from Error.message data?: unknownPermalink Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). Inherited from Error.data code: -32602Permalink The error type that occurred. Overrides Error.code
InvalidRequestError
interface InvalidRequestError {
message: string;
data?: unknown;
code: -32600;
}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 jsonrpc or method, or using invalid types for these fields). SeeJSON-RPC 2.0 Error Object message: stringPermalink A short description of the error. The message SHOULD be limited to a concise single sentence. Inherited from Error.message data?: unknownPermalink Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). Inherited from Error.data code: -32600Permalink The error type that occurred. Overrides Error.code
MethodNotFoundError
interface MethodNotFoundError {
message: string;
data?: unknown;
code: -32601;
}A JSON-RPC error indicating that the requested method does not exist or is not available. In MCP, a server returns this error when a client invokes a method the server does not implement — either a genuinely unknown method, or one gated behind a server capability the server did not advertise (e.g., calling prompts/list when the prompts capability was not advertised). A request that requires a client capability the client did not declare is signalled instead by MissingRequiredClientCapabilityError (-32021). SeeJSON-RPC 2.0 Error Object <details> <summary>Example: Prompts not supportedPermalink
{ "code": -32601, "message": "Prompts not supported", "data": { "reason": "Server does not support the prompts capability" }} Copy message: stringPermalink A short description of the error. The message SHOULD be limited to a concise single sentence. Inherited from Error.message data?: unknownPermalink Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). Inherited from Error.data code: -32601Permalink The error type that occurred. Overrides Error.code
MISSING_REQUIRED_CLIENT_CAPABILITY
MISSING_REQUIRED_CLIENT_CAPABILITY: -32021Error code returned when a server requires a client capability that was
not declared in the request’s clientCapabilities.
MissingRequiredClientCapabilityError
interface MissingRequiredClientCapabilityError {
jsonrpc: “2.0”;
id?: RequestId;
error: Error & {
code: -32021;
data: { requiredCapabilities: ClientCapabilities };
};
}Returned when processing a request requires a capability the client did not
declare in clientCapabilities. For HTTP, the response status code MUST be 400 Bad Request. <details> <summary>Example: Missing elicitation capabilityPermalink
{ "jsonrpc": "2.0", "id": 1, "error": { "code": -32021, "message": "Server requires the elicitation capability for this request", "data": { "requiredCapabilities": { "elicitation": {} } } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCErrorResponse.jsonrpc id?: RequestIdPermalink Inherited from JSONRPCErrorResponse.id error: Error & { code: -32021; data: { requiredCapabilities: ClientCapabilities }; }Permalink
ParseError
interface ParseError {
message: string;
data?: unknown;
code: -32700;
}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. SeeJSON-RPC 2.0 Error Object <details> <summary>Example: Invalid JSONPermalink
{ "code": -32700, "message": "Parse error: Invalid JSON"} Copy message: stringPermalink A short description of the error. The message SHOULD be limited to a concise single sentence. Inherited from Error.message data?: unknownPermalink Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). Inherited from Error.data code: -32700Permalink The error type that occurred. Overrides Error.code
UNSUPPORTED_PROTOCOL_VERSION
UNSUPPORTED_PROTOCOL_VERSION: -32022Error code returned when the request’s protocol version is not supported by the server.
UnsupportedProtocolVersionError
interface UnsupportedProtocolVersionError {
jsonrpc: “2.0”;
id?: RequestId;
error: Error & {
code: -32022;
data: { supported: string[]; requested: string };
};
}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. <details> <summary>Example: Unsupported protocol versionPermalink
{ "jsonrpc": "2.0", "id": 1, "error": { "code": -32022, "message": "Unsupported protocol version", "data": { "supported": [ "2026-07-28", "2025-11-25" ], "requested": "1900-01-01" } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCErrorResponse.jsonrpc id?: RequestIdPermalink Inherited from JSONRPCErrorResponse.id error: Error & { code: -32022; data: { supported: string[]; requested: string }; }Permalink
Content
AudioContent
interface AudioContent {
type: “audio”;
data: string;
mimeType: string;
annotations?: Annotations;
_meta?: MetaObject;
}Audio provided to or from an LLM. <details> <summary>Example: `audio/wav` contentPermalink
{ "type": "audio", "data": "UklGRiQAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA=", "mimeType": "audio/wav"} Copy type: “audio”Permalink data: stringPermalink The base64-encoded audio data. mimeType: stringPermalink The MIME type of the audio. Different providers may support different audio types. annotations?: AnnotationsPermalink Optional annotations for the client. _meta?: MetaObjectPermalink
BlobResourceContents
interface BlobResourceContents {
uri: string;
mimeType?: string;
_meta?: MetaObject;
blob: string;
} <details> <summary>Example: Image file contentsPermalink
{ "uri": "file:///example.png", "mimeType": "image/png", "blob": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="} Copy uri: stringPermalink The URI of this resource. Inherited from ResourceContents.uri mimeType?: stringPermalink The MIME type of this resource, if known. Inherited from ResourceContents.mimeType _meta?: MetaObjectPermalink Inherited from ResourceContents._meta blob: stringPermalink A base64-encoded string representing the binary data of the item.
ContentBlock
ContentBlock:
| TextContent
| ImageContent
| AudioContent
| ResourceLink
| EmbeddedResource
EmbeddedResource
interface EmbeddedResource {
type: “resource”;
resource: TextResourceContents | BlobResourceContents;
annotations?: Annotations;
_meta?: MetaObject;
}The contents of a resource, embedded into a prompt or tool call result. It is up to the client how best to render embedded resources for the benefit
of the LLM and/or the user. <details> <summary>Example: Embedded file resource with annotationsPermalink
{ "type": "resource", "resource": { "uri": "file:///project/src/main.rs", "mimeType": "text/x-rust", "text": "fn main() {\n println!(\"Hello world!\");\n}" }, "annotations": { "audience": ["user", "assistant"], "priority": 0.7, "lastModified": "2025-05-03T14:30:00Z" }} Copy type: “resource”Permalink resource: TextResourceContents | BlobResourceContentsPermalink annotations?: AnnotationsPermalink Optional annotations for the client. _meta?: MetaObjectPermalink
ImageContent
interface ImageContent {
type: “image”;
data: string;
mimeType: string;
annotations?: Annotations;
_meta?: MetaObject;
}An image provided to or from an LLM. <details> <summary>Example: `image/png` content with annotationsPermalink
{ "type": "image", "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==", "mimeType": "image/png", "annotations": { "audience": ["user"], "priority": 0.9 }} Copy type: “image”Permalink data: stringPermalink The base64-encoded image data. mimeType: stringPermalink The MIME type of the image. Different providers may support different image types. annotations?: AnnotationsPermalink Optional annotations for the client. _meta?: MetaObjectPermalink
ResourceLink
interface ResourceLink {
icons?: Icon[];
name: string;
title?: string;
uri: string;
description?: string;
mimeType?: string;
annotations?: Annotations;
size?: number;
_meta?: MetaObject;
type: “resource_link”;
}A resource that the server is capable of reading, included in a prompt or tool call result. Note: resource links returned by tools are not guaranteed to appear in the results of resources/list requests. <details> <summary>Example: File resource linkPermalink
{ "type": "resource_link", "uri": "file:///project/src/main.rs", "name": "main.rs", "description": "Primary application entry point", "mimeType": "text/x-rust"} Copy icons?: Icon[]Permalink Optional set of sized icons that the client can display in a user interface. Clients that support rendering icons MUST support at least the following MIME types: <ul> <li>image/png - PNG images (safe, universal compatibility) <li>image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility) Clients that support rendering icons SHOULD also support: <ul> <li>image/svg+xml - SVG images (scalable but requires security precautions) <li>image/webp - WebP images (modern, efficient format) Inherited from Resource.icons name: stringPermalink Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn’t present). Inherited from Resource.name title?: stringPermalink Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display (except for Tool,
where annotations.title should be given precedence over using name,
if present). Inherited from Resource.title uri: stringPermalink The URI of this resource. Inherited from Resource.uri description?: stringPermalink A description of what this resource represents. This can be used by clients to improve the LLM’s understanding of available resources. It can be thought of like a “hint” to the model. Inherited from Resource.description mimeType?: stringPermalink The MIME type of this resource, if known. Inherited from Resource.mimeType annotations?: AnnotationsPermalink Optional annotations for the client. Inherited from Resource.annotations size?: numberPermalink The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known. This can be used by Hosts to display file sizes and estimate context window usage. Inherited from Resource.size _meta?: MetaObjectPermalink Inherited from Resource._meta type: “resource_link”Permalink
TextContent
interface TextContent {
type: “text”;
text: string;
annotations?: Annotations;
_meta?: MetaObject;
}Text provided to or from an LLM. <details> <summary>Example: Text contentPermalink
{ "type": "text", "text": "Tool result text"} Copy type: “text”Permalink text: stringPermalink The text content of the message. annotations?: AnnotationsPermalink Optional annotations for the client. _meta?: MetaObjectPermalink
TextResourceContents
interface TextResourceContents {
uri: string;
mimeType?: string;
_meta?: MetaObject;
text: string;
} <details> <summary>Example: Text file contentsPermalink
{ "uri": "file:///example.txt", "mimeType": "text/plain", "text": "Resource content"} Copy uri: stringPermalink The URI of this resource. Inherited from ResourceContents.uri mimeType?: stringPermalink The MIME type of this resource, if known. Inherited from ResourceContents.mimeType _meta?: MetaObjectPermalink Inherited from ResourceContents._meta text: stringPermalink The text of the item. This must only be set if the item can actually be represented as text (not binary data).
completion/complete
CompleteRequest
interface CompleteRequest {
jsonrpc: “2.0”;
id: RequestId;
method: “completion/complete”;
params: CompleteRequestParams;
}A request from the client to the server, to ask for completion options. <details> <summary>Example: Completion requestPermalink
{ "jsonrpc": "2.0", "id": "completion-example", "method": "completion/complete", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "ref": { "type": "ref/prompt", "name": "code_review" }, "argument": { "name": "language", "value": "py" } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “completion/complete”Permalink Overrides JSONRPCRequest.method params: CompleteRequestParamsPermalink Overrides JSONRPCRequest.params
CompleteRequestParams
interface CompleteRequestParams {
_meta: RequestMetaObject;
ref: PromptReference | ResourceTemplateReference;
argument: { name: string; value: string };
context?: { arguments?: { [key: string]: string } };
}Parameters for a completion/complete request. <details> <summary>Example: Prompt argument completionPermalink
{ "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "ref": { "type": "ref/prompt", "name": "code_review" }, "argument": { "name": "language", "value": "py" }} Copy <details> <summary>Example: Prompt argument completion with contextPermalink{ "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "ref": { "type": "ref/prompt", "name": "code_review" }, "argument": { "name": "framework", "value": "fla" }, "context": { "arguments": { "language": "python" } }} Copy _meta: RequestMetaObjectPermalink Inherited from RequestParams._meta ref: PromptReference | ResourceTemplateReferencePermalink argument: { name: string; value: string }Permalink The argument’s information Type Declaration <ul> <li> name: string The name of the argument <li> value: string The value of the argument to use for completion matching. context?: { arguments?: { [key: string]: string } }Permalink Additional, optional context for completions Type Declaration <ul> <li> Optionalarguments?: { [key: string]: string } Previously-resolved variables in a URI template or prompt.
CompleteResultResponse
interface CompleteResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: CompleteResult;
}A successful response from the server for a completion/complete request. <details> <summary>Example: Completion result responsePermalink
{ "jsonrpc": "2.0", "id": "completion-example", "result": { "resultType": "complete", "completion": { "values": ["flask"], "total": 1, "hasMore": false } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: CompleteResultPermalink Overrides JSONRPCResultResponse.result
CompleteResult
interface CompleteResult {
_meta?: ResultMetaObject;
resultType: string;
completion: { values: string[]; total?: number; hasMore?: boolean };
[key: string]: unknown;
}The result returned by the server for a completion/complete request. <details> <summary>Example: Single completion valuePermalink
{ "resultType": "complete", "completion": { "values": ["flask"], "total": 1, "hasMore": false }} Copy <details> <summary>Example: Multiple completion values with more availablePermalink{ "resultType": "complete", "completion": { "values": ["python", "pytorch", "pyside"], "total": 10, "hasMore": true }} Copy _meta?: ResultMetaObjectPermalink Inherited from Result._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from Result.resultType completion: { values: string[]; total?: number; hasMore?: boolean }Permalink Type Declaration <ul> <li> values: string[] An array of completion values. Must not exceed 100 items. <li> Optionaltotal?: number The total number of completion options available. This can exceed the number of values actually sent in the response. <li> OptionalhasMore?: boolean Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
PromptReference
interface PromptReference {
name: string;
title?: string;
type: “ref/prompt”;
}Identifies a prompt. name: stringPermalink Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn’t present). Inherited from BaseMetadata.name title?: stringPermalink Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display (except for Tool,
where annotations.title should be given precedence over using name,
if present). Inherited from BaseMetadata.title type: “ref/prompt”Permalink
ResourceTemplateReference
interface ResourceTemplateReference {
type: “ref/resource”;
uri: string;
}A reference to a resource or resource template definition. type: “ref/resource”Permalink uri: stringPermalink The URI or URI template of the resource.
elicitation/create
ElicitRequest
interface ElicitRequest {
method: “elicitation/create”;
params: ElicitRequestParams;
}A request from the server to elicit additional information from the user via the client. <details> <summary>Example: Elicitation requestPermalink
{ "method": "elicitation/create", "params": { "mode": "form", "message": "Please provide your GitHub username", "requestedSchema": { "type": "object", "properties": { "name": { "type": "string", "title": "GitHub Username", "description": "Your GitHub username" } }, "required": ["name"] } }} Copy method: “elicitation/create”Permalink params: ElicitRequestParamsPermalink
ElicitRequestParams
ElicitRequestParams: ElicitRequestFormParams | ElicitRequestURLParamsThe parameters for a request to elicit additional information from the user via the client.
ElicitResult
interface ElicitResult {
action: “accept” | “decline” | “cancel”;
content?: { [key: string]: string | number | boolean | string[] };
}The result returned by the client for an elicitation/create request. <details> <summary>Example: Input single fieldPermalink
{ "action": "accept", "content": { "name": "octocat" }} Copy <details> <summary>Example: Input multiple fieldsPermalink{ "action": "accept", "content": { "name": "Monalisa Octocat", "email": "[email protected]", "age": 30 }} Copy <details> <summary>Example: Accept URL mode (no content)Permalink{ "action": "accept"} Copy action: “accept” | “decline” | “cancel”Permalink The user action in response to the elicitation. <ul> <li>"accept": User submitted the form/confirmed the action <li>"decline": User explicitly declined the action <li>"cancel": User dismissed without making an explicit choice content?: { [key: string]: string | number | boolean | string[] }Permalink The submitted form data, only present when action is "accept" and mode was "form".
Contains values matching the requested schema.
Omitted for out-of-band mode responses.
BooleanSchema
interface BooleanSchema {
type: “boolean”;
title?: string;
description?: string;
default?: boolean;
} <details> <summary>Example: Boolean input schemaPermalink
{ "type": "boolean", "title": "Display Name", "description": "Description text", "default": false} Copy type: “boolean”Permalink title?: stringPermalink description?: stringPermalink default?: booleanPermalink
ElicitRequestFormParams
interface ElicitRequestFormParams {
mode?: “form”;
message: string;
requestedSchema: {
$schema?: string;
type: “object”;
properties: { [key: string]: PrimitiveSchemaDefinition };
required?: string[];
};
}The parameters for a request to elicit non-sensitive information from the user via a form in the client. <details> <summary>Example: Elicit single fieldPermalink
{ "mode": "form", "message": "Please provide your GitHub username", "requestedSchema": { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"] }} Copy <details> <summary>Example: Elicit multiple fieldsPermalink{ "mode": "form", "message": "Please provide your contact information", "requestedSchema": { "type": "object", "properties": { "name": { "type": "string", "description": "Your full name" }, "email": { "type": "string", "format": "email", "description": "Your email address" }, "age": { "type": "number", "minimum": 18, "description": "Your age" } }, "required": ["name", "email"] }} Copy mode?: “form”Permalink The elicitation mode. message: stringPermalink The message to present to the user describing what information is being requested. requestedSchema: { $schema?: string; type: “object”; properties: { [key: string]: PrimitiveSchemaDefinition }; required?: string[]; }Permalink A restricted subset of JSON Schema.
Only top-level properties are allowed, without nesting.
ElicitRequestURLParams
interface ElicitRequestURLParams {
mode: “url”;
message: string;
url: string;
}The parameters for a request to elicit information from the user via a URL in the client. <details> <summary>Example: Elicit sensitive dataPermalink
{ "mode": "url", "url": "https://mcp.example.com/ui/set_api_key", "message": "Please provide your API key to continue."} Copy mode: “url”Permalink The elicitation mode. message: stringPermalink The message to present to the user explaining why the interaction is needed. url: stringPermalink The URL that the user should navigate to.
EnumSchema
EnumSchema:
| SingleSelectEnumSchema
| MultiSelectEnumSchema
| LegacyTitledEnumSchema
LegacyTitledEnumSchema
interface LegacyTitledEnumSchema {
type: “string”;
title?: string;
description?: string;
enum: string[];
enumNames?: string[];
default?: string;
}Use TitledSingleSelectEnumSchema instead.
This interface will be removed in a future version. type: “string”Permalink title?: stringPermalink description?: stringPermalink enum: string[]Permalink enumNames?: string[]Permalink (Legacy) Display names for enum values.
Non-standard according to JSON schema 2020-12. default?: stringPermalink
MultiSelectEnumSchema
MultiSelectEnumSchema:
| UntitledMultiSelectEnumSchema
| TitledMultiSelectEnumSchema
NumberSchema
interface NumberSchema {
type: “number” | “integer”;
title?: string;
description?: string;
minimum?: number;
maximum?: number;
default?: number;
} <details> <summary>Example: Number input schemaPermalink
{ "type": "number", "title": "Display Name", "description": "Description text", "minimum": 0, "maximum": 100, "default": 50} Copy type: “number” | “integer”Permalink title?: stringPermalink description?: stringPermalink minimum?: numberPermalink maximum?: numberPermalink default?: numberPermalink
PrimitiveSchemaDefinition
PrimitiveSchemaDefinition:
| StringSchema
| NumberSchema
| BooleanSchema
| EnumSchemaRestricted schema definitions that only allow primitive types
without nested objects or arrays.
SingleSelectEnumSchema
SingleSelectEnumSchema:
| UntitledSingleSelectEnumSchema
| TitledSingleSelectEnumSchema
StringSchema
interface StringSchema {
type: “string”;
title?: string;
description?: string;
minLength?: number;
maxLength?: number;
format?: “uri” | “email” | “date” | “date-time”;
default?: string;
} <details> <summary>Example: Email input schemaPermalink
{ "type": "string", "title": "Display Name", "description": "Description text", "minLength": 3, "maxLength": 50, "format": "email", "default": "[email protected]"} Copy type: “string”Permalink title?: stringPermalink description?: stringPermalink minLength?: numberPermalink maxLength?: numberPermalink format?: “uri” | “email” | “date” | “date-time”Permalink default?: stringPermalink
TitledMultiSelectEnumSchema
interface TitledMultiSelectEnumSchema {
type: “array”;
title?: string;
description?: string;
minItems?: number;
maxItems?: number;
items: { anyOf: { const: string; title: string }[] };
default?: string[];
}Schema for multiple-selection enumeration with display titles for each option. <details> <summary>Example: Titled color multi-select schemaPermalink
{ "type": "array", "title": "Color Selection", "description": "Choose your favorite colors", "minItems": 1, "maxItems": 2, "items": { "anyOf": [ { "const": "#FF0000", "title": "Red" }, { "const": "#00FF00", "title": "Green" }, { "const": "#0000FF", "title": "Blue" } ] }, "default": ["#FF0000", "#00FF00"]} Copy type: “array”Permalink title?: stringPermalink Optional title for the enum field. description?: stringPermalink Optional description for the enum field. minItems?: numberPermalink Minimum number of items to select. maxItems?: numberPermalink Maximum number of items to select. items: { anyOf: { const: string; title: string }[] }Permalink Schema for array items with enum options and display labels. Type Declaration <ul> <li> anyOf: { const: string; title: string }[] Array of enum options with values and display labels. default?: string[]Permalink Optional default value.
TitledSingleSelectEnumSchema
interface TitledSingleSelectEnumSchema {
type: “string”;
title?: string;
description?: string;
oneOf: { const: string; title: string }[];
default?: string;
}Schema for single-selection enumeration with display titles for each option. <details> <summary>Example: Titled color select schemaPermalink
{ "type": "string", "title": "Color Selection", "description": "Choose your favorite color", "oneOf": [ { "const": "#FF0000", "title": "Red" }, { "const": "#00FF00", "title": "Green" }, { "const": "#0000FF", "title": "Blue" } ], "default": "#FF0000"} Copy type: “string”Permalink title?: stringPermalink Optional title for the enum field. description?: stringPermalink Optional description for the enum field. oneOf: { const: string; title: string }[]Permalink Array of enum options with values and display labels. Type Declaration <ul> <li> const: string The enum value. <li> title: string Display label for this option. default?: stringPermalink Optional default value.
UntitledMultiSelectEnumSchema
interface UntitledMultiSelectEnumSchema {
type: “array”;
title?: string;
description?: string;
minItems?: number;
maxItems?: number;
items: { type: “string”; enum: string[] };
default?: string[];
}Schema for multiple-selection enumeration without display titles for options. <details> <summary>Example: Color multi-select schemaPermalink
{ "type": "array", "title": "Color Selection", "description": "Choose your favorite colors", "minItems": 1, "maxItems": 2, "items": { "type": "string", "enum": ["Red", "Green", "Blue"] }, "default": ["Red", "Green"]} Copy type: “array”Permalink title?: stringPermalink Optional title for the enum field. description?: stringPermalink Optional description for the enum field. minItems?: numberPermalink Minimum number of items to select. maxItems?: numberPermalink Maximum number of items to select. items: { type: “string”; enum: string[] }Permalink Schema for the array items. Type Declaration <ul> <li> type: “string” <li> enum: string[] Array of enum values to choose from. default?: string[]Permalink Optional default value.
UntitledSingleSelectEnumSchema
interface UntitledSingleSelectEnumSchema {
type: “string”;
title?: string;
description?: string;
enum: string[];
default?: string;
}Schema for single-selection enumeration without display titles for options. <details> <summary>Example: Color select schemaPermalink
{ "type": "string", "title": "Color Selection", "description": "Choose your favorite color", "enum": ["Red", "Green", "Blue"], "default": "Red"} Copy type: “string”Permalink title?: stringPermalink Optional title for the enum field. description?: stringPermalink Optional description for the enum field. enum: string[]Permalink Array of enum values to choose from. default?: stringPermalink Optional default value.
notifications/cancelled
CancelledNotification
interface CancelledNotification {
jsonrpc: “2.0”;
method: “notifications/cancelled”;
params: CancelledNotificationParams;
}This notification is sent by the client to indicate that it is cancelling a request it previously issued. On stdio, the server also sends this notification, solely to terminate a subscriptions/listen stream: it references the ID of the subscriptions/listen request that opened the stream. Servers MUST NOT use this notification to cancel any other request. The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished. This notification indicates that the result will be unused, so any associated processing SHOULD cease. <details> <summary>Example: User-requested cancellationPermalink
{ "jsonrpc": "2.0", "method": "notifications/cancelled", "params": { "requestId": "123", "reason": "User requested cancellation" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/cancelled”Permalink Overrides JSONRPCNotification.method params: CancelledNotificationParamsPermalink Overrides JSONRPCNotification.params
CancelledNotificationParams
interface CancelledNotificationParams {
_meta?: NotificationMetaObject;
requestId: RequestId;
reason?: string;
}Parameters for a notifications/cancelled notification. <details> <summary>Example: User-requested cancellationPermalink
{ "requestId": "123", "reason": "User requested cancellation"} Copy _meta?: NotificationMetaObjectPermalink Inherited from NotificationParams._meta requestId: RequestIdPermalink The ID of the request to cancel. This MUST correspond to the ID of a request the client previously issued. reason?: stringPermalink An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
notifications/message
LoggingMessageNotification
interface LoggingMessageNotification {
jsonrpc: “2.0”;
method: “notifications/message”;
params: LoggingMessageNotificationParams;
}JSONRPCNotification of a log message passed from server to client. The client opts in by setting "io.modelcontextprotocol/logLevel" in a request’s _meta. DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. <details> <summary>Example: Log database connection failedPermalink
{ "jsonrpc": "2.0", "method": "notifications/message", "params": { "level": "error", "logger": "database", "data": { "error": "Connection failed", "details": { "host": "localhost", "port": 5432 } } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/message”Permalink Overrides JSONRPCNotification.method params: LoggingMessageNotificationParamsPermalink Overrides JSONRPCNotification.params
LoggingMessageNotificationParams
interface LoggingMessageNotificationParams {
_meta?: NotificationMetaObject;
level: LoggingLevel;
logger?: string;
data: unknown;
}Parameters for a notifications/message notification. DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. <details> <summary>Example: Log database connection failedPermalink
{ "level": "error", "logger": "database", "data": { "error": "Connection failed", "details": { "host": "localhost", "port": 5432 } }} Copy _meta?: NotificationMetaObjectPermalink Inherited from NotificationParams._meta level: LoggingLevelPermalink The severity of this log message. logger?: stringPermalink An optional name of the logger issuing this message. data: unknownPermalink The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
notifications/progress
ProgressNotification
interface ProgressNotification {
jsonrpc: “2.0”;
method: “notifications/progress”;
params: ProgressNotificationParams;
}An out-of-band notification used to inform the receiver of a progress update for a long-running request. <details> <summary>Example: Progress messagePermalink
{ "jsonrpc": "2.0", "method": "notifications/progress", "params": { "progressToken": "oivaizmir", "progress": 50, "total": 100, "message": "Reticulating splines..." }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/progress”Permalink Overrides JSONRPCNotification.method params: ProgressNotificationParamsPermalink Overrides JSONRPCNotification.params
ProgressNotificationParams
interface ProgressNotificationParams {
_meta?: NotificationMetaObject;
progressToken: ProgressToken;
progress: number;
total?: number;
message?: string;
}Parameters for a notifications/progress notification. <details> <summary>Example: Progress messagePermalink
{ "progressToken": "oivaizmir", "progress": 50, "total": 100, "message": "Reticulating splines..."} Copy _meta?: NotificationMetaObjectPermalink Inherited from NotificationParams._meta progressToken: ProgressTokenPermalink The progress token which was given in the initial request, used to associate this notification with the request that is proceeding. progress: numberPermalink The progress thus far. This should increase every time progress is made, even if the total is unknown. total?: numberPermalink Total number of items to process (or total progress required), if known. message?: stringPermalink An optional message describing the current progress.
notifications/prompts/list_changed
PromptListChangedNotification
interface PromptListChangedNotification {
jsonrpc: “2.0”;
method: “notifications/prompts/list_changed”;
params?: NotificationParams;
}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 subscriptions/listen stream when the client requested it via the promptsListChanged filter field. <details> <summary>Example: Prompts list changedPermalink
{ "jsonrpc": "2.0", "method": "notifications/prompts/list_changed", "params": { "_meta": { "io.modelcontextprotocol/subscriptionId": "listen-1" } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/prompts/list_changed”Permalink Overrides JSONRPCNotification.method params?: NotificationParamsPermalink Overrides JSONRPCNotification.params
notifications/resources/list_changed
ResourceListChangedNotification
interface ResourceListChangedNotification {
jsonrpc: “2.0”;
method: “notifications/resources/list_changed”;
params?: NotificationParams;
}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 subscriptions/listen stream when the client requested it via the resourcesListChanged filter field. <details> <summary>Example: Resources list changedPermalink
{ "jsonrpc": "2.0", "method": "notifications/resources/list_changed", "params": { "_meta": { "io.modelcontextprotocol/subscriptionId": "listen-1" } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/resources/list_changed”Permalink Overrides JSONRPCNotification.method params?: NotificationParamsPermalink Overrides JSONRPCNotification.params
notifications/resources/updated
ResourceUpdatedNotification
interface ResourceUpdatedNotification {
jsonrpc: “2.0”;
method: “notifications/resources/updated”;
params: ResourceUpdatedNotificationParams;
}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 resourceSubscriptions field of a subscriptions/listen request. <details> <summary>Example: File resource updated notificationPermalink
{ "jsonrpc": "2.0", "method": "notifications/resources/updated", "params": { "_meta": { "io.modelcontextprotocol/subscriptionId": "listen-1" }, "uri": "file:///project/src/main.rs" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/resources/updated”Permalink Overrides JSONRPCNotification.method params: ResourceUpdatedNotificationParamsPermalink Overrides JSONRPCNotification.params
ResourceUpdatedNotificationParams
interface ResourceUpdatedNotificationParams {
_meta?: NotificationMetaObject;
uri: string;
}Parameters for a notifications/resources/updated notification. <details> <summary>Example: File resource updatedPermalink
{ "uri": "file:///project/src/main.rs"} Copy _meta?: NotificationMetaObjectPermalink Inherited from NotificationParams._meta uri: stringPermalink The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
notifications/subscriptions/acknowledged
SubscriptionsAcknowledgedNotification
interface SubscriptionsAcknowledgedNotification {
jsonrpc: “2.0”;
method: “notifications/subscriptions/acknowledged”;
params: SubscriptionsAcknowledgedNotificationParams;
}Sent by the server to acknowledge that a subscriptions/listen subscription has been
established and to report which notification types it agreed to honor. This notification MUST be the first message the server sends carrying the
subscription’s ID in io.modelcontextprotocol/subscriptionId. The server MUST
NOT send any notification on the subscription before acknowledging it. On
stdio, where every subscription shares one channel, this ordering is defined
per subscription ID and not per channel: messages belonging to other
subscriptions MAY be interleaved before it. <details> <summary>Example: Listen acknowledgedPermalink
{ "jsonrpc": "2.0", "method": "notifications/subscriptions/acknowledged", "params": { "_meta": { "io.modelcontextprotocol/subscriptionId": "listen-1" }, "notifications": { "toolsListChanged": true, "resourceSubscriptions": ["file:///project/config.json"] } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/subscriptions/acknowledged”Permalink Overrides JSONRPCNotification.method params: SubscriptionsAcknowledgedNotificationParamsPermalink Overrides JSONRPCNotification.params
SubscriptionsAcknowledgedNotificationParams
interface SubscriptionsAcknowledgedNotificationParams {
_meta?: NotificationMetaObject;
notifications: SubscriptionFilter;
}Parameters for a notifications/subscriptions/acknowledged notification. _meta?: NotificationMetaObjectPermalink Inherited from NotificationParams._meta notifications: SubscriptionFilterPermalink The subset of requested notification types the server agreed to honor.
Only includes notification types the server actually supports; if the
client requested an unsupported type (e.g., promptsListChanged when
the server has no prompts), it is omitted from this set.
notifications/tools/list_changed
ToolListChangedNotification
interface ToolListChangedNotification {
jsonrpc: “2.0”;
method: “notifications/tools/list_changed”;
params?: NotificationParams;
}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 subscriptions/listen stream when the client requested it via the toolsListChanged filter field. <details> <summary>Example: Tools list changedPermalink
{ "jsonrpc": "2.0", "method": "notifications/tools/list_changed", "params": { "_meta": { "io.modelcontextprotocol/subscriptionId": "listen-1" } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/tools/list_changed”Permalink Overrides JSONRPCNotification.method params?: NotificationParamsPermalink Overrides JSONRPCNotification.params
Multi Round-Trip
InputRequests
InputRequests: anyA map of server-initiated requests that the client must fulfill. Keys are server-assigned identifiers; values are the request objects. <details> <summary>Example: Elicitation and sampling input requestsPermalink
{ "github_login": { "method": "elicitation/create", "params": { "mode": "form", "message": "Please provide your GitHub username", "requestedSchema": { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"] } } }, "capital_of_france": { "method": "sampling/createMessage", "params": { "messages": [ { "role": "user", "content": { "type": "text", "text": "What is the capital of France?" } } ], "maxTokens": 100 } }} Copy
InputRequiredResult
interface InputRequiredResult {
_meta?: ResultMetaObject;
resultType: string;
inputRequests?: InputRequests;
requestState?: string;
[key: string]: unknown;
}An InputRequiredResult sent by the server to indicate that additional input is needed
before the request can be completed. At least one of inputRequests or requestState MUST be present. <details> <summary>Example: InputRequiredResult with elicitation and sampling input requests and request statePermalink
{ "resultType": "input_required", "inputRequests": { "github_login": { "method": "elicitation/create", "params": { "message": "Please provide your GitHub username", "requestedSchema": { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"] } } }, "capital_of_france": { "method": "sampling/createMessage", "params": { "messages": [ { "role": "user", "content": { "type": "text", "text": "What is the capital of France?" } } ], "maxTokens": 100 } } }, "requestState": "eyJsb2NhdGlvbiI6Ik5ldyBZb3JrIn0"} Copy <details> <summary>Example: InputRequiredResult with request state only (load shedding)Permalink{ "resultType": "input_required", "requestState": "eyJwcm9ncmVzcyI6IjUwJSIsInN0YXRlIjoicHJvY2Vzc2luZyJ9"} Copy _meta?: ResultMetaObjectPermalink Inherited from Result._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from Result.resultType inputRequests?: InputRequestsPermalink requestState?: stringPermalink
InputResponses
InputResponses: anyA map of client responses to server-initiated requests. Keys correspond to the keys in the InputRequests map; values are the client’s result for each request. <details> <summary>Example: Elicitation and sampling input responsesPermalink
{ "github_login": { "action": "accept", "content": { "name": "octocat" } }, "capital_of_france": { "role": "assistant", "content": { "type": "text", "text": "The capital of France is Paris." }, "model": "claude-3-sonnet-20240307", "stopReason": "endTurn" }} Copy
prompts/get
GetPromptRequest
interface GetPromptRequest {
jsonrpc: “2.0”;
id: RequestId;
method: “prompts/get”;
params: GetPromptRequestParams;
}Used by the client to get a prompt provided by the server. <details> <summary>Example: Get prompt requestPermalink
{ "jsonrpc": "2.0", "id": "get-prompt-example", "method": "prompts/get", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "name": "code_review", "arguments": { "code": "def hello():\n print('world')" } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “prompts/get”Permalink Overrides JSONRPCRequest.method params: GetPromptRequestParamsPermalink Overrides JSONRPCRequest.params
GetPromptRequestParams
interface GetPromptRequestParams {
_meta: RequestMetaObject;
inputResponses?: InputResponses;
requestState?: string;
name: string;
arguments?: { [key: string]: string };
}Parameters for a prompts/get request. <details> <summary>Example: Get code review promptPermalink
{ "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "name": "code_review", "arguments": { "code": "def hello():\n print('world')" }} Copy _meta: RequestMetaObjectPermalink Inherited from InputResponseRequestParams._meta inputResponses?: InputResponsesPermalink Inherited from InputResponseRequestParams.inputResponses requestState?: stringPermalink Inherited from InputResponseRequestParams.requestState name: stringPermalink The name of the prompt or prompt template. arguments?: { [key: string]: string }Permalink Arguments to use for templating the prompt.
GetPromptResultResponse
interface GetPromptResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: InputRequiredResult | GetPromptResult;
}A successful response from the server for a prompts/get request. <details> <summary>Example: Get prompt result responsePermalink
{ "jsonrpc": "2.0", "id": "get-prompt-example", "result": { "resultType": "complete", "description": "Code review prompt", "messages": [ { "role": "user", "content": { "type": "text", "text": "Please review this Python code:\ndef hello():\n print('world')" } } ] }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: InputRequiredResult | GetPromptResultPermalink Overrides JSONRPCResultResponse.result
GetPromptResult
interface GetPromptResult {
_meta?: ResultMetaObject;
resultType: string;
description?: string;
messages: PromptMessage[];
[key: string]: unknown;
}The result returned by the server for a prompts/get request. <details> <summary>Example: Code review promptPermalink
{ "resultType": "complete", "description": "Code review prompt", "messages": [ { "role": "user", "content": { "type": "text", "text": "Please review this Python code:\ndef hello():\n print('world')" } } ]} Copy _meta?: ResultMetaObjectPermalink Inherited from Result._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from Result.resultType description?: stringPermalink An optional description for the prompt. messages: PromptMessage[]Permalink
PromptMessage
interface PromptMessage {
role: Role;
content: ContentBlock;
}Describes a message returned as part of a prompt. This is similar to SamplingMessage, but also supports the embedding of
resources from the MCP server. role: RolePermalink content: ContentBlockPermalink
prompts/list
ListPromptsRequest
interface ListPromptsRequest {
jsonrpc: “2.0”;
id: RequestId;
params: PaginatedRequestParams;
method: “prompts/list”;
}Sent from the client to request a list of prompts and prompt templates the server has. <details> <summary>Example: List prompts requestPermalink
{ "jsonrpc": "2.0", "id": "list-prompts-example", "method": "prompts/list", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} } }} Copy jsonrpc: “2.0”Permalink Inherited from PaginatedRequest.jsonrpc id: RequestIdPermalink Inherited from PaginatedRequest.id params: PaginatedRequestParamsPermalink Inherited from PaginatedRequest.params method: “prompts/list”Permalink Overrides PaginatedRequest.method
ListPromptsResultResponse
interface ListPromptsResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: ListPromptsResult;
}A successful response from the server for a prompts/list request. <details> <summary>Example: List prompts result responsePermalink
{ "jsonrpc": "2.0", "id": "list-prompts-example", "result": { "resultType": "complete", "prompts": [ { "name": "code_review", "title": "Request Code Review", "description": "Asks the LLM to analyze code quality and suggest improvements", "arguments": [ { "name": "code", "description": "The code to review", "required": true } ], "icons": [ { "src": "https://example.com/review-icon.svg", "mimeType": "image/svg+xml", "sizes": ["any"] } ] } ], "nextCursor": "next-page-cursor", "ttlMs": 600000, "cacheScope": "public" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: ListPromptsResultPermalink Overrides JSONRPCResultResponse.result
ListPromptsResult
interface ListPromptsResult {
_meta?: ResultMetaObject;
resultType: string;
nextCursor?: string;
ttlMs: number;
cacheScope: “public” | “private”;
prompts: Prompt[];
[key: string]: unknown;
}The result returned by the server for a prompts/list request. <details> <summary>Example: Prompts list with cursor and TTLPermalink
{ "resultType": "complete", "prompts": [ { "name": "code_review", "title": "Request Code Review", "description": "Asks the LLM to analyze code quality and suggest improvements", "arguments": [ { "name": "code", "description": "The code to review", "required": true } ], "icons": [ { "src": "https://example.com/review-icon.svg", "mimeType": "image/svg+xml", "sizes": ["any"] } ] } ], "nextCursor": "next-page-cursor", "ttlMs": 600000, "cacheScope": "public"} Copy _meta?: ResultMetaObjectPermalink Inherited from PaginatedResult._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from PaginatedResult.resultType nextCursor?: stringPermalink An opaque token representing the pagination position after the last returned result.
If present, there may be more results available. Inherited from PaginatedResult.nextCursor ttlMs: numberPermalink A hint from the server indicating how long (in milliseconds) the
client MAY cache this response before re-fetching. Semantics are
analogous to HTTP Cache-Control max-age. <ul> <li>If 0, The response SHOULD be considered immediately stale,
The client MAY re-fetch every time the result is needed. <li>If positive, the client SHOULD consider the result fresh for this many
milliseconds after receiving the response. Inherited from CacheableResult.ttlMs cacheScope: “public” | “private”Permalink Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private. <ul> <li>"public": The response does not contain user-specific data. Any
client or intermediary (e.g., shared gateway, caching proxy) MAY cache
the response and serve it across authorization contexts. <li>"private": The response MAY be cached and reused only within the
same authorization context. Caches MUST NOT be shared across
authorization contexts (e.g., a different access token requires a
different cache). Inherited from CacheableResult.cacheScope prompts: Prompt[]Permalink
Prompt
interface Prompt {
icons?: Icon[];
name: string;
title?: string;
description?: string;
arguments?: PromptArgument[];
_meta?: MetaObject;
}A prompt or prompt template that the server offers. icons?: Icon[]Permalink Optional set of sized icons that the client can display in a user interface. Clients that support rendering icons MUST support at least the following MIME types: <ul> <li>image/png - PNG images (safe, universal compatibility) <li>image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility) Clients that support rendering icons SHOULD also support: <ul> <li>image/svg+xml - SVG images (scalable but requires security precautions) <li>image/webp - WebP images (modern, efficient format) Inherited from Icons.icons name: stringPermalink Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn’t present). Inherited from BaseMetadata.name title?: stringPermalink Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display (except for Tool,
where annotations.title should be given precedence over using name,
if present). Inherited from BaseMetadata.title description?: stringPermalink An optional description of what this prompt provides arguments?: PromptArgument[]Permalink A list of arguments to use for templating the prompt. _meta?: MetaObjectPermalink
PromptArgument
interface PromptArgument {
name: string;
title?: string;
description?: string;
required?: boolean;
}Describes an argument that a prompt can accept. name: stringPermalink Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn’t present). Inherited from BaseMetadata.name title?: stringPermalink Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display (except for Tool,
where annotations.title should be given precedence over using name,
if present). Inherited from BaseMetadata.title description?: stringPermalink A human-readable description of the argument. required?: booleanPermalink Whether this argument must be provided.
resources/list
ListResourcesRequest
interface ListResourcesRequest {
jsonrpc: “2.0”;
id: RequestId;
params: PaginatedRequestParams;
method: “resources/list”;
}Sent from the client to request a list of resources the server has. <details> <summary>Example: List resources requestPermalink
{ "jsonrpc": "2.0", "id": "list-resources-example", "method": "resources/list", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} } }} Copy jsonrpc: “2.0”Permalink Inherited from PaginatedRequest.jsonrpc id: RequestIdPermalink Inherited from PaginatedRequest.id params: PaginatedRequestParamsPermalink Inherited from PaginatedRequest.params method: “resources/list”Permalink Overrides PaginatedRequest.method
ListResourcesResultResponse
interface ListResourcesResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: ListResourcesResult;
}A successful response from the server for a resources/list request. <details> <summary>Example: List resources result responsePermalink
{ "jsonrpc": "2.0", "id": "list-resources-example", "result": { "resultType": "complete", "resources": [ { "uri": "file:///project/src/main.rs", "name": "main.rs", "title": "Rust Software Application Main File", "description": "Primary application entry point", "mimeType": "text/x-rust", "icons": [ { "src": "https://example.com/rust-file-icon.png", "mimeType": "image/png", "sizes": ["48x48"] } ] } ], "nextCursor": "eyJwYWdlIjogM30=", "ttlMs": 600000, "cacheScope": "private" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: ListResourcesResultPermalink Overrides JSONRPCResultResponse.result
ListResourcesResult
interface ListResourcesResult {
_meta?: ResultMetaObject;
resultType: string;
nextCursor?: string;
ttlMs: number;
cacheScope: “public” | “private”;
resources: Resource[];
[key: string]: unknown;
}The result returned by the server for a resources/list request. <details> <summary>Example: Resources list with cursor and TTLPermalink
{ "resultType": "complete", "resources": [ { "uri": "file:///project/src/main.rs", "name": "main.rs", "title": "Rust Software Application Main File", "description": "Primary application entry point", "mimeType": "text/x-rust", "icons": [ { "src": "https://example.com/rust-file-icon.png", "mimeType": "image/png", "sizes": ["48x48"] } ] } ], "nextCursor": "eyJwYWdlIjogM30=", "ttlMs": 600000, "cacheScope": "private"} Copy _meta?: ResultMetaObjectPermalink Inherited from PaginatedResult._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from PaginatedResult.resultType nextCursor?: stringPermalink An opaque token representing the pagination position after the last returned result.
If present, there may be more results available. Inherited from PaginatedResult.nextCursor ttlMs: numberPermalink A hint from the server indicating how long (in milliseconds) the
client MAY cache this response before re-fetching. Semantics are
analogous to HTTP Cache-Control max-age. <ul> <li>If 0, The response SHOULD be considered immediately stale,
The client MAY re-fetch every time the result is needed. <li>If positive, the client SHOULD consider the result fresh for this many
milliseconds after receiving the response. Inherited from CacheableResult.ttlMs cacheScope: “public” | “private”Permalink Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private. <ul> <li>"public": The response does not contain user-specific data. Any
client or intermediary (e.g., shared gateway, caching proxy) MAY cache
the response and serve it across authorization contexts. <li>"private": The response MAY be cached and reused only within the
same authorization context. Caches MUST NOT be shared across
authorization contexts (e.g., a different access token requires a
different cache). Inherited from CacheableResult.cacheScope resources: Resource[]Permalink
Resource
interface Resource {
icons?: Icon[];
name: string;
title?: string;
uri: string;
description?: string;
mimeType?: string;
annotations?: Annotations;
size?: number;
_meta?: MetaObject;
}A known resource that the server is capable of reading. <details> <summary>Example: File resource with annotationsPermalink
{ "uri": "file:///project/README.md", "name": "README.md", "title": "Project Documentation", "mimeType": "text/markdown", "annotations": { "audience": ["user"], "priority": 0.8, "lastModified": "2025-01-12T15:00:58Z" }} Copy icons?: Icon[]Permalink Optional set of sized icons that the client can display in a user interface. Clients that support rendering icons MUST support at least the following MIME types: <ul> <li>image/png - PNG images (safe, universal compatibility) <li>image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility) Clients that support rendering icons SHOULD also support: <ul> <li>image/svg+xml - SVG images (scalable but requires security precautions) <li>image/webp - WebP images (modern, efficient format) Inherited from Icons.icons name: stringPermalink Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn’t present). Inherited from BaseMetadata.name title?: stringPermalink Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display (except for Tool,
where annotations.title should be given precedence over using name,
if present). Inherited from BaseMetadata.title uri: stringPermalink The URI of this resource. description?: stringPermalink A description of what this resource represents. This can be used by clients to improve the LLM’s understanding of available resources. It can be thought of like a “hint” to the model. mimeType?: stringPermalink The MIME type of this resource, if known. annotations?: AnnotationsPermalink Optional annotations for the client. size?: numberPermalink The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known. This can be used by Hosts to display file sizes and estimate context window usage. _meta?: MetaObjectPermalink
resources/read
ReadResourceRequest
interface ReadResourceRequest {
jsonrpc: “2.0”;
id: RequestId;
method: “resources/read”;
params: ReadResourceRequestParams;
}Sent from the client to the server, to read a specific resource URI. <details> <summary>Example: Read resource requestPermalink
{ "jsonrpc": "2.0", "id": "read-resource-example", "method": "resources/read", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "uri": "file:///project/src/main.rs" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “resources/read”Permalink Overrides JSONRPCRequest.method params: ReadResourceRequestParamsPermalink Overrides JSONRPCRequest.params
ReadResourceRequestParams
interface ReadResourceRequestParams {
_meta: RequestMetaObject;
inputResponses?: InputResponses;
requestState?: string;
uri: string;
}Parameters for a resources/read request. _meta: RequestMetaObjectPermalink Inherited from InputResponseRequestParams._meta inputResponses?: InputResponsesPermalink Inherited from InputResponseRequestParams.inputResponses requestState?: stringPermalink Inherited from InputResponseRequestParams.requestState uri: stringPermalink The URI of the resource. The URI can use any protocol; it is up to the server how to interpret it. Inherited from ResourceRequestParams.uri
ReadResourceResultResponse
interface ReadResourceResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: InputRequiredResult | ReadResourceResult;
}A successful response from the server for a resources/read request. <details> <summary>Example: Read resource result responsePermalink
{ "jsonrpc": "2.0", "id": "read-resource-example", "result": { "resultType": "complete", "contents": [ { "uri": "file:///project/src/main.rs", "mimeType": "text/x-rust", "text": "fn main() {\n println!(\"Hello world!\");\n}" } ] }} Copy <details> <summary>Example: Read resource result response with TTLPermalink{ "jsonrpc": "2.0", "id": "read-resource-with-ttl-example", "result": { "resultType": "complete", "contents": [ { "uri": "file:///project/src/main.rs", "mimeType": "text/x-rust", "text": "fn main() {\n println!(\"Hello world!\");\n}" } ], "ttlMs": 60000, "cacheScope": "private" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: InputRequiredResult | ReadResourceResultPermalink Overrides JSONRPCResultResponse.result
ReadResourceResult
interface ReadResourceResult {
_meta?: ResultMetaObject;
resultType: string;
ttlMs: number;
cacheScope: “public” | “private”;
contents: (TextResourceContents | BlobResourceContents)[];
[key: string]: unknown;
}The result returned by the server for a resources/read request. <details> <summary>Example: File resource contentsPermalink
{ "resultType": "complete", "contents": [ { "uri": "file:///project/src/main.rs", "mimeType": "text/x-rust", "text": "fn main() {\n println!(\"Hello world!\");\n}" } ], "ttlMs": 60000, "cacheScope": "private"} Copy _meta?: ResultMetaObjectPermalink Inherited from CacheableResult._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from CacheableResult.resultType ttlMs: numberPermalink A hint from the server indicating how long (in milliseconds) the
client MAY cache this response before re-fetching. Semantics are
analogous to HTTP Cache-Control max-age. <ul> <li>If 0, The response SHOULD be considered immediately stale,
The client MAY re-fetch every time the result is needed. <li>If positive, the client SHOULD consider the result fresh for this many
milliseconds after receiving the response. Inherited from CacheableResult.ttlMs cacheScope: “public” | “private”Permalink Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private. <ul> <li>"public": The response does not contain user-specific data. Any
client or intermediary (e.g., shared gateway, caching proxy) MAY cache
the response and serve it across authorization contexts. <li>"private": The response MAY be cached and reused only within the
same authorization context. Caches MUST NOT be shared across
authorization contexts (e.g., a different access token requires a
different cache). Inherited from CacheableResult.cacheScope contents: (TextResourceContents | BlobResourceContents)[]Permalink
resources/templates/list
ListResourceTemplatesRequest
interface ListResourceTemplatesRequest {
jsonrpc: “2.0”;
id: RequestId;
params: PaginatedRequestParams;
method: “resources/templates/list”;
}Sent from the client to request a list of resource templates the server has. <details> <summary>Example: List resource templates requestPermalink
{ "jsonrpc": "2.0", "id": "list-resource-templates-example", "method": "resources/templates/list", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} } }} Copy jsonrpc: “2.0”Permalink Inherited from PaginatedRequest.jsonrpc id: RequestIdPermalink Inherited from PaginatedRequest.id params: PaginatedRequestParamsPermalink Inherited from PaginatedRequest.params method: “resources/templates/list”Permalink Overrides PaginatedRequest.method
ListResourceTemplatesResultResponse
interface ListResourceTemplatesResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: ListResourceTemplatesResult;
}A successful response from the server for a resources/templates/list request. <details> <summary>Example: List resource templates result responsePermalink
{ "jsonrpc": "2.0", "id": "list-resource-templates-example", "result": { "resultType": "complete", "resourceTemplates": [ { "uriTemplate": "file:///{path}", "name": "Project Files", "title": "Project Files", "description": "Access files in the project directory", "mimeType": "application/octet-stream", "icons": [ { "src": "https://example.com/folder-icon.png", "mimeType": "image/png", "sizes": ["48x48"] } ] } ], "ttlMs": 3600000, "cacheScope": "public" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: ListResourceTemplatesResultPermalink Overrides JSONRPCResultResponse.result
ListResourceTemplatesResult
interface ListResourceTemplatesResult {
_meta?: ResultMetaObject;
resultType: string;
nextCursor?: string;
ttlMs: number;
cacheScope: “public” | “private”;
resourceTemplates: ResourceTemplate[];
[key: string]: unknown;
}The result returned by the server for a resources/templates/list request. <details> <summary>Example: Resource templates list with cursor and TTLPermalink
{ "resultType": "complete", "resourceTemplates": [ { "uriTemplate": "file:///{path}", "name": "Project Files", "title": "📁 Project Files", "description": "Access files in the project directory", "mimeType": "application/octet-stream", "icons": [ { "src": "https://example.com/folder-icon.png", "mimeType": "image/png", "sizes": ["48x48"] } ] } ], "nextCursor": "next-page-cursor", "ttlMs": 3600000, "cacheScope": "public"} Copy _meta?: ResultMetaObjectPermalink Inherited from PaginatedResult._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from PaginatedResult.resultType nextCursor?: stringPermalink An opaque token representing the pagination position after the last returned result.
If present, there may be more results available. Inherited from PaginatedResult.nextCursor ttlMs: numberPermalink A hint from the server indicating how long (in milliseconds) the
client MAY cache this response before re-fetching. Semantics are
analogous to HTTP Cache-Control max-age. <ul> <li>If 0, The response SHOULD be considered immediately stale,
The client MAY re-fetch every time the result is needed. <li>If positive, the client SHOULD consider the result fresh for this many
milliseconds after receiving the response. Inherited from CacheableResult.ttlMs cacheScope: “public” | “private”Permalink Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private. <ul> <li>"public": The response does not contain user-specific data. Any
client or intermediary (e.g., shared gateway, caching proxy) MAY cache
the response and serve it across authorization contexts. <li>"private": The response MAY be cached and reused only within the
same authorization context. Caches MUST NOT be shared across
authorization contexts (e.g., a different access token requires a
different cache). Inherited from CacheableResult.cacheScope resourceTemplates: ResourceTemplate[]Permalink
ResourceTemplate
interface ResourceTemplate {
icons?: Icon[];
name: string;
title?: string;
uriTemplate: string;
description?: string;
mimeType?: string;
annotations?: Annotations;
_meta?: MetaObject;
}A template description for resources available on the server. icons?: Icon[]Permalink Optional set of sized icons that the client can display in a user interface. Clients that support rendering icons MUST support at least the following MIME types: <ul> <li>image/png - PNG images (safe, universal compatibility) <li>image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility) Clients that support rendering icons SHOULD also support: <ul> <li>image/svg+xml - SVG images (scalable but requires security precautions) <li>image/webp - WebP images (modern, efficient format) Inherited from Icons.icons name: stringPermalink Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn’t present). Inherited from BaseMetadata.name title?: stringPermalink Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display (except for Tool,
where annotations.title should be given precedence over using name,
if present). Inherited from BaseMetadata.title uriTemplate: stringPermalink A URI template (according to RFC 6570) that can be used to construct resource URIs. description?: stringPermalink A description of what this template is for. This can be used by clients to improve the LLM’s understanding of available resources. It can be thought of like a “hint” to the model. mimeType?: stringPermalink The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. annotations?: AnnotationsPermalink Optional annotations for the client. _meta?: MetaObjectPermalink
roots/list
ListRootsRequest
interface ListRootsRequest {
method: “roots/list”;
params?: { _meta?: MetaObject };
}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. This request is typically used when the server needs to understand the file system
structure or access specific locations that the client has permission to read from. <details> <summary>Example: List roots requestPermalink
{ "id": "list-roots-example", "method": "roots/list"} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. method: “roots/list”Permalink params?: { _meta?: MetaObject }Permalink
ListRootsResult
interface ListRootsResult {
roots: Root[];
}The result returned by the client for a roots/list request.
This result contains an array of Root objects, each representing a root directory
or file that the server can operate on. <details> <summary>Example: Single root directoryPermalink
{ "roots": [ { "uri": "file:///home/user/projects/myproject", "name": "My Project" } ]} Copy <details> <summary>Example: Multiple root directoriesPermalink{ "roots": [ { "uri": "file:///home/user/repos/frontend", "name": "Frontend Repository" }, { "uri": "file:///home/user/repos/backend", "name": "Backend Repository" } ]} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. roots: Root[]Permalink
Root
interface Root {
uri: string;
name?: string;
_meta?: MetaObject;
}Represents a root directory or file that the server can operate on. <details> <summary>Example: Project directory rootPermalink
{ "uri": "file:///home/user/projects/myproject", "name": "My Project"} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. uri: stringPermalink The URI identifying the root. This must start with file:// for now.
This restriction may be relaxed in future versions of the protocol to allow
other URI schemes. name?: stringPermalink An optional name for the root. This can be used to provide a human-readable
identifier for the root, which may be useful for display purposes or for
referencing the root in other parts of the application. _meta?: MetaObjectPermalink
sampling/createMessage
CreateMessageRequest
interface CreateMessageRequest {
method: “sampling/createMessage”;
params: CreateMessageRequestParams;
}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. <details> <summary>Example: Sampling requestPermalink
{ "method": "sampling/createMessage", "params": { "messages": [ { "role": "user", "content": { "type": "text", "text": "What is the capital of France?" } } ], "modelPreferences": { "hints": [ { "name": "claude-3-sonnet" } ], "intelligencePriority": 0.8, "speedPriority": 0.5 }, "systemPrompt": "You are a helpful assistant.", "maxTokens": 100 }} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. method: “sampling/createMessage”Permalink params: CreateMessageRequestParamsPermalink
CreateMessageRequestParams
interface CreateMessageRequestParams {
messages: SamplingMessage[];
modelPreferences?: ModelPreferences;
systemPrompt?: string;
includeContext?: “none” | “thisServer” | “allServers”;
temperature?: number;
maxTokens: number;
stopSequences?: string[];
metadata?: JSONObject;
tools?: Tool[];
toolChoice?: ToolChoice;
}Parameters for a sampling/createMessage request. <details> <summary>Example: Basic requestPermalink
{ "messages": [ { "role": "user", "content": { "type": "text", "text": "What is the capital of France?" } } ], "modelPreferences": { "hints": [ { "name": "claude-3-sonnet" } ], "intelligencePriority": 0.8, "speedPriority": 0.5 }, "systemPrompt": "You are a helpful assistant.", "maxTokens": 100} Copy <details> <summary>Example: Request with toolsPermalink{ "messages": [ { "role": "user", "content": { "type": "text", "text": "What's the weather like in Paris and London?" } } ], "tools": [ { "name": "get_weather", "description": "Get current weather for a city", "inputSchema": { "type": "object", "properties": { "city": { "type": "string", "description": "City name" } }, "required": ["city"] } } ], "toolChoice": { "mode": "auto" }, "maxTokens": 1000} Copy <details> <summary>Example: Follow-up request with tool resultsPermalink{ "messages": [ { "role": "user", "content": { "type": "text", "text": "What's the weather like in Paris and London?" } }, { "role": "assistant", "content": [ { "type": "tool_use", "id": "call_abc123", "name": "get_weather", "input": { "city": "Paris" } }, { "type": "tool_use", "id": "call_def456", "name": "get_weather", "input": { "city": "London" } } ] }, { "role": "user", "content": [ { "type": "tool_result", "toolUseId": "call_abc123", "content": [ { "type": "text", "text": "Weather in Paris: 18°C, partly cloudy" } ] }, { "type": "tool_result", "toolUseId": "call_def456", "content": [ { "type": "text", "text": "Weather in London: 15°C, rainy" } ] } ] } ], "tools": [ { "name": "get_weather", "description": "Get current weather for a city", "inputSchema": { "type": "object", "properties": { "city": { "type": "string" } }, "required": ["city"] } } ], "maxTokens": 1000} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. messages: SamplingMessage[]Permalink modelPreferences?: ModelPreferencesPermalink The server’s preferences for which model to select. The client MAY ignore these preferences. systemPrompt?: stringPermalink An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt. includeContext?: “none” | “thisServer” | “allServers”Permalink 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. Default is "none". The values "thisServer" and "allServers" are deprecated (SEP-2596): servers SHOULD
omit this field or use "none", and SHOULD only use the deprecated values if the client declares ClientCapabilities.sampling.context. DeprecatedThe "thisServer" and "allServers" values are deprecated as of protocol version 2025-11-25
(SEP-2596) and will be removed no later than the Sampling feature itself (SEP-2577). Omit this field or use "none". temperature?: numberPermalink maxTokens: numberPermalink The requested maximum number of tokens to sample (to prevent runaway completions). The client MAY choose to sample fewer tokens than the requested maximum. stopSequences?: string[]Permalink metadata?: JSONObjectPermalink Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific. tools?: Tool[]Permalink Tools that the model may use during generation.
The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared. toolChoice?: ToolChoicePermalink Controls how the model uses tools.
The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
Default is { mode: "auto" }.
CreateMessageResult
interface CreateMessageResult {
model: string;
stopReason?: string;
role: Role;
content: SamplingMessageContentBlock | SamplingMessageContentBlock[];
_meta?: MetaObject;
}The result returned by the client for a sampling/createMessage request.
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. <details> <summary>Example: Text responsePermalink
{ "role": "assistant", "content": { "type": "text", "text": "The capital of France is Paris." }, "model": "claude-3-sonnet-20240307", "stopReason": "endTurn"} Copy <details> <summary>Example: Tool use responsePermalink{ "role": "assistant", "content": [ { "type": "tool_use", "id": "call_abc123", "name": "get_weather", "input": { "city": "Paris" } }, { "type": "tool_use", "id": "call_def456", "name": "get_weather", "input": { "city": "London" } } ], "model": "claude-3-sonnet-20240307", "stopReason": "toolUse"} Copy <details> <summary>Example: Final response after tool usePermalink{ "role": "assistant", "content": { "type": "text", "text": "Based on the current weather data:\n\n- **Paris**: 18°C and partly cloudy - quite pleasant!\n- **London**: 15°C and rainy - you'll want an umbrella.\n\nParis has slightly warmer and drier conditions today." }, "model": "claude-3-sonnet-20240307", "stopReason": "endTurn"} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. model: stringPermalink The name of the model that generated the message. stopReason?: stringPermalink The reason why sampling stopped, if known. Standard values: <ul> <li>"endTurn": Natural end of the assistant’s turn <li>"stopSequence": A stop sequence was encountered <li>"maxTokens": Maximum token limit was reached <li>"toolUse": The model wants to use one or more tools This field is an open string to allow for provider-specific stop reasons. role: RolePermalink Inherited from SamplingMessage.role content: SamplingMessageContentBlock | SamplingMessageContentBlock[]Permalink Inherited from SamplingMessage.content _meta?: MetaObjectPermalink Inherited from SamplingMessage._meta
ModelHint
interface ModelHint {
name?: string;
}Hints to use for model selection. Keys not declared here are currently left unspecified by the spec and are up
to the client to interpret. DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. name?: stringPermalink A hint for a model name. The client SHOULD treat this as a substring of a model name; for example: <ul> <li>claude-3-5-sonnet should match claude-3-5-sonnet-20241022 <li>sonnet should match claude-3-5-sonnet-20241022, claude-3-sonnet-20240229, etc. <li>claude should match any Claude model The client MAY also map the string to a different provider’s model name or a different model family, as long as it fills a similar niche; for example: <ul> <li>gemini-1.5-flash could match claude-3-haiku-20240307
ModelPreferences
interface ModelPreferences {
hints?: ModelHint[];
costPriority?: number;
speedPriority?: number;
intelligencePriority?: number;
}The server’s preferences for model selection, requested of the client during sampling. Because LLMs can vary along multiple dimensions, choosing the “best” model is
rarely straightforward. Different models excel in different areas—some are
faster but less capable, others are more capable but more expensive, and so
on. This interface allows servers to express their priorities across multiple
dimensions to help clients make an appropriate selection for their use case. These preferences are always advisory. The client MAY ignore them. It is also
up to the client to decide how to interpret these preferences and how to
balance them against other considerations. <details> <summary>Example: With hints and prioritiesPermalink
{ "hints": [ { "name": "claude-3-sonnet" }, { "name": "claude" } ], "costPriority": 0.3, "speedPriority": 0.8, "intelligencePriority": 0.5} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. hints?: ModelHint[]Permalink Optional hints to use for model selection. If multiple hints are specified, the client MUST evaluate them in order
(such that the first match is taken). The client SHOULD prioritize these hints over the numeric priorities, but
MAY still use the priorities to select from ambiguous matches. costPriority?: numberPermalink How much to prioritize cost when selecting a model. A value of 0 means cost
is not important, while a value of 1 means cost is the most important
factor. speedPriority?: numberPermalink How much to prioritize sampling speed (latency) when selecting a model. A
value of 0 means speed is not important, while a value of 1 means speed is
the most important factor. intelligencePriority?: numberPermalink How much to prioritize intelligence and capabilities when selecting a
model. A value of 0 means intelligence is not important, while a value of 1
means intelligence is the most important factor.
SamplingMessage
interface SamplingMessage {
role: Role;
content: SamplingMessageContentBlock | SamplingMessageContentBlock[];
_meta?: MetaObject;
}Describes a message issued to or received from an LLM API. <details> <summary>Example: Single content blockPermalink
{ "role": "user", "content": { "type": "text", "text": "What is the capital of France?" }} Copy <details> <summary>Example: Multiple content blocksPermalink{ "role": "user", "content": [ { "type": "tool_result", "toolUseId": "call_123", "content": [{ "type": "text", "text": "Result 1" }] }, { "type": "tool_result", "toolUseId": "call_456", "content": [{ "type": "text", "text": "Result 2" }] } ]} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. role: RolePermalink content: SamplingMessageContentBlock | SamplingMessageContentBlock[]Permalink _meta?: MetaObjectPermalink
SamplingMessageContentBlock
SamplingMessageContentBlock:
| TextContent
| ImageContent
| AudioContent
| ToolUseContent
| ToolResultContent DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry.
ToolChoice
interface ToolChoice {
mode?: “none” | “required” | “auto”;
}Controls tool selection behavior for sampling requests. DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. mode?: “none” | “required” | “auto”Permalink Controls the tool use ability of the model: <ul> <li>"auto": Model decides whether to use tools (default) <li>"required": Model MUST use at least one tool before completing <li>"none": Model MUST NOT use any tools
ToolResultContent
interface ToolResultContent {
type: “tool_result”;
toolUseId: string;
content: ContentBlock[];
structuredContent?: unknown;
isError?: boolean;
_meta?: MetaObject;
}The result of a tool use, provided by the user back to the assistant. <details> <summary>Example: `get_weather` tool resultPermalink
{ "type": "tool_result", "toolUseId": "call_abc123", "content": [ { "type": "text", "text": "Weather in Paris: 18°C, partly cloudy" } ]} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. type: “tool_result”Permalink toolUseId: stringPermalink The ID of the tool use this result corresponds to. This MUST match the ID from a previous ToolUseContent. content: ContentBlock[]Permalink The unstructured result content of the tool use. This has the same format as CallToolResult.content and can include text, images,
audio, resource links, and embedded resources. structuredContent?: unknownPermalink An optional structured result value. This can be any JSON value (object, array, string, number, boolean, or null).
If the tool defined an Tool.outputSchema, this SHOULD conform to that schema. isError?: booleanPermalink Whether the tool use resulted in an error. If true, the content typically describes the error that occurred.
Default: false _meta?: MetaObjectPermalink Optional metadata about the tool result. Clients SHOULD preserve this field when
including tool results in subsequent sampling requests to enable caching optimizations.
ToolUseContent
interface ToolUseContent {
type: “tool_use”;
id: string;
name: string;
input: { [key: string]: unknown };
_meta?: MetaObject;
}A request from the assistant to call a tool. <details> <summary>Example: `get_weather` tool usePermalink
{ "type": "tool_use", "id": "call_abc123", "name": "get_weather", "input": { "city": "Paris" }} Copy DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. type: “tool_use”Permalink id: stringPermalink A unique identifier for this tool use. This ID is used to match tool results to their corresponding tool uses. name: stringPermalink The name of the tool to call. input: { [key: string]: unknown }Permalink The arguments to pass to the tool, conforming to the tool’s input schema. _meta?: MetaObjectPermalink Optional metadata about the tool use. Clients SHOULD preserve this field when
including tool uses in subsequent sampling requests to enable caching optimizations.
server/discover
DiscoverRequest
interface DiscoverRequest {
jsonrpc: “2.0”;
id: RequestId;
method: “server/discover”;
params: RequestParams;
}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. <details> <summary>Example: Discover requestPermalink
{ "jsonrpc": "2.0", "id": "discover-1", "method": "server/discover", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “server/discover”Permalink Overrides JSONRPCRequest.method params: RequestParamsPermalink Overrides JSONRPCRequest.params
DiscoverResultResponse
interface DiscoverResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: DiscoverResult;
}A successful response from the server for a server/discover request. <details> <summary>Example: Discover result responsePermalink
{ "jsonrpc": "2.0", "id": "discover-1", "result": { "resultType": "complete", "supportedVersions": ["2026-07-28"], "capabilities": { "tools": {}, "resources": {} }, "_meta": { "io.modelcontextprotocol/serverInfo": { "name": "ExampleServer", "version": "1.0.0" } }, "ttlMs": 3600000, "cacheScope": "public" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: DiscoverResultPermalink Overrides JSONRPCResultResponse.result
DiscoverResult
interface DiscoverResult {
_meta?: ResultMetaObject;
resultType: string;
supportedVersions: string[];
capabilities: ServerCapabilities;
instructions?: string;
ttlMs: number;
cacheScope: “public” | “private”;
[key: string]: unknown;
}The result returned by the server for a server/discover request. <details> <summary>Example: Server capabilities discoveryPermalink
{ "resultType": "complete", "supportedVersions": ["2026-07-28"], "capabilities": { "tools": {}, "resources": {} }, "_meta": { "io.modelcontextprotocol/serverInfo": { "name": "ExampleServer", "version": "1.0.0" } }, "instructions": "This server provides weather and resource utilities. Prefer `get_weather` for forecast lookups.", "ttlMs": 3600000, "cacheScope": "public"} Copy _meta?: ResultMetaObjectPermalink Inherited from CacheableResult._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from CacheableResult.resultType supportedVersions: string[]Permalink MCP Protocol Versions this server supports. The client should choose a
version from this list for use in subsequent requests. capabilities: ServerCapabilitiesPermalink The capabilities of the server. instructions?: stringPermalink Natural-language guidance describing the server and its features. This can be used by clients to improve an LLM’s understanding of
available tools (e.g., by including it in a system prompt). It should
focus on information that helps the model use the server effectively
and should not duplicate information already in tool descriptions. ttlMs: numberPermalink A hint from the server indicating how long (in milliseconds) the
client MAY cache this response before re-fetching. Semantics are
analogous to HTTP Cache-Control max-age. <ul> <li>If 0, The response SHOULD be considered immediately stale,
The client MAY re-fetch every time the result is needed. <li>If positive, the client SHOULD consider the result fresh for this many
milliseconds after receiving the response. Inherited from CacheableResult.ttlMs cacheScope: “public” | “private”Permalink Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private. <ul> <li>"public": The response does not contain user-specific data. Any
client or intermediary (e.g., shared gateway, caching proxy) MAY cache
the response and serve it across authorization contexts. <li>"private": The response MAY be cached and reused only within the
same authorization context. Caches MUST NOT be shared across
authorization contexts (e.g., a different access token requires a
different cache). Inherited from CacheableResult.cacheScope
ClientCapabilities
interface ClientCapabilities {
experimental?: { [key: string]: JSONObject };
roots?: {};
sampling?: { context?: JSONObject; tools?: JSONObject };
elicitation?: { form?: JSONObject; url?: JSONObject };
extensions?: { [key: string]: JSONObject };
}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. experimental?: { [key: string]: JSONObject }Permalink Experimental, non-standard capabilities that the client supports. roots?: {}Permalink Present if the client supports listing roots. DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. <details> <summary>Example: Roots — minimum baseline supportPermalink
{ "roots": {}} Copy sampling?: { context?: JSONObject; tools?: JSONObject }Permalink Present if the client supports sampling from an LLM. Type Declaration <ul> <li> Optionalcontext?: JSONObject Whether the client supports context inclusion via includeContext parameter.
If not declared, servers SHOULD only use includeContext: "none" (or omit it). <li> Optionaltools?: JSONObject Whether the client supports tool use via tools and toolChoice parameters. DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. <details> <summary>Example: Sampling — minimum baseline supportPermalink{ "sampling": {}} Copy <details> <summary>Example: Sampling — tool use supportPermalink{ "sampling": { "tools": {} }} Copy <details> <summary>Example: Sampling — context inclusion support (deprecated)Permalink{ "sampling": { "context": {} }} Copy elicitation?: { form?: JSONObject; url?: JSONObject }Permalink Present if the client supports elicitation from the server. <details> <summary>Example: Elicitation — form and URL mode supportPermalink{ "elicitation": { "form": {}, "url": {} }} Copy <details> <summary>Example: Elicitation — form mode only (implicit)Permalink{ "elicitation": {}} Copy extensions?: { [key: string]: JSONObject }Permalink Optional MCP extensions that the client supports. Keys are extension identifiers
(e.g., “io.modelcontextprotocol/oauth-client-credentials”), and values are
per-extension settings objects. An empty object indicates support with no settings. Keys MUST follow the _meta key naming rules, with a
mandatory prefix. <details> <summary>Example: Extensions — MCP Apps (UI) extension with MIME type supportPermalink{ "extensions": { "io.modelcontextprotocol/ui": { "mimeTypes": ["text/html;profile=mcp-app"] } }} Copy
Implementation
interface Implementation {
icons?: Icon[];
name: string;
title?: string;
version: string;
description?: string;
websiteUrl?: string;
}Describes the MCP implementation. icons?: Icon[]Permalink Optional set of sized icons that the client can display in a user interface. Clients that support rendering icons MUST support at least the following MIME types: <ul> <li>image/png - PNG images (safe, universal compatibility) <li>image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility) Clients that support rendering icons SHOULD also support: <ul> <li>image/svg+xml - SVG images (scalable but requires security precautions) <li>image/webp - WebP images (modern, efficient format) Inherited from Icons.icons name: stringPermalink Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn’t present). Inherited from BaseMetadata.name title?: stringPermalink Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display (except for Tool,
where annotations.title should be given precedence over using name,
if present). Inherited from BaseMetadata.title version: stringPermalink The version of this implementation. description?: stringPermalink An optional human-readable description of what this implementation does. This can be used by clients or servers to provide context about their purpose
and capabilities. For example, a server might describe the types of resources
or tools it provides, while a client might describe its intended use case. websiteUrl?: stringPermalink An optional URL of the website for this implementation.
ServerCapabilities
interface ServerCapabilities {
experimental?: { [key: string]: JSONObject };
logging?: JSONObject;
completions?: JSONObject;
prompts?: { listChanged?: boolean };
resources?: { subscribe?: boolean; listChanged?: boolean };
tools?: { listChanged?: boolean };
extensions?: { [key: string]: JSONObject };
}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. experimental?: { [key: string]: JSONObject }Permalink Experimental, non-standard capabilities that the server supports. logging?: JSONObjectPermalink Present if the server supports sending log messages to the client. DeprecatedDeprecated as of protocol version 2026-07-28 (SEP-2577).
Remains in the specification for at least twelve months; see the
deprecated features registry. <details> <summary>Example: Logging — minimum baseline supportPermalink
{ "logging": {}} Copy completions?: JSONObjectPermalink Present if the server supports argument autocompletion suggestions. <details> <summary>Example: Completions — minimum baseline supportPermalink{ "completions": {}} Copy prompts?: { listChanged?: boolean }Permalink Present if the server offers any prompt templates. Type Declaration <ul> <li> OptionallistChanged?: boolean Whether this server supports notifications for changes to the prompt list. <details> <summary>Example: Prompts — minimum baseline supportPermalink{ "prompts": {}} Copy <details> <summary>Example: Prompts — list changed notificationsPermalink{ "prompts": { "listChanged": true }} Copy resources?: { subscribe?: boolean; listChanged?: boolean }Permalink Present if the server offers any resources to read. Type Declaration <ul> <li> Optionalsubscribe?: boolean Whether this server supports subscribing to resource updates. <li> OptionallistChanged?: boolean Whether this server supports notifications for changes to the resource list. <details> <summary>Example: Resources — minimum baseline supportPermalink{ "resources": {}} Copy <details> <summary>Example: Resources — subscription to individual resource updates (only)Permalink{ "resources": { "subscribe": true }} Copy <details> <summary>Example: Resources — list changed notifications (only)Permalink{ "resources": { "listChanged": true }} Copy <details> <summary>Example: Resources — all notificationsPermalink{ "resources": { "subscribe": true, "listChanged": true }} Copy tools?: { listChanged?: boolean }Permalink Present if the server offers any tools to call. Type Declaration <ul> <li> OptionallistChanged?: boolean Whether this server supports notifications for changes to the tool list. <details> <summary>Example: Tools — minimum baseline supportPermalink{ "tools": {}} Copy <details> <summary>Example: Tools — list changed notificationsPermalink{ "tools": { "listChanged": true }} Copy extensions?: { [key: string]: JSONObject }Permalink Optional MCP extensions that the server supports. Keys are extension identifiers
(e.g., “io.modelcontextprotocol/tasks”), and values are per-extension settings
objects. An empty object indicates support with no settings. Keys MUST follow the _meta key naming rules, with a
mandatory prefix. <details> <summary>Example: Extensions — Tasks extension supportPermalink{ "extensions": { "io.modelcontextprotocol/tasks": {} }} Copy
subscriptions/listen
SubscriptionsListenRequest
interface SubscriptionsListenRequest {
jsonrpc: “2.0”;
id: RequestId;
method: “subscriptions/listen”;
params: SubscriptionsListenRequestParams;
}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. <details> <summary>Example: Listen for tools and resource list changesPermalink
{ "jsonrpc": "2.0", "id": "listen-1", "method": "subscriptions/listen", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "notifications": { "toolsListChanged": true, "resourceSubscriptions": ["file:///project/config.json"] } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “subscriptions/listen”Permalink Overrides JSONRPCRequest.method params: SubscriptionsListenRequestParamsPermalink Overrides JSONRPCRequest.params
SubscriptionsListenRequestParams
interface SubscriptionsListenRequestParams {
_meta: RequestMetaObject;
notifications: SubscriptionFilter;
}Parameters for a subscriptions/listen request. _meta: RequestMetaObjectPermalink Inherited from RequestParams._meta notifications: SubscriptionFilterPermalink The notifications the client opts in to on this stream. The server MUST NOT send notification types the client has not explicitly
requested.
SubscriptionsListenResultResponse
interface SubscriptionsListenResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: SubscriptionsListenResult;
}A successful response from the server for a subscriptions/listen
request, sent when the server tears the subscription down gracefully. <details> <summary>Example: Subscription closed gracefully responsePermalink
{ "jsonrpc": "2.0", "id": "listen-1", "result": { "resultType": "complete", "_meta": { "io.modelcontextprotocol/subscriptionId": "listen-1" } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: SubscriptionsListenResultPermalink Overrides JSONRPCResultResponse.result
SubscriptionsListenResult
interface SubscriptionsListenResult {
resultType: string;
_meta: SubscriptionsListenResultMetaObject;
[key: string]: unknown;
}The response to a subscriptions/listen
request, 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. <details> <summary>Example: Subscription closed gracefullyPermalink
{ "resultType": "complete", "_meta": { "io.modelcontextprotocol/subscriptionId": "listen-1" }} Copy resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from Result.resultType _meta: SubscriptionsListenResultMetaObjectPermalink Overrides Result._meta
SubscriptionFilter
interface SubscriptionFilter {
toolsListChanged?: boolean;
promptsListChanged?: boolean;
resourcesListChanged?: boolean;
resourceSubscriptions?: string[];
}The set of notification types a client may opt in to on a subscriptions/listen request. Each notification type is opt-in; the server MUST NOT send
notification types the client has not explicitly requested here. toolsListChanged?: booleanPermalink If true, receive notifications/tools/list_changed. promptsListChanged?: booleanPermalink If true, receive notifications/prompts/list_changed. resourcesListChanged?: booleanPermalink If true, receive notifications/resources/list_changed. resourceSubscriptions?: string[]Permalink Subscribe to notifications/resources/updated for these resource URIs.
Replaces the former resources/subscribe RPC.
SubscriptionsListenResultMetaObject
interface SubscriptionsListenResultMetaObject {
“io.modelcontextprotocol/serverInfo”?: Implementation;
“io.modelcontextprotocol/subscriptionId”: RequestId;
[key: string]: unknown;
}Extends ResultMetaObject with the subscription-stream identifier carried by a SubscriptionsListenResult. All key naming rules from MetaObject apply. SeeMetaObject for key naming rules and reserved prefixes. “io.modelcontextprotocol/serverInfo”?: ImplementationPermalink Identifies the server software producing the response. Servers SHOULD
include this field on every response unless specifically configured not
to do so. The Implementation schema requires name and version; other
fields are optional. The value is self-reported by the server and is not verified by the
protocol. It is intended for display, logging, and debugging. Clients
SHOULD NOT use it to change their behavior, and SHOULD NOT rely on it for
security decisions. Inherited from ResultMetaObject.io.modelcontextprotocol/serverInfo “io.modelcontextprotocol/subscriptionId”: RequestIdPermalink Identifies the subscription stream this response closes, so the client can
correlate it with the originating subscription — mirroring the same key on
the stream’s notifications. The value is the JSON-RPC ID of the subscriptions/listen request that opened the stream (and equals this
response’s id).
tools/call
CallToolRequest
interface CallToolRequest {
jsonrpc: “2.0”;
id: RequestId;
method: “tools/call”;
params: CallToolRequestParams;
}Used by the client to invoke a tool provided by the server. <details> <summary>Example: Call tool requestPermalink
{ "jsonrpc": "2.0", "id": "call-tool-example", "method": "tools/call", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "name": "get_weather", "arguments": { "location": "New York" } }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “tools/call”Permalink Overrides JSONRPCRequest.method params: CallToolRequestParamsPermalink Overrides JSONRPCRequest.params
CallToolRequestParams
interface CallToolRequestParams {
_meta: RequestMetaObject;
inputResponses?: InputResponses;
requestState?: string;
name: string;
arguments?: { [key: string]: unknown };
}Parameters for a tools/call request. <details> <summary>Example: `get_weather` tool call paramsPermalink
{ "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} }, "name": "get_weather", "arguments": { "location": "New York" }} Copy <details> <summary>Example: Tool call params with progress tokenPermalink{ "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {}, "progressToken": "oivaizmir" }, "name": "build_simulation", "arguments": { "city": "Micropolis" }} Copy _meta: RequestMetaObjectPermalink Inherited from InputResponseRequestParams._meta inputResponses?: InputResponsesPermalink Inherited from InputResponseRequestParams.inputResponses requestState?: stringPermalink Inherited from InputResponseRequestParams.requestState name: stringPermalink The name of the tool. arguments?: { [key: string]: unknown }Permalink Arguments to use for the tool call.
CallToolResultResponse
interface CallToolResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: InputRequiredResult | CallToolResult;
}A successful response from the server for a tools/call request. <details> <summary>Example: Call tool result responsePermalink
{ "jsonrpc": "2.0", "id": "call-tool-example", "result": { "resultType": "complete", "content": [ { "type": "text", "text": "Current weather in New York:\nTemperature: 72°F\nConditions: Partly cloudy" } ], "isError": false }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: InputRequiredResult | CallToolResultPermalink Overrides JSONRPCResultResponse.result
CallToolResult
interface CallToolResult {
_meta?: ResultMetaObject;
resultType: string;
content: ContentBlock[];
structuredContent?: unknown;
isError?: boolean;
[key: string]: unknown;
}The result returned by the server for a tools/call request. <details> <summary>Example: Result with unstructured textPermalink
{ "resultType": "complete", "content": [ { "type": "text", "text": "Current weather in New York:\nTemperature: 72°F\nConditions: Partly cloudy" } ], "isError": false} Copy <details> <summary>Example: Result with structured contentPermalink{ "resultType": "complete", "content": [ { "type": "text", "text": "{\"temperature\": 22.5, \"conditions\": \"Partly cloudy\", \"humidity\": 65}" } ], "structuredContent": { "temperature": 22.5, "conditions": "Partly cloudy", "humidity": 65 }} Copy <details> <summary>Example: Invalid tool input errorPermalink{ "resultType": "complete", "content": [ { "type": "text", "text": "Invalid departure date: must be in the future. Current date is 08/08/2025." } ], "isError": true} Copy _meta?: ResultMetaObjectPermalink Inherited from Result._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from Result.resultType content: ContentBlock[]Permalink A list of content objects that represent the unstructured result of the tool call. structuredContent?: unknownPermalink An optional JSON value that represents the structured result of the tool call. This can be any JSON value (object, array, string, number, boolean, or null)
that conforms to the tool’s outputSchema if one is defined. isError?: booleanPermalink Whether the tool call ended in an error. If not set, this is assumed to be false (the call was successful). Any errors that originate from the tool SHOULD be reported inside the result
object, with isError set to true, not as an MCP protocol-level error
response. Otherwise, the LLM would not be able to see that an error occurred
and self-correct. However, any errors in finding the tool, an error indicating that the
server does not support tool calls, or any other exceptional conditions,
should be reported as an MCP error response.
tools/list
ListToolsRequest
interface ListToolsRequest {
jsonrpc: “2.0”;
id: RequestId;
params: PaginatedRequestParams;
method: “tools/list”;
}Sent from the client to request a list of tools the server has. <details> <summary>Example: List tools requestPermalink
{ "jsonrpc": "2.0", "id": "list-tools-example", "method": "tools/list", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" }, "io.modelcontextprotocol/clientCapabilities": {} } }} Copy jsonrpc: “2.0”Permalink Inherited from PaginatedRequest.jsonrpc id: RequestIdPermalink Inherited from PaginatedRequest.id params: PaginatedRequestParamsPermalink Inherited from PaginatedRequest.params method: “tools/list”Permalink Overrides PaginatedRequest.method
ListToolsResultResponse
interface ListToolsResultResponse {
jsonrpc: “2.0”;
id: RequestId;
result: ListToolsResult;
}A successful response from the server for a tools/list request. <details> <summary>Example: List tools result responsePermalink
{ "jsonrpc": "2.0", "id": "list-tools-example", "result": { "resultType": "complete", "tools": [ { "name": "get_weather", "title": "Weather Information Provider", "description": "Get current weather information for a location", "inputSchema": { "type": "object", "properties": { "location": { "type": "string", "description": "City name or zip code" } }, "required": ["location"] }, "icons": [ { "src": "https://example.com/weather-icon.png", "mimeType": "image/png", "sizes": ["48x48"] } ] } ], "nextCursor": "next-page-cursor", "ttlMs": 3600000, "cacheScope": "public" }} Copy jsonrpc: “2.0”Permalink Inherited from JSONRPCResultResponse.jsonrpc id: RequestIdPermalink Inherited from JSONRPCResultResponse.id result: ListToolsResultPermalink Overrides JSONRPCResultResponse.result
ListToolsResult
interface ListToolsResult {
_meta?: ResultMetaObject;
resultType: string;
nextCursor?: string;
ttlMs: number;
cacheScope: “public” | “private”;
tools: Tool[];
[key: string]: unknown;
}The result returned by the server for a tools/list request. <details> <summary>Example: Tools list with cursor and TTLPermalink
{ "resultType": "complete", "tools": [ { "name": "get_weather", "title": "Weather Information Provider", "description": "Get current weather information for a location", "inputSchema": { "type": "object", "properties": { "location": { "type": "string", "description": "City name or zip code" } }, "required": ["location"] }, "icons": [ { "src": "https://example.com/weather-icon.png", "mimeType": "image/png", "sizes": ["48x48"] } ] } ], "nextCursor": "next-page-cursor", "ttlMs": 300000, "cacheScope": "public"} Copy _meta?: ResultMetaObjectPermalink Inherited from PaginatedResult._meta resultType: stringPermalink Indicates the type of the result, which allows the client to determine
how to parse the result object. Servers implementing this protocol version MUST include this field.
For backward compatibility, when a client receives a result from a
server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete". Inherited from PaginatedResult.resultType nextCursor?: stringPermalink An opaque token representing the pagination position after the last returned result.
If present, there may be more results available. Inherited from PaginatedResult.nextCursor ttlMs: numberPermalink A hint from the server indicating how long (in milliseconds) the
client MAY cache this response before re-fetching. Semantics are
analogous to HTTP Cache-Control max-age. <ul> <li>If 0, The response SHOULD be considered immediately stale,
The client MAY re-fetch every time the result is needed. <li>If positive, the client SHOULD consider the result fresh for this many
milliseconds after receiving the response. Inherited from CacheableResult.ttlMs cacheScope: “public” | “private”Permalink Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private. <ul> <li>"public": The response does not contain user-specific data. Any
client or intermediary (e.g., shared gateway, caching proxy) MAY cache
the response and serve it across authorization contexts. <li>"private": The response MAY be cached and reused only within the
same authorization context. Caches MUST NOT be shared across
authorization contexts (e.g., a different access token requires a
different cache). Inherited from CacheableResult.cacheScope tools: Tool[]Permalink
Tool
interface Tool {
icons?: Icon[];
name: string;
title?: string;
description?: string;
inputSchema: { $schema?: string; type: “object”; [key: string]: unknown };
outputSchema?: { $schema?: string; [key: string]: unknown };
annotations?: ToolAnnotations;
_meta?: MetaObject;
}Definition for a tool the client can call. <details> <summary>Example: With default 2020-12 input schemaPermalink
{ "name": "calculate_sum", "description": "Add two numbers", "inputSchema": { "type": "object", "properties": { "a": { "type": "number" }, "b": { "type": "number" } }, "required": ["a", "b"] }} Copy <details> <summary>Example: With explicit draft-07 input schemaPermalink{ "name": "calculate_sum", "description": "Add two numbers", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "a": { "type": "number" }, "b": { "type": "number" } }, "required": ["a", "b"] }} Copy <details> <summary>Example: With no parametersPermalink{ "name": "get_current_time", "description": "Returns the current server time", "inputSchema": { "type": "object", "additionalProperties": false }} Copy <details> <summary>Example: With output schema for structured contentPermalink{ "name": "get_weather_data", "title": "Weather Data Retriever", "description": "Get current weather data for a location", "inputSchema": { "type": "object", "properties": { "location": { "type": "string", "description": "City name or zip code" } }, "required": ["location"] }, "outputSchema": { "type": "object", "properties": { "temperature": { "type": "number", "description": "Temperature in celsius" }, "conditions": { "type": "string", "description": "Weather conditions description" }, "humidity": { "type": "number", "description": "Humidity percentage" } }, "required": ["temperature", "conditions", "humidity"] }} Copy icons?: Icon[]Permalink Optional set of sized icons that the client can display in a user interface. Clients that support rendering icons MUST support at least the following MIME types: <ul> <li>image/png - PNG images (safe, universal compatibility) <li>image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility) Clients that support rendering icons SHOULD also support: <ul> <li>image/svg+xml - SVG images (scalable but requires security precautions) <li>image/webp - WebP images (modern, efficient format) Inherited from Icons.icons name: stringPermalink Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn’t present). Inherited from BaseMetadata.name title?: stringPermalink Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display (except for Tool,
where annotations.title should be given precedence over using name,
if present). Inherited from BaseMetadata.title description?: stringPermalink A human-readable description of the tool. This can be used by clients to improve the LLM’s understanding of available tools. It can be thought of like a “hint” to the model. inputSchema: { $schema?: string; type: “object”; [key: string]: unknown }Permalink A JSON Schema object defining the expected parameters for the tool. Tool arguments are always JSON objects, so type: "object" is required at the root.
Beyond that, any JSON Schema 2020-12 keyword may appear alongside type — including
composition keywords (oneOf, anyOf, allOf, not), conditional keywords
(if/then/else), reference keywords ($ref, $defs, $anchor), and any other
standard validation or annotation keywords. Property schemas may carry an x-mcp-header annotation to mirror the
argument value into an HTTP header on the Streamable HTTP transport. See
the Streamable HTTP transport specification for the validity and
extraction rules. Defaults to JSON Schema 2020-12 when no explicit $schema is provided. outputSchema?: { $schema?: string; [key: string]: unknown }Permalink 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. Defaults to JSON Schema 2020-12 when no explicit $schema is provided. annotations?: ToolAnnotationsPermalink Optional additional tool information. Display name precedence order is: title, annotations.title, then name. _meta?: MetaObjectPermalink
ToolAnnotations
interface ToolAnnotations {
title?: string;
readOnlyHint?: boolean;
destructiveHint?: boolean;
idempotentHint?: boolean;
openWorldHint?: boolean;
}Additional properties describing a Tool to clients. NOTE: all properties in ToolAnnotations are hints.
They are not guaranteed to provide a faithful description of
tool behavior (including descriptive properties like title). Clients should never make tool use decisions based on ToolAnnotations
received from untrusted servers. title?: stringPermalink A human-readable title for the tool. readOnlyHint?: booleanPermalink If true, the tool does not modify its environment. Default: false destructiveHint?: booleanPermalink If true, the tool may perform destructive updates to its environment.
If false, the tool performs only additive updates. (This property is meaningful only when readOnlyHint == false) Default: true idempotentHint?: booleanPermalink If true, calling the tool repeatedly with the same arguments
will have no additional effect on its environment. (This property is meaningful only when readOnlyHint == false) Default: false openWorldHint?: booleanPermalink If true, this tool may interact with an “open world” of external
entities. If false, the tool’s domain of interaction is closed.
For example, the world of a web search tool is open, whereas that
of a memory tool is not. Default: true