Skip to main content
Reference engineering 60 min read Updated

specification-2025-11-25-schema

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 response that indicates success but carries no data.

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.).

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 takes 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.

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)

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.

Result

interface Result {
  _meta?: { [key: string]: unknown };
  [key: string]: unknown;
} _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

Role

Role: “user” | “assistant“The sender or recipient of messages and data in a conversation.

Content

AudioContent

interface AudioContent {
  type: “audio”;
  data: string;
  mimeType: string;
  annotations?: Annotations;
  _meta?: { [key: string]: unknown };
}Audio provided to or from an LLM. 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?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

BlobResourceContents

interface BlobResourceContents {
  uri: string;
  mimeType?: string;
  _meta?: { [key: string]: unknown };
  blob: string;
} 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?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. 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?: { [key: string]: unknown };
}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. type: “resource”Permalink resource: TextResourceContents | BlobResourceContentsPermalink annotations?: AnnotationsPermalink Optional annotations for the client. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

ImageContent

interface ImageContent {
  type: “image”;
  data: string;
  mimeType: string;
  annotations?: Annotations;
  _meta?: { [key: string]: unknown };
}An image provided to or from an LLM. 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?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

interface ResourceLink {
  icons?: Icon[];
  name: string;
  title?: string;
  uri: string;
  description?: string;
  mimeType?: string;
  annotations?: Annotations;
  size?: number;
  _meta?: { [key: string]: unknown };
  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. 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?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Resource._meta type: “resource_link”Permalink

TextContent

interface TextContent {
  type: “text”;
  text: string;
  annotations?: Annotations;
  _meta?: { [key: string]: unknown };
}Text provided to or from an LLM. type: “text”Permalink text: stringPermalink The text content of the message. annotations?: AnnotationsPermalink Optional annotations for the client. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

TextResourceContents

interface TextResourceContents {
  uri: string;
  mimeType?: string;
  _meta?: { [key: string]: unknown };
  text: string;
} 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?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. 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. 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?: { progressToken?: ProgressToken; [key: string]: unknown };
  ref: PromptReference | ResourceTemplateReference;
  argument: { name: string; value: string };
  context?: { arguments?: { [key: string]: string } };
}Parameters for a completion/complete request. _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. 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.

CompleteResult

interface CompleteResult {
  _meta?: { [key: string]: unknown };
  completion: { values: string[]; total?: number; hasMore?: boolean };
  [key: string]: unknown;
}The server’s response to a completion/complete request _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta 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 {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “elicitation/create”;
  params: ElicitRequestParams;
}A request from the server to elicit additional information from the user via the client. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “elicitation/create”Permalink Overrides JSONRPCRequest.method params: ElicitRequestParamsPermalink Overrides JSONRPCRequest.params

ElicitRequestParams

ElicitRequestParams: ElicitRequestFormParams | ElicitRequestURLParamsThe parameters for a request to elicit additional information from the user via the client.

ElicitResult

interface ElicitResult {
  _meta?: { [key: string]: unknown };
  action: “accept” | “decline” | “cancel”;
  content?: { [key: string]: string | number | boolean | string[] };
  [key: string]: unknown;
}The client’s response to an elicitation request. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta 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 decline 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;
} type: “boolean”Permalink title?: stringPermalink description?: stringPermalink default?: booleanPermalink

ElicitRequestFormParams

interface ElicitRequestFormParams {
  task?: TaskMetadata;
  _meta?: { progressToken?: ProgressToken; [key: string]: unknown };
  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. task?: TaskMetadataPermalink If specified, the caller is requesting task-augmented execution for this request. The request will return a CreateTaskResult immediately, and the actual result can be retrieved later via tasks/result. Task augmentation is subject to capability negotiation - receivers MUST declare support for task augmentation of specific request types in their capabilities. Inherited from TaskAugmentedRequestParams.task _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from TaskAugmentedRequestParams._meta 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 {
  task?: TaskMetadata;
  _meta?: { progressToken?: ProgressToken; [key: string]: unknown };
  mode: “url”;
  message: string;
  elicitationId: string;
  url: string;
}The parameters for a request to elicit information from the user via a URL in the client. task?: TaskMetadataPermalink If specified, the caller is requesting task-augmented execution for this request. The request will return a CreateTaskResult immediately, and the actual result can be retrieved later via tasks/result. Task augmentation is subject to capability negotiation - receivers MUST declare support for task augmentation of specific request types in their capabilities. Inherited from TaskAugmentedRequestParams.task _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from TaskAugmentedRequestParams._meta mode: “url”Permalink The elicitation mode. message: stringPermalink The message to present to the user explaining why the interaction is needed. elicitationId: stringPermalink The ID of the elicitation, which must be unique within the context of the server. The client MUST treat this ID as an opaque value. 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;
} 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;
} 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. 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. 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. 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. 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.

initialize

InitializeRequest

interface InitializeRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “initialize”;
  params: InitializeRequestParams;
}This request is sent from the client to the server when it first connects, asking it to begin initialization. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “initialize”Permalink Overrides JSONRPCRequest.method params: InitializeRequestParamsPermalink Overrides JSONRPCRequest.params

InitializeRequestParams

interface InitializeRequestParams {
  _meta?: { progressToken?: ProgressToken; [key: string]: unknown };
  protocolVersion: string;
  capabilities: ClientCapabilities;
  clientInfo: Implementation;
}Parameters for an initialize request. _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from RequestParams._meta protocolVersion: stringPermalink The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well. capabilities: ClientCapabilitiesPermalink clientInfo: ImplementationPermalink

InitializeResult

interface InitializeResult {
  _meta?: { [key: string]: unknown };
  protocolVersion: string;
  capabilities: ServerCapabilities;
  serverInfo: Implementation;
  instructions?: string;
  [key: string]: unknown;
}After receiving an initialize request from the client, the server sends this response. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta protocolVersion: stringPermalink The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect. capabilities: ServerCapabilitiesPermalink serverInfo: ImplementationPermalink instructions?: stringPermalink Instructions describing how to use the server and its features. This can be used by clients to improve the LLM’s understanding of available tools, resources, etc. It can be thought of like a “hint” to the model. For example, this information MAY be added to the system prompt.

ClientCapabilities

interface ClientCapabilities {
  experimental?: { [key: string]: object };
  roots?: { listChanged?: boolean };
  sampling?: { context?: object; tools?: object };
  elicitation?: { form?: object; url?: object };
  tasks?: {
    list?: object;
    cancel?: object;
    requests?: {
      sampling?: { createMessage?: object };
      elicitation?: { create?: object };
    };
  };
}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]: object }Permalink Experimental, non-standard capabilities that the client supports. roots?: { listChanged?: boolean }Permalink Present if the client supports listing roots. Type Declaration <ul> <li> OptionallistChanged?: boolean Whether the client supports notifications for changes to the roots list. sampling?: { context?: object; tools?: object }Permalink Present if the client supports sampling from an LLM. Type Declaration <ul> <li> Optionalcontext?: object Whether the client supports context inclusion via includeContext parameter. If not declared, servers SHOULD only use includeContext: "none" (or omit it). <li> Optionaltools?: object Whether the client supports tool use via tools and toolChoice parameters. elicitation?: { form?: object; url?: object }Permalink Present if the client supports elicitation from the server. tasks?: { list?: object; cancel?: object; requests?: { sampling?: { createMessage?: object }; elicitation?: { create?: object }; }; }Permalink Present if the client supports task-augmented requests. Type Declaration <ul> <li> Optionallist?: object Whether this client supports tasks/list. <li> Optionalcancel?: object Whether this client supports tasks/cancel. <li> Optionalrequests?: { sampling?: { createMessage?: object }; elicitation?: { create?: object } } Specifies which request types can be augmented with tasks. <ul> <li> Optionalsampling?: { createMessage?: object } Task support for sampling-related requests. <ul> <li> OptionalcreateMessage?: object Whether the client supports task-augmented sampling/createMessage requests. <li> Optionalelicitation?: { create?: object } Task support for elicitation-related requests. <ul> <li> Optionalcreate?: object Whether the client supports task-augmented elicitation/create requests.

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 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]: object };
  logging?: object;
  completions?: object;
  prompts?: { listChanged?: boolean };
  resources?: { subscribe?: boolean; listChanged?: boolean };
  tools?: { listChanged?: boolean };
  tasks?: {
    list?: object;
    cancel?: object;
    requests?: { tools?: { call?: object } };
  };
}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]: object }Permalink Experimental, non-standard capabilities that the server supports. logging?: objectPermalink Present if the server supports sending log messages to the client. completions?: objectPermalink Present if the server supports argument autocompletion suggestions. 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. 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. 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. tasks?: { list?: object; cancel?: object; requests?: { tools?: { call?: object } }; }Permalink Present if the server supports task-augmented requests. Type Declaration <ul> <li> Optionallist?: object Whether this server supports tasks/list. <li> Optionalcancel?: object Whether this server supports tasks/cancel. <li> Optionalrequests?: { tools?: { call?: object } } Specifies which request types can be augmented with tasks. <ul> <li> Optionaltools?: { call?: object } Task support for tool-related requests. <ul> <li> Optionalcall?: object Whether the server supports task-augmented tools/call requests.

logging/setLevel

SetLevelRequest

interface SetLevelRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “logging/setLevel”;
  params: SetLevelRequestParams;
}A request from the client to the server, to enable or adjust logging. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “logging/setLevel”Permalink Overrides JSONRPCRequest.method params: SetLevelRequestParamsPermalink Overrides JSONRPCRequest.params

SetLevelRequestParams

interface SetLevelRequestParams {
  _meta?: { progressToken?: ProgressToken; [key: string]: unknown };
  level: LoggingLevel;
}Parameters for a logging/setLevel request. _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from RequestParams._meta level: LoggingLevelPermalink The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/message.

notifications/cancelled

CancelledNotification

interface CancelledNotification {
  jsonrpc: “2.0”;
  method: “notifications/cancelled”;
  params: CancelledNotificationParams;
}This notification can be sent by either side to indicate that it is cancelling a previously-issued 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. A client MUST NOT attempt to cancel its initialize request. For task cancellation, use the tasks/cancel request instead of this notification. jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/cancelled”Permalink Overrides JSONRPCNotification.method params: CancelledNotificationParamsPermalink Overrides JSONRPCNotification.params

CancelledNotificationParams

interface CancelledNotificationParams {
  _meta?: { [key: string]: unknown };
  requestId?: RequestId;
  reason?: string;
}Parameters for a notifications/cancelled notification. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from NotificationParams._meta requestId?: RequestIdPermalink The ID of the request to cancel. This MUST correspond to the ID of a request previously issued in the same direction. This MUST be provided for cancelling non-task requests. This MUST NOT be used for cancelling tasks (use the tasks/cancel request instead). reason?: stringPermalink An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.

notifications/initialized

InitializedNotification

interface InitializedNotification {
  jsonrpc: “2.0”;
  method: “notifications/initialized”;
  params?: NotificationParams;
}This notification is sent from the client to the server after initialization has finished. jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/initialized”Permalink Overrides JSONRPCNotification.method params?: NotificationParamsPermalink Overrides JSONRPCNotification.params

notifications/tasks/status

TaskStatusNotification

interface TaskStatusNotification {
  jsonrpc: “2.0”;
  method: “notifications/tasks/status”;
  params: TaskStatusNotificationParams;
}An optional notification from the receiver to the requestor, informing them that a task’s status has changed. Receivers are not required to send these notifications. jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/tasks/status”Permalink Overrides JSONRPCNotification.method params: TaskStatusNotificationParamsPermalink Overrides JSONRPCNotification.params

TaskStatusNotificationParams

TaskStatusNotificationParams: NotificationParams & TaskParameters for a notifications/tasks/status notification.

notifications/message

LoggingMessageNotification

interface LoggingMessageNotification {
  jsonrpc: “2.0”;
  method: “notifications/message”;
  params: LoggingMessageNotificationParams;
}JSONRPCNotification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically. jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/message”Permalink Overrides JSONRPCNotification.method params: LoggingMessageNotificationParamsPermalink Overrides JSONRPCNotification.params

LoggingMessageNotificationParams

interface LoggingMessageNotificationParams {
  _meta?: { [key: string]: unknown };
  level: LoggingLevel;
  logger?: string;
  data: unknown;
}Parameters for a notifications/message notification. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. 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. jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/progress”Permalink Overrides JSONRPCNotification.method params: ProgressNotificationParamsPermalink Overrides JSONRPCNotification.params

ProgressNotificationParams

interface ProgressNotificationParams {
  _meta?: { [key: string]: unknown };
  progressToken: ProgressToken;
  progress: number;
  total?: number;
  message?: string;
}Parameters for a notifications/progress notification. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. 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 may be issued by servers without any previous subscription from the client. 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 may be issued by servers without any previous subscription from the client. 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 should only be sent if the client previously sent a resources/subscribe request. 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?: { [key: string]: unknown };
  uri: string;
}Parameters for a notifications/resources/updated notification. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. 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/roots/list_changed

RootsListChangedNotification

interface RootsListChangedNotification {
  jsonrpc: “2.0”;
  method: “notifications/roots/list_changed”;
  params?: NotificationParams;
}A notification from the client to the server, informing it that the list of roots has changed. This notification should be sent whenever the client adds, removes, or modifies any root. The server should then request an updated list of roots using the ListRootsRequest. jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/roots/list_changed”Permalink Overrides JSONRPCNotification.method params?: NotificationParamsPermalink Overrides JSONRPCNotification.params

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 may be issued by servers without any previous subscription from the client. jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/tools/list_changed”Permalink Overrides JSONRPCNotification.method params?: NotificationParamsPermalink Overrides JSONRPCNotification.params

notifications/elicitation/complete

ElicitationCompleteNotification

interface ElicitationCompleteNotification {
  jsonrpc: “2.0”;
  method: “notifications/elicitation/complete”;
  params: { elicitationId: string };
}An optional notification from the server to the client, informing it of a completion of a out-of-band elicitation request. jsonrpc: “2.0”Permalink Inherited from JSONRPCNotification.jsonrpc method: “notifications/elicitation/complete”Permalink Overrides JSONRPCNotification.method params: { elicitationId: string }Permalink Type Declaration <ul> <li> elicitationId: string The ID of the elicitation that completed. Overrides JSONRPCNotification.params

ping

PingRequest

interface PingRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “ping”;
  params?: RequestParams;
}A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “ping”Permalink Overrides JSONRPCRequest.method params?: RequestParamsPermalink Overrides JSONRPCRequest.params

tasks

CreateTaskResult

interface CreateTaskResult {
  _meta?: { [key: string]: unknown };
  task: Task;
  [key: string]: unknown;
}A response to a task-augmented request. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta task: TaskPermalink

RelatedTaskMetadata

interface RelatedTaskMetadata {
  taskId: string;
}Metadata for associating messages with a task. Include this in the _meta field under the key io.modelcontextprotocol/related-task. taskId: stringPermalink The task identifier this message is associated with.

Task

interface Task {
  taskId: string;
  status: TaskStatus;
  statusMessage?: string;
  createdAt: string;
  lastUpdatedAt: string;
  ttl: number | null;
  pollInterval?: number;
}Data associated with a task. taskId: stringPermalink The task identifier. status: TaskStatusPermalink Current task state. statusMessage?: stringPermalink Optional human-readable message describing the current task state. This can provide context for any status, including: <ul> <li>Reasons for “cancelled” status <li>Summaries for “completed” status <li>Diagnostic information for “failed” status (e.g., error details, what went wrong) createdAt: stringPermalink ISO 8601 timestamp when the task was created. lastUpdatedAt: stringPermalink ISO 8601 timestamp when the task was last updated. ttl: number | nullPermalink Actual retention duration from creation in milliseconds, null for unlimited. pollInterval?: numberPermalink Suggested polling interval in milliseconds.

TaskMetadata

interface TaskMetadata {
  ttl?: number;
}Metadata for augmenting a request with task execution. Include this in the task field of the request parameters. ttl?: numberPermalink Requested duration in milliseconds to retain task from creation.

TaskStatus

TaskStatus: “working” | “input_required” | “completed” | “failed” | “cancelled“The status of a task.

tasks/get

GetTaskRequest

interface GetTaskRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “tasks/get”;
  params: { taskId: string };
}A request to retrieve the state of a task. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “tasks/get”Permalink Overrides JSONRPCRequest.method params: { taskId: string }Permalink Type Declaration <ul> <li> taskId: string The task identifier to query. Overrides JSONRPCRequest.params

GetTaskResult

GetTaskResult: Result & TaskThe response to a tasks/get request.

tasks/result

GetTaskPayloadRequest

interface GetTaskPayloadRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “tasks/result”;
  params: { taskId: string };
}A request to retrieve the result of a completed task. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “tasks/result”Permalink Overrides JSONRPCRequest.method params: { taskId: string }Permalink Type Declaration <ul> <li> taskId: string The task identifier to retrieve results for. Overrides JSONRPCRequest.params

GetTaskPayloadResult

interface GetTaskPayloadResult {
  _meta?: { [key: string]: unknown };
  [key: string]: unknown;
}The response to a tasks/result request. The structure matches the result type of the original request. For example, a tools/call task would return the CallToolResult structure. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta

tasks/list

ListTasksRequest

interface ListTasksRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  params?: PaginatedRequestParams;
  method: “tasks/list”;
}A request to retrieve a list of tasks. jsonrpc: “2.0”Permalink Inherited from PaginatedRequest.jsonrpc id: RequestIdPermalink Inherited from PaginatedRequest.id params?: PaginatedRequestParamsPermalink Inherited from PaginatedRequest.params method: “tasks/list”Permalink Overrides PaginatedRequest.method

ListTasksResult

interface ListTasksResult {
  _meta?: { [key: string]: unknown };
  nextCursor?: string;
  tasks: Task[];
  [key: string]: unknown;
}The response to a tasks/list request. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from PaginatedResult._meta 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 tasks: Task[]Permalink

tasks/cancel

CancelTaskRequest

interface CancelTaskRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “tasks/cancel”;
  params: { taskId: string };
}A request to cancel a task. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “tasks/cancel”Permalink Overrides JSONRPCRequest.method params: { taskId: string }Permalink Type Declaration <ul> <li> taskId: string The task identifier to cancel. Overrides JSONRPCRequest.params

CancelTaskResult

CancelTaskResult: Result & TaskThe response to a tasks/cancel request.

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. 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?: { progressToken?: ProgressToken; [key: string]: unknown };
  name: string;
  arguments?: { [key: string]: string };
}Parameters for a prompts/get request. _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from RequestParams._meta name: stringPermalink The name of the prompt or prompt template. arguments?: { [key: string]: string }Permalink Arguments to use for templating the prompt.

GetPromptResult

interface GetPromptResult {
  _meta?: { [key: string]: unknown };
  description?: string;
  messages: PromptMessage[];
  [key: string]: unknown;
}The server’s response to a prompts/get request from the client. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta 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. 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

ListPromptsResult

interface ListPromptsResult {
  _meta?: { [key: string]: unknown };
  nextCursor?: string;
  prompts: Prompt[];
  [key: string]: unknown;
}The server’s response to a prompts/list request from the client. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from PaginatedResult._meta 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 prompts: Prompt[]Permalink

Prompt

interface Prompt {
  icons?: Icon[];
  name: string;
  title?: string;
  description?: string;
  arguments?: PromptArgument[];
  _meta?: { [key: string]: unknown };
}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?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

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. 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

ListResourcesResult

interface ListResourcesResult {
  _meta?: { [key: string]: unknown };
  nextCursor?: string;
  resources: Resource[];
  [key: string]: unknown;
}The server’s response to a resources/list request from the client. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from PaginatedResult._meta 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 resources: Resource[]Permalink

Resource

interface Resource {
  icons?: Icon[];
  name: string;
  title?: string;
  uri: string;
  description?: string;
  mimeType?: string;
  annotations?: Annotations;
  size?: number;
  _meta?: { [key: string]: unknown };
}A known resource that the server is capable of reading. 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?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

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. 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?: { progressToken?: ProgressToken; [key: string]: unknown };
  uri: string;
}Parameters for a resources/read request. _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from ResourceRequestParams._meta 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

ReadResourceResult

interface ReadResourceResult {
  _meta?: { [key: string]: unknown };
  contents: (TextResourceContents | BlobResourceContents)[];
  [key: string]: unknown;
}The server’s response to a resources/read request from the client. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta contents: (TextResourceContents | BlobResourceContents)[]Permalink

resources/subscribe

SubscribeRequest

interface SubscribeRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “resources/subscribe”;
  params: SubscribeRequestParams;
}Sent from the client to request resources/updated notifications from the server whenever a particular resource changes. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “resources/subscribe”Permalink Overrides JSONRPCRequest.method params: SubscribeRequestParamsPermalink Overrides JSONRPCRequest.params

SubscribeRequestParams

interface SubscribeRequestParams {
  _meta?: { progressToken?: ProgressToken; [key: string]: unknown };
  uri: string;
}Parameters for a resources/subscribe request. _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from ResourceRequestParams._meta 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

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. 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

ListResourceTemplatesResult

interface ListResourceTemplatesResult {
  _meta?: { [key: string]: unknown };
  nextCursor?: string;
  resourceTemplates: ResourceTemplate[];
  [key: string]: unknown;
}The server’s response to a resources/templates/list request from the client. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from PaginatedResult._meta 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 resourceTemplates: ResourceTemplate[]Permalink

ResourceTemplate

interface ResourceTemplate {
  icons?: Icon[];
  name: string;
  title?: string;
  uriTemplate: string;
  description?: string;
  mimeType?: string;
  annotations?: Annotations;
  _meta?: { [key: string]: unknown };
}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?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

resources/unsubscribe

UnsubscribeRequest

interface UnsubscribeRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “resources/unsubscribe”;
  params: UnsubscribeRequestParams;
}Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “resources/unsubscribe”Permalink Overrides JSONRPCRequest.method params: UnsubscribeRequestParamsPermalink Overrides JSONRPCRequest.params

UnsubscribeRequestParams

interface UnsubscribeRequestParams {
  _meta?: { progressToken?: ProgressToken; [key: string]: unknown };
  uri: string;
}Parameters for a resources/unsubscribe request. _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from ResourceRequestParams._meta 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

roots/list

ListRootsRequest

interface ListRootsRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  method: “roots/list”;
  params?: RequestParams;
}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. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “roots/list”Permalink Overrides JSONRPCRequest.method params?: RequestParamsPermalink Overrides JSONRPCRequest.params

ListRootsResult

interface ListRootsResult {
  _meta?: { [key: string]: unknown };
  roots: Root[];
  [key: string]: unknown;
}The client’s response to a roots/list request from the server. This result contains an array of Root objects, each representing a root directory or file that the server can operate on. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta roots: Root[]Permalink

Root

interface Root {
  uri: string;
  name?: string;
  _meta?: { [key: string]: unknown };
}Represents a root directory or file that the server can operate on. 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?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

sampling/createMessage

CreateMessageRequest

interface CreateMessageRequest {
  jsonrpc: “2.0”;
  id: RequestId;
  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. jsonrpc: “2.0”Permalink Inherited from JSONRPCRequest.jsonrpc id: RequestIdPermalink Inherited from JSONRPCRequest.id method: “sampling/createMessage”Permalink Overrides JSONRPCRequest.method params: CreateMessageRequestParamsPermalink Overrides JSONRPCRequest.params

CreateMessageRequestParams

interface CreateMessageRequestParams {
  task?: TaskMetadata;
  _meta?: { progressToken?: ProgressToken; [key: string]: unknown };
  messages: SamplingMessage[];
  modelPreferences?: ModelPreferences;
  systemPrompt?: string;
  includeContext?: “none” | “thisServer” | “allServers”;
  temperature?: number;
  maxTokens: number;
  stopSequences?: string[];
  metadata?: object;
  tools?: Tool[];
  toolChoice?: ToolChoice;
}Parameters for a sampling/createMessage request. task?: TaskMetadataPermalink If specified, the caller is requesting task-augmented execution for this request. The request will return a CreateTaskResult immediately, and the actual result can be retrieved later via tasks/result. Task augmentation is subject to capability negotiation - receivers MUST declare support for task augmentation of specific request types in their capabilities. Inherited from TaskAugmentedRequestParams.task _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from TaskAugmentedRequestParams._meta 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”. Values “thisServer” and “allServers” are soft-deprecated. Servers SHOULD only use these values if the client declares ClientCapabilities.sampling.context. These values may be removed in future spec releases. 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?: objectPermalink 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 {
  _meta?: { [key: string]: unknown };
  model: string;
  stopReason?: string;
  role: Role;
  content: SamplingMessageContentBlock | SamplingMessageContentBlock[];
  [key: string]: unknown;
}The client’s response to a sampling/createMessage request from the server. 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. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta 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

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. 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. 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?: { [key: string]: unknown };
}Describes a message issued to or received from an LLM API. role: RolePermalink content: SamplingMessageContentBlock | SamplingMessageContentBlock[]Permalink _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

SamplingMessageContentBlock

SamplingMessageContentBlock:
  | TextContent
  | ImageContent
  | AudioContent
  | ToolUseContent
  | ToolResultContent

ToolChoice

interface ToolChoice {
  mode?: “none” | “required” | “auto”;
}Controls tool selection behavior for sampling requests. 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?: { [key: string]: unknown };
  isError?: boolean;
  _meta?: { [key: string]: unknown };
}The result of a tool use, provided by the user back to the assistant. 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?: { [key: string]: unknown }Permalink An optional structured result object. If the tool defined an 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?: { [key: string]: unknown }Permalink Optional metadata about the tool result. Clients SHOULD preserve this field when including tool results in subsequent sampling requests to enable caching optimizations. See General fields: _meta for notes on _meta usage.

ToolUseContent

interface ToolUseContent {
  type: “tool_use”;
  id: string;
  name: string;
  input: { [key: string]: unknown };
  _meta?: { [key: string]: unknown };
}A request from the assistant to call a tool. 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?: { [key: string]: unknown }Permalink Optional metadata about the tool use. Clients SHOULD preserve this field when including tool uses in subsequent sampling requests to enable caching optimizations. See General fields: _meta for notes on _meta usage.

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. 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 {
  task?: TaskMetadata;
  _meta?: { progressToken?: ProgressToken; [key: string]: unknown };
  name: string;
  arguments?: { [key: string]: unknown };
}Parameters for a tools/call request. task?: TaskMetadataPermalink If specified, the caller is requesting task-augmented execution for this request. The request will return a CreateTaskResult immediately, and the actual result can be retrieved later via tasks/result. Task augmentation is subject to capability negotiation - receivers MUST declare support for task augmentation of specific request types in their capabilities. Inherited from TaskAugmentedRequestParams.task _meta?: { progressToken?: ProgressToken; [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Type Declaration <ul> <li> [key: string]: unknown <li> OptionalprogressToken?: ProgressToken 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. Inherited from TaskAugmentedRequestParams._meta name: stringPermalink The name of the tool. arguments?: { [key: string]: unknown }Permalink Arguments to use for the tool call.

CallToolResult

interface CallToolResult {
  _meta?: { [key: string]: unknown };
  content: ContentBlock[];
  structuredContent?: { [key: string]: unknown };
  isError?: boolean;
  [key: string]: unknown;
}The server’s response to a tool call. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from Result._meta content: ContentBlock[]Permalink A list of content objects that represent the unstructured result of the tool call. structuredContent?: { [key: string]: unknown }Permalink An optional JSON object that represents the structured result of the tool call. 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. 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

ListToolsResult

interface ListToolsResult {
  _meta?: { [key: string]: unknown };
  nextCursor?: string;
  tools: Tool[];
  [key: string]: unknown;
}The server’s response to a tools/list request from the client. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage. Inherited from PaginatedResult._meta 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 tools: Tool[]Permalink

Tool

interface Tool {
  icons?: Icon[];
  name: string;
  title?: string;
  description?: string;
  inputSchema: {
    $schema?: string;
    type: “object”;
    properties?: { [key: string]: object };
    required?: string[];
  };
  execution?: ToolExecution;
  outputSchema?: {
    $schema?: string;
    type: “object”;
    properties?: { [key: string]: object };
    required?: string[];
  };
  annotations?: ToolAnnotations;
  _meta?: { [key: string]: unknown };
}Definition for a tool the client can call. 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”; properties?: { [key: string]: object }; required?: string[]; }Permalink A JSON Schema object defining the expected parameters for the tool. execution?: ToolExecutionPermalink Execution-related properties for this tool. outputSchema?: { $schema?: string; type: “object”; properties?: { [key: string]: object }; required?: string[]; }Permalink An optional JSON Schema object defining the structure of the tool’s output returned in the structuredContent field of a CallToolResult. Defaults to JSON Schema 2020-12 when no explicit $schema is provided. Currently restricted to type: “object” at the root level. annotations?: ToolAnnotationsPermalink Optional additional tool information. Display name precedence order is: title, annotations.title, then name. _meta?: { [key: string]: unknown }Permalink See General fields: _meta for notes on _meta usage.

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

ToolExecution

interface ToolExecution {
  taskSupport?: “forbidden” | “optional” | “required”;
}Execution-related properties for a tool. taskSupport?: “forbidden” | “optional” | “required”Permalink Indicates whether this tool supports task-augmented execution. This allows clients to handle long-running operations through polling the task system. <ul> <li>“forbidden”: Tool does not support task-augmented execution (default when absent) <li>“optional”: Tool may support task-augmented execution <li>“required”: Tool requires task-augmented execution Default: “forbidden”