本页还没有译文
本页 311 段还没译成Español,下面显示的是英文原文。Schema Reference
还没翻译译自英文(modelcontextprotocol.io)本页 311 段都还没译
JSON-RPC
JSONRPCMessage
Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
JSONRPCNotification
A notification which does not expect a response.
Inherited from Notification.method
Inherited from Notification.params
JSONRPCRequest
method: string;
params?: { [key: string]: any };
jsonrpc: "2.0";
id: RequestId;
}
A request that expects a response.
Inherited from Request.method
Inherited from Request.params
Common Types
Annotations
Optional annotations for the client. The client can use annotations to inform how objects are used or displayed
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"]).
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.
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.
Icon
An optionally-sized icon that can be displayed in a user interface.
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.
Optional MIME type override if the source MIME type is missing or generic.
For example: "image/png", "image/jpeg", or "image/svg+xml".
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.
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
_meta: RequestMetaObject;
inputResponses?: InputResponses;
requestState?: string;
}
Common params for any request.
Inherited from RequestParams._meta
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
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
MetaObject
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:
- Optional — if specified, MUST be a series of labels separated by dots (
.), followed by a slash (/). - Labels MUST start with a letter and end with a letter or digit. Interior characters may be letters, digits, or hyphens (
-). - Implementations SHOULD use reverse DNS notation (e.g.,
com.example/rather thanexample.com/). - Any prefix where the second label is
modelcontextprotocolormcpis reserved for MCP use. For example:io.modelcontextprotocol/,dev.mcp/,org.modelcontextprotocol.api/, andcom.mcp.tools/are all reserved. However,com.example.mcp/is NOT reserved, as the second label isexample.
Name:
- Unless empty, MUST start and end with an alphanumeric character (
[a-z0-9A-Z]). - Interior characters may be alphanumeric, hyphens (
-), underscores (_), or dots (.).
General fields: _meta for more details.
NotificationMetaObject
"io.modelcontextprotocol/subscriptionId"?: RequestId;
[key: string]: unknown;
}
Extends MetaObject with additional notification-specific fields. All key naming rules from MetaObject apply.
- MetaObject for key naming rules and reserved prefixes.
- General fields:
_metafor more details.
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.
PaginatedRequestParams
Common params for paginated requests.
Inherited from RequestParams._meta
An opaque token representing the current pagination position. If provided, the server should return results starting after this cursor.
ProgressToken
A progress token, used to associate progress notifications with the original request.
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.
- MetaObject for key naming rules and reserved prefixes.
- General fields:
_metafor more details.
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.
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.
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.
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.
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Result
Common result fields.
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
"io.modelcontextprotocol/serverInfo"?: Implementation;
[key: string]: unknown;
}
Extends MetaObject with additional result-specific fields. All key naming rules from MetaObject apply.
- MetaObject for key naming rules and reserved prefixes.
- General fields:
_metafor more details.
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
Indicates 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.
Errors
Error
The error type that occurred.
A short description of the error. The message SHOULD be limited to a concise single sentence.
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
Error 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
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.
Inherited from JSONRPCErrorResponse.jsonrpc
Inherited from JSONRPCErrorResponse.id
InternalError
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.
A short description of the error. The message SHOULD be limited to a concise single sentence.
Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
The error type that occurred.
InvalidParamsError
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:
- Tools: Unknown tool name or invalid tool arguments
- Prompts: Unknown prompt name or missing required arguments
- Pagination: Invalid or expired cursor values
- Logging: Invalid log level
- Elicitation: Server requests an elicitation mode not declared in client capabilities
- Sampling: Missing tool result or tool results mixed with other content
A short description of the error. The message SHOULD be limited to a concise single sentence.
Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
The error type that occurred.
InvalidRequestError
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).
A short description of the error. The message SHOULD be limited to a concise single sentence.
Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
The error type that occurred.
MethodNotFoundError
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).
A short description of the error. The message SHOULD be limited to a concise single sentence.
Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
The error type that occurred.
MISSING_REQUIRED_CLIENT_CAPABILITY
Error code returned when a server requires a client capability that was
not declared in the request's clientCapabilities.
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.
Inherited from JSONRPCErrorResponse.jsonrpc
Inherited from JSONRPCErrorResponse.id
ParseError
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.
A short description of the error. The message SHOULD be limited to a concise single sentence.
Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
The error type that occurred.
UNSUPPORTED_PROTOCOL_VERSION
Error code returned when the request's protocol version is not supported by the server.
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.
Inherited from JSONRPCErrorResponse.jsonrpc
Inherited from JSONRPCErrorResponse.id
Content
AudioContent
type: "audio";
data: string;
mimeType: string;
annotations?: Annotations;
_meta?: MetaObject;
}
Audio provided to or from an LLM.
The base64-encoded audio data.
The MIME type of the audio. Different providers may support different audio types.
Optional annotations for the client.
BlobResourceContents
The URI of this resource.
Inherited from ResourceContents.uri
The MIME type of this resource, if known.
Inherited from ResourceContents.mimeType
Inherited from ResourceContents._meta
A base64-encoded string representing the binary data of the item.
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.
Optional annotations for the client.
ImageContent
type: "image";
data: string;
mimeType: string;
annotations?: Annotations;
_meta?: MetaObject;
}
An image provided to or from an LLM.
The base64-encoded image data.
The MIME type of the image. Different providers may support different image types.
Optional annotations for the client.
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.
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:
image/png- PNG images (safe, universal compatibility)image/jpeg(andimage/jpg) - JPEG images (safe, universal compatibility)
Clients that support rendering icons SHOULD also support:
image/svg+xml- SVG images (scalable but requires security precautions)image/webp- WebP images (modern, efficient format)
Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
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).
The URI of this resource.
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
The MIME type of this resource, if known.
Optional annotations for the client.
Inherited from Resource.annotations
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.
TextContent
Text provided to or from an LLM.
The text content of the message.
Optional annotations for the client.
TextResourceContents
The URI of this resource.
Inherited from ResourceContents.uri
The MIME type of this resource, if known.
Inherited from ResourceContents.mimeType
Inherited from ResourceContents._meta
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
jsonrpc: "2.0";
id: RequestId;
method: "completion/complete";
params: CompleteRequestParams;
}
A request from the client to the server, to ask for completion options.
Inherited from JSONRPCRequest.jsonrpc
Inherited from JSONRPCRequest.id
Overrides JSONRPCRequest.method
Overrides JSONRPCRequest.params
CompleteRequestParams
_meta: RequestMetaObject;
ref: PromptReference | ResourceTemplateReference;
argument: { name: string; value: string };
context?: { arguments?: { [key: string]: string } };
}
Parameters for a completion/complete request.
Inherited from RequestParams._meta
The argument's information
- name: string
The name of the argument
- value: string
The value of the argument to use for completion matching.
Additional, optional context for completions
-
Optionalarguments?: { [key: string]: string }Previously-resolved variables in a URI template or prompt.
CompleteResultResponse
A successful response from the server for a completion/complete request.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
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.
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
- values: string[]
An array of completion values. Must not exceed 100 items.
-
Optionaltotal?: numberThe total number of completion options available. This can exceed the number of values actually sent in the response.
-
OptionalhasMore?: booleanIndicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
PromptReference
Identifies a prompt.
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
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
ResourceTemplateReference
A reference to a resource or resource template definition.
The URI or URI template of the resource.
elicitation/create
ElicitRequest
A request from the server to elicit additional information from the user via the client.
ElicitRequestParams
The parameters for a request to elicit additional information from the user via the client.
ElicitResult
action: "accept" | "decline" | "cancel";
content?: { [key: string]: string | number | boolean | string[] };
}
The result returned by the client for an elicitation/create request.
The user action in response to the elicitation.
"accept": User submitted the form/confirmed the action"decline": User explicitly declined the action"cancel": User dismissed without making an explicit choice
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
type: "boolean";
title?: string;
description?: string;
default?: boolean;
}
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.
The elicitation mode.
The message to present to the user describing what information is being requested.
A restricted subset of JSON Schema. Only top-level properties are allowed, without nesting.
ElicitRequestURLParams
The parameters for a request to elicit information from the user via a URL in the client.
The elicitation mode.
The message to present to the user explaining why the interaction is needed.
The URL that the user should navigate to.
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.
(Legacy) Display names for enum values. Non-standard according to JSON schema 2020-12.
NumberSchema
type: "number" | "integer";
title?: string;
description?: string;
minimum?: number;
maximum?: number;
default?: number;
}
PrimitiveSchemaDefinition
Restricted schema definitions that only allow primitive types without nested objects or arrays.
StringSchema
type: "string";
title?: string;
description?: string;
minLength?: number;
maxLength?: number;
format?: "uri" | "email" | "date" | "date-time";
default?: string;
}
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.
Optional title for the enum field.
Optional description for the enum field.
Minimum number of items to select.
Maximum number of items to select.
Schema for array items with enum options and display labels.
- anyOf: { const: string; title: string }[]
Array of enum options with values and display labels.
Optional default value.
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.
Optional title for the enum field.
Optional description for the enum field.
Array of enum options with values and display labels.
- const: string
The enum value.
- title: string
Display label for this option.
Optional default value.
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.
Optional title for the enum field.
Optional description for the enum field.
Minimum number of items to select.
Maximum number of items to select.
Schema for the array items.
- type: "string"
- enum: string[]
Array of enum values to choose from.
Optional default value.
UntitledSingleSelectEnumSchema
type: "string";
title?: string;
description?: string;
enum: string[];
default?: string;
}
Schema for single-selection enumeration without display titles for options.
Optional title for the enum field.
Optional description for the enum field.
Array of enum values to choose from.
Optional default value.
notifications/cancelled
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.
Inherited from JSONRPCNotification.jsonrpc
Overrides JSONRPCNotification.method
Overrides JSONRPCNotification.params
CancelledNotificationParams
_meta?: NotificationMetaObject;
requestId: RequestId;
reason?: string;
}
Parameters for a notifications/cancelled notification.
Inherited from NotificationParams._meta
The ID of the request to cancel.
This MUST correspond to the ID of a request the client previously issued.
An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
notifications/message
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Inherited from JSONRPCNotification.jsonrpc
Overrides JSONRPCNotification.method
Overrides JSONRPCNotification.params
LoggingMessageNotificationParams
_meta?: NotificationMetaObject;
level: LoggingLevel;
logger?: string;
data: unknown;
}
Parameters for a notifications/message notification.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Inherited from NotificationParams._meta
The severity of this log message.
An optional name of the logger issuing this message.
The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
notifications/progress
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.
Inherited from JSONRPCNotification.jsonrpc
Overrides JSONRPCNotification.method
Overrides JSONRPCNotification.params
ProgressNotificationParams
_meta?: NotificationMetaObject;
progressToken: ProgressToken;
progress: number;
total?: number;
message?: string;
}
Parameters for a notifications/progress notification.
Inherited from NotificationParams._meta
The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
The progress thus far. This should increase every time progress is made, even if the total is unknown.
Total number of items to process (or total progress required), if known.
An optional message describing the current progress.
notifications/prompts/list_changed
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.
Inherited from JSONRPCNotification.jsonrpc
Overrides JSONRPCNotification.method
Overrides JSONRPCNotification.params
notifications/resources/list_changed
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.
Inherited from JSONRPCNotification.jsonrpc
Overrides JSONRPCNotification.method
Overrides JSONRPCNotification.params
notifications/resources/updated
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.
Inherited from JSONRPCNotification.jsonrpc
Overrides JSONRPCNotification.method
Overrides JSONRPCNotification.params
ResourceUpdatedNotificationParams
Parameters for a notifications/resources/updated notification.
Inherited from NotificationParams._meta
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
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.
Inherited from JSONRPCNotification.jsonrpc
Overrides JSONRPCNotification.method
Overrides JSONRPCNotification.params
SubscriptionsAcknowledgedNotificationParams
_meta?: NotificationMetaObject;
notifications: SubscriptionFilter;
}
Parameters for a notifications/subscriptions/acknowledged notification.
Inherited from NotificationParams._meta
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
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.
Inherited from JSONRPCNotification.jsonrpc
Overrides JSONRPCNotification.method
Overrides JSONRPCNotification.params
Multi Round-Trip
InputRequests
A map of server-initiated requests that the client must fulfill. Keys are server-assigned identifiers; values are the request objects.
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.
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
InputResponses
A 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.
prompts/get
GetPromptRequest
jsonrpc: "2.0";
id: RequestId;
method: "prompts/get";
params: GetPromptRequestParams;
}
Used by the client to get a prompt provided by the server.
Inherited from JSONRPCRequest.jsonrpc
Inherited from JSONRPCRequest.id
Overrides JSONRPCRequest.method
Overrides JSONRPCRequest.params
GetPromptRequestParams
_meta: RequestMetaObject;
inputResponses?: InputResponses;
requestState?: string;
name: string;
arguments?: { [key: string]: string };
}
Parameters for a prompts/get request.
Inherited from InputResponseRequestParams._meta
Inherited from InputResponseRequestParams.inputResponses
Inherited from InputResponseRequestParams.requestState
The name of the prompt or prompt template.
Arguments to use for templating the prompt.
GetPromptResultResponse
jsonrpc: "2.0";
id: RequestId;
result: InputRequiredResult | GetPromptResult;
}
A successful response from the server for a prompts/get request.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
GetPromptResult
_meta?: ResultMetaObject;
resultType: string;
description?: string;
messages: PromptMessage[];
[key: string]: unknown;
}
The result returned by the server for a prompts/get request.
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
An optional description for the prompt.
PromptMessage
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.
prompts/list
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.
Inherited from PaginatedRequest.jsonrpc
Inherited from PaginatedRequest.id
Inherited from PaginatedRequest.params
Overrides PaginatedRequest.method
ListPromptsResultResponse
A successful response from the server for a prompts/list request.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
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.
Inherited from PaginatedResult._meta
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
An opaque token representing the pagination position after the last returned result. If present, there may be more results available.
Inherited from PaginatedResult.nextCursor
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.
- If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
- If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.
Inherited from CacheableResult.ttlMs
Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.
"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."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
Prompt
icons?: Icon[];
name: string;
title?: string;
description?: string;
arguments?: PromptArgument[];
_meta?: MetaObject;
}
A prompt or prompt template that the server offers.
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:
image/png- PNG images (safe, universal compatibility)image/jpeg(andimage/jpg) - JPEG images (safe, universal compatibility)
Clients that support rendering icons SHOULD also support:
image/svg+xml- SVG images (scalable but requires security precautions)image/webp- WebP images (modern, efficient format)
Inherited from Icons.icons
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
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
An optional description of what this prompt provides
A list of arguments to use for templating the prompt.
PromptArgument
Describes an argument that a prompt can accept.
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
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
A human-readable description of the argument.
Whether this argument must be provided.
resources/list
ListResourcesRequest
jsonrpc: "2.0";
id: RequestId;
params: PaginatedRequestParams;
method: "resources/list";
}
Sent from the client to request a list of resources the server has.
Inherited from PaginatedRequest.jsonrpc
Inherited from PaginatedRequest.id
Inherited from PaginatedRequest.params
Overrides PaginatedRequest.method
ListResourcesResultResponse
jsonrpc: "2.0";
id: RequestId;
result: ListResourcesResult;
}
A successful response from the server for a resources/list request.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
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.
Inherited from PaginatedResult._meta
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
An opaque token representing the pagination position after the last returned result. If present, there may be more results available.
Inherited from PaginatedResult.nextCursor
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.
- If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
- If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.
Inherited from CacheableResult.ttlMs
Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.
"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."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
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.
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:
image/png- PNG images (safe, universal compatibility)image/jpeg(andimage/jpg) - JPEG images (safe, universal compatibility)
Clients that support rendering icons SHOULD also support:
image/svg+xml- SVG images (scalable but requires security precautions)image/webp- WebP images (modern, efficient format)
Inherited from Icons.icons
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
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
The URI of this resource.
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.
The MIME type of this resource, if known.
Optional annotations for the client.
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.
resources/read
ReadResourceRequest
jsonrpc: "2.0";
id: RequestId;
method: "resources/read";
params: ReadResourceRequestParams;
}
Sent from the client to the server, to read a specific resource URI.
Inherited from JSONRPCRequest.jsonrpc
Inherited from JSONRPCRequest.id
Overrides JSONRPCRequest.method
Overrides JSONRPCRequest.params
ReadResourceRequestParams
_meta: RequestMetaObject;
inputResponses?: InputResponses;
requestState?: string;
uri: string;
}
Parameters for a resources/read request.
Inherited from InputResponseRequestParams._meta
Inherited from InputResponseRequestParams.inputResponses
Inherited from InputResponseRequestParams.requestState
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
jsonrpc: "2.0";
id: RequestId;
result: InputRequiredResult | ReadResourceResult;
}
A successful response from the server for a resources/read request.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
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.
Inherited from CacheableResult._meta
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
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.
- If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
- If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.
Inherited from CacheableResult.ttlMs
Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.
"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."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/templates/list
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.
Inherited from PaginatedRequest.jsonrpc
Inherited from PaginatedRequest.id
Inherited from PaginatedRequest.params
Overrides PaginatedRequest.method
ListResourceTemplatesResultResponse
jsonrpc: "2.0";
id: RequestId;
result: ListResourceTemplatesResult;
}
A successful response from the server for a resources/templates/list request.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
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.
Inherited from PaginatedResult._meta
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
An opaque token representing the pagination position after the last returned result. If present, there may be more results available.
Inherited from PaginatedResult.nextCursor
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.
- If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
- If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.
Inherited from CacheableResult.ttlMs
Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.
"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."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
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.
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:
image/png- PNG images (safe, universal compatibility)image/jpeg(andimage/jpg) - JPEG images (safe, universal compatibility)
Clients that support rendering icons SHOULD also support:
image/svg+xml- SVG images (scalable but requires security precautions)image/webp- WebP images (modern, efficient format)
Inherited from Icons.icons
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
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
A URI template (according to RFC 6570) that can be used to construct resource URIs.
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.
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.
Optional annotations for the client.
roots/list
ListRootsRequest
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
ListRootsResult
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Root
Represents a root directory or file that the server can operate on.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
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.
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.
sampling/createMessage
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
The server's preferences for which model to select. The client MAY ignore these preferences.
An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
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.
The "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".
The requested maximum number of tokens to sample (to prevent runaway completions).
The client MAY choose to sample fewer tokens than the requested maximum.
Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
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.
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
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
The name of the model that generated the message.
The reason why sampling stopped, if known.
Standard values:
"endTurn": Natural end of the assistant's turn"stopSequence": A stop sequence was encountered"maxTokens": Maximum token limit was reached"toolUse": The model wants to use one or more tools
This field is an open string to allow for provider-specific stop reasons.
Inherited from SamplingMessage.role
Inherited from SamplingMessage.content
Inherited from SamplingMessage._meta
ModelHint
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
A hint for a model name.
The client SHOULD treat this as a substring of a model name; for example:
claude-3-5-sonnetshould matchclaude-3-5-sonnet-20241022sonnetshould matchclaude-3-5-sonnet-20241022,claude-3-sonnet-20240229, etc.claudeshould 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:
gemini-1.5-flashcould matchclaude-3-haiku-20240307
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
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.
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.
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.
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
role: Role;
content: SamplingMessageContentBlock | SamplingMessageContentBlock[];
_meta?: MetaObject;
}
Describes a message issued to or received from an LLM API.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
SamplingMessageContentBlock
| TextContent
| ImageContent
| AudioContent
| ToolUseContent
| ToolResultContent
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
ToolChoice
Controls tool selection behavior for sampling requests.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Controls the tool use ability of the model:
"auto": Model decides whether to use tools (default)"required": Model MUST use at least one tool before completing"none": Model MUST NOT use any tools
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.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
The ID of the tool use this result corresponds to.
This MUST match the ID from a previous ToolUseContent.
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.
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.
Whether the tool use resulted in an error.
If true, the content typically describes the error that occurred. Default: false
Optional metadata about the tool result. Clients SHOULD preserve this field when including tool results in subsequent sampling requests to enable caching optimizations.
ToolUseContent
type: "tool_use";
id: string;
name: string;
input: { [key: string]: unknown };
_meta?: MetaObject;
}
A request from the assistant to call a tool.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
A unique identifier for this tool use.
This ID is used to match tool results to their corresponding tool uses.
The name of the tool to call.
The arguments to pass to the tool, conforming to the tool's input schema.
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
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.
Inherited from JSONRPCRequest.jsonrpc
Inherited from JSONRPCRequest.id
Overrides JSONRPCRequest.method
Overrides JSONRPCRequest.params
DiscoverResultResponse
A successful response from the server for a server/discover request.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
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.
Inherited from CacheableResult._meta
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
MCP Protocol Versions this server supports. The client should choose a version from this list for use in subsequent requests.
The capabilities of the server.
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.
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.
- If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
- If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.
Inherited from CacheableResult.ttlMs
Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.
"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."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
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, non-standard capabilities that the client supports.
Present if the client supports listing roots.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Present if the client supports sampling from an LLM.
-
Whether the client supports context inclusion via
includeContextparameter. If not declared, servers SHOULD only useincludeContext: "none"(or omit it). -
Whether the client supports tool use via
toolsandtoolChoiceparameters.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Present if the client supports elicitation from the server.
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.
Implementation
icons?: Icon[];
name: string;
title?: string;
version: string;
description?: string;
websiteUrl?: string;
}
Describes the MCP implementation.
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:
image/png- PNG images (safe, universal compatibility)image/jpeg(andimage/jpg) - JPEG images (safe, universal compatibility)
Clients that support rendering icons SHOULD also support:
image/svg+xml- SVG images (scalable but requires security precautions)image/webp- WebP images (modern, efficient format)
Inherited from Icons.icons
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
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
The version of this implementation.
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.
An optional URL of the website for this implementation.
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, non-standard capabilities that the server supports.
Present if the server supports sending log messages to the client.
Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Present if the server supports argument autocompletion suggestions.
Present if the server offers any prompt templates.
-
OptionallistChanged?: booleanWhether this server supports notifications for changes to the prompt list.
Present if the server offers any resources to read.
-
Optionalsubscribe?: booleanWhether this server supports subscribing to resource updates.
-
OptionallistChanged?: booleanWhether this server supports notifications for changes to the resource list.
Present if the server offers any tools to call.
-
OptionallistChanged?: booleanWhether this server supports notifications for changes to the tool list.
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.
subscriptions/listen
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.
Inherited from JSONRPCRequest.jsonrpc
Inherited from JSONRPCRequest.id
Overrides JSONRPCRequest.method
Overrides JSONRPCRequest.params
SubscriptionsListenRequestParams
_meta: RequestMetaObject;
notifications: SubscriptionFilter;
}
Parameters for a subscriptions/listen request.
Inherited from RequestParams._meta
The notifications the client opts in to on this stream. The server MUST NOT send notification types the client has not explicitly requested.
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.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
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.
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
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.
If true, receive notifications/tools/list_changed.
If true, receive notifications/prompts/list_changed.
If true, receive notifications/resources/list_changed.
Subscribe to notifications/resources/updated for these resource URIs.
Replaces the former resources/subscribe RPC.
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.
MetaObject for key naming rules and reserved prefixes.
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
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
jsonrpc: "2.0";
id: RequestId;
method: "tools/call";
params: CallToolRequestParams;
}
Used by the client to invoke a tool provided by the server.
Inherited from JSONRPCRequest.jsonrpc
Inherited from JSONRPCRequest.id
Overrides JSONRPCRequest.method
Overrides JSONRPCRequest.params
CallToolRequestParams
_meta: RequestMetaObject;
inputResponses?: InputResponses;
requestState?: string;
name: string;
arguments?: { [key: string]: unknown };
}
Parameters for a tools/call request.
Inherited from InputResponseRequestParams._meta
Inherited from InputResponseRequestParams.inputResponses
Inherited from InputResponseRequestParams.requestState
The name of the tool.
Arguments to use for the tool call.
CallToolResultResponse
jsonrpc: "2.0";
id: RequestId;
result: InputRequiredResult | CallToolResult;
}
A successful response from the server for a tools/call request.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
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.
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
A list of content objects that represent the unstructured result of the tool call.
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.
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
jsonrpc: "2.0";
id: RequestId;
params: PaginatedRequestParams;
method: "tools/list";
}
Sent from the client to request a list of tools the server has.
Inherited from PaginatedRequest.jsonrpc
Inherited from PaginatedRequest.id
Inherited from PaginatedRequest.params
Overrides PaginatedRequest.method
ListToolsResultResponse
A successful response from the server for a tools/list request.
Inherited from JSONRPCResultResponse.jsonrpc
Inherited from JSONRPCResultResponse.id
Overrides JSONRPCResultResponse.result
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.
Inherited from PaginatedResult._meta
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
An opaque token representing the pagination position after the last returned result. If present, there may be more results available.
Inherited from PaginatedResult.nextCursor
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.
- If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
- If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.
Inherited from CacheableResult.ttlMs
Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.
"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."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
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.
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:
image/png- PNG images (safe, universal compatibility)image/jpeg(andimage/jpg) - JPEG images (safe, universal compatibility)
Clients that support rendering icons SHOULD also support:
image/svg+xml- SVG images (scalable but requires security precautions)image/webp- WebP images (modern, efficient format)
Inherited from Icons.icons
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
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
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.
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.
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.
Optional additional tool information.
Display name precedence order is: title, annotations.title, then name.
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.
A human-readable title for the tool.
If true, the tool does not modify its environment.
Default: false
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
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
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