MCP TypeScript SDK / types
types
notifications/elicitation/complete
ElicitationCompleteNotificationParamsSchema
constElicitationCompleteNotificationParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;elicitationId:ZodString; },$strip>
Defined in: src/types.ts:2046
Parameters for a notifications/elicitation/complete notification.
ElicitationCompleteNotificationSchema
constElicitationCompleteNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/elicitation/complete">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;elicitationId:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:2058
A notification from the server to the client, informing it of a completion of an out-of-band elicitation request.
notifications/progress
ProgressNotificationSchema
constProgressNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/progress">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;message:ZodOptional<ZodString>;progress:ZodNumber;progressToken:ZodUnion<readonly [ZodString,ZodNumber]>;total:ZodOptional<ZodNumber>; },$strip>; },$strip>
Defined in: src/types.ts:670
An out-of-band notification used to inform the receiver of a progress update for a long-running request.
Other
ErrorCode
Defined in: src/types.ts:191
Error codes defined by the JSON-RPC specification.
Enumeration Members
ConnectionClosed
ConnectionClosed:
-32000
Defined in: src/types.ts:193
InternalError
InternalError:
-32603
Defined in: src/types.ts:201
InvalidParams
InvalidParams:
-32602
Defined in: src/types.ts:200
InvalidRequest
InvalidRequest:
-32600
Defined in: src/types.ts:198
MethodNotFound
MethodNotFound:
-32601
Defined in: src/types.ts:199
ParseError
ParseError:
-32700
Defined in: src/types.ts:197
RequestTimeout
RequestTimeout:
-32001
Defined in: src/types.ts:194
UrlElicitationRequired
UrlElicitationRequired:
-32042
Defined in: src/types.ts:204
McpError
Defined in: src/types.ts:2307
Extends
Error
Extended by
Constructors
Constructor
new McpError(
code,message,data?):McpError
Defined in: src/types.ts:2308
Parameters
code
number
message
string
data?
unknown
Returns
Overrides
Error.constructor
Properties
code
readonlycode:number
Defined in: src/types.ts:2309
data?
readonlyoptionaldata?:unknown
Defined in: src/types.ts:2311
message
message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.message
name
name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.name
stack?
optionalstack?:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stack
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimit
Methods
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
Error.captureStackTrace
fromError()
staticfromError(code,message,data?):McpError
Defined in: src/types.ts:2320
Factory method to create the appropriate error type based on the error code and data
Parameters
code
number
message
string
data?
unknown
Returns
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTrace
UrlElicitationRequiredError
Defined in: src/types.ts:2338
Specialized error type when a tool requires a URL mode elicitation. This makes it nicer for the client to handle since there is specific data to work with instead of just a code to check against.
Extends
Constructors
Constructor
new UrlElicitationRequiredError(
elicitations,message?):UrlElicitationRequiredError
Defined in: src/types.ts:2339
Parameters
elicitations
object[]
message?
string = ...
Returns
Overrides
Properties
code
readonlycode:number
Defined in: src/types.ts:2309
Inherited from
data?
readonlyoptionaldata?:unknown
Defined in: src/types.ts:2311
Inherited from
message
message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
elicitations
Get Signature
get elicitations():
object[]
Defined in: src/types.ts:2345
Returns
Methods
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
fromError()
staticfromError(code,message,data?):McpError
Defined in: src/types.ts:2320
Factory method to create the appropriate error type based on the error code and data
Parameters
code
number
message
string
data?
unknown
Returns
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
CreateMessageRequestParamsWithTools
Defined in: src/types.ts:2571
CreateMessageRequestParams with required tools - for tool-enabled overload.
Extends
Properties
_meta?
optional_meta?:object
Defined in: src/types.ts:78
See General fields: _meta for notes on _meta usage.
Index Signature
[key: string]: unknown
io.modelcontextprotocol/related-task?
optionalio.modelcontextprotocol/related-task?:object
If specified, this request is related to the provided task.
io.modelcontextprotocol/related-task.taskId
taskId:
string
progressToken?
optionalprogressToken?:string|number
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
CreateMessageRequestParams._meta
includeContext?
optionalincludeContext?:"none"|"thisServer"|"allServers"
Defined in: src/types.ts:1759
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.
Inherited from
CreateMessageRequestParams.includeContext
maxTokens
maxTokens:
number
Defined in: src/types.ts:1766
The requested maximum number of tokens to sample (to prevent runaway completions).
The client MAY choose to sample fewer tokens than the requested maximum.
Inherited from
CreateMessageRequestParams.maxTokens
messages
messages:
object[]
Defined in: src/types.ts:1743
_meta?
optional_meta?:object
See MCP specification for notes on _meta usage.
Index Signature
[key: string]: unknown
content
content: {
_meta?: {[key:string]:unknown; };annotations?: {audience?: ("user"|"assistant")[];lastModified?:string;priority?:number; };text:string;type:"text"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ("user"|"assistant")[];lastModified?:string;priority?:number; };data:string;mimeType:string;type:"image"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ("user"|"assistant")[];lastModified?:string;priority?:number; };data:string;mimeType:string;type:"audio"; } | {_meta?: {[key:string]:unknown; };id:string;input: {[key:string]:unknown; };name:string;type:"tool_use"; } | {_meta?: {[key:string]:unknown; };content: ({_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };text:string;type:"text"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };data:string;mimeType:string;type:"image"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };data:string;mimeType:string;type:"audio"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };description?:string;icons?:object[];mimeType?:string;name:string;size?:number;title?:string;type:"resource_link";uri:string; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };resource: {_meta?: {[key: ...]: ...; };mimeType?:string;text:string;uri:string; } | {_meta?: {[key: ...]: ...; };blob:string;mimeType?:string;uri:string; };type:"resource"; })[];isError?:boolean;structuredContent?: {[key:string]:unknown; };toolUseId:string;type:"tool_result"; } | ({_meta?: {[key:string]:unknown; };annotations?: {audience?: (... | ...)[];lastModified?:string;priority?:number; };text:string;type:"text"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: (... | ...)[];lastModified?:string;priority?:number; };data:string;mimeType:string;type:"image"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: (... | ...)[];lastModified?:string;priority?:number; };data:string;mimeType:string;type:"audio"; } | {_meta?: {[key:string]:unknown; };id:string;input: {[key:string]:unknown; };name:string;type:"tool_use"; } | {_meta?: {[key:string]:unknown; };content: ({_meta?: {[key: ...]: ...; };annotations?: {audience?: ...;lastModified?: ...;priority?: ...; };text:string;type:"text"; } | {_meta?: {[key: ...]: ...; };annotations?: {audience?: ...;lastModified?: ...;priority?: ...; };data:string;mimeType:string;type:"image"; } | {_meta?: {[key: ...]: ...; };annotations?: {audience?: ...;lastModified?: ...;priority?: ...; };data:string;mimeType:string;type:"audio"; } | {_meta?: {[key: ...]: ...; };annotations?: {audience?: ...;lastModified?: ...;priority?: ...; };description?:string;icons?: ...[];mimeType?:string;name:string;size?:number;title?:string;type:"resource_link";uri:string; } | {_meta?: {[key: ...]: ...; };annotations?: {audience?: ...;lastModified?: ...;priority?: ...; };resource: {_meta?: ...;mimeType?: ...;text: ...;uri: ...; } | {_meta?: ...;blob: ...;mimeType?: ...;uri: ...; };type:"resource"; })[];isError?:boolean;structuredContent?: {[key:string]:unknown; };toolUseId:string;type:"tool_result"; })[]
Union Members
Type Literal
{ _meta?: {[key: string]: unknown; }; annotations?: { audience?: ("user" | "assistant")[]; lastModified?: string; priority?: number; }; text: string; type: "text"; }
_meta?
optional_meta?:object
See MCP specification for notes on _meta usage.
Index Signature
[key: string]: unknown
annotations?
optionalannotations?:object
Optional annotations for the client.
annotations.audience?
optionalaudience?: ("user"|"assistant")[]
Intended audience(s) for the resource.
annotations.lastModified?
optionallastModified?:string
ISO 8601 timestamp for the most recent modification.
annotations.priority?
optionalpriority?:number
Importance hint for the resource, from 0 (least) to 1 (most).
text
text:
string
The text content of the message.
type
type:
"text"
Type Literal
{ _meta?: {[key: string]: unknown; }; annotations?: { audience?: ("user" | "assistant")[]; lastModified?: string; priority?: number; }; data: string; mimeType: string; type: "image"; }
_meta?
optional_meta?:object
See MCP specification for notes on _meta usage.
Index Signature
[key: string]: unknown
annotations?
optionalannotations?:object
Optional annotations for the client.
annotations.audience?
optionalaudience?: ("user"|"assistant")[]
Intended audience(s) for the resource.
annotations.lastModified?
optionallastModified?:string
ISO 8601 timestamp for the most recent modification.
annotations.priority?
optionalpriority?:number
Importance hint for the resource, from 0 (least) to 1 (most).
data
data:
string=Base64Schema
The base64-encoded image data.
mimeType
mimeType:
string
The MIME type of the image. Different providers may support different image types.
type
type:
"image"
Type Literal
{ _meta?: {[key: string]: unknown; }; annotations?: { audience?: ("user" | "assistant")[]; lastModified?: string; priority?: number; }; data: string; mimeType: string; type: "audio"; }
_meta?
optional_meta?:object
See MCP specification for notes on _meta usage.
Index Signature
[key: string]: unknown
annotations?
optionalannotations?:object
Optional annotations for the client.
annotations.audience?
optionalaudience?: ("user"|"assistant")[]
Intended audience(s) for the resource.
annotations.lastModified?
optionallastModified?:string
ISO 8601 timestamp for the most recent modification.
annotations.priority?
optionalpriority?:number
Importance hint for the resource, from 0 (least) to 1 (most).
data
data:
string=Base64Schema
The base64-encoded audio data.
mimeType
mimeType:
string
The MIME type of the audio. Different providers may support different audio types.
type
type:
"audio"
Type Literal
{ _meta?: {[key: string]: unknown; }; id: string; input: {[key: string]: unknown; }; name: string; type: "tool_use"; }
_meta?
optional_meta?:object
See MCP specification for notes on _meta usage.
Index Signature
[key: string]: unknown
id
id:
string
Unique identifier for this tool call. Used to correlate with ToolResultContent in subsequent messages.
input
input:
object
Arguments to pass to the tool. Must conform to the tool's inputSchema.
Index Signature
[key: string]: unknown
name
name:
string
The name of the tool to invoke. Must match a tool name from the request's tools array.
type
type:
"tool_use"
Type Literal
{ _meta?: {[key: string]: unknown; }; content: ({ _meta?: {[key: string]: unknown; }; annotations?: { audience?: ...[]; lastModified?: string; priority?: number; }; text: string; type: "text"; } | { _meta?: {[key: string]: unknown; }; annotations?: { audience?: ...[]; lastModified?: string; priority?: number; }; data: string; mimeType: string; type: "image"; } | { _meta?: {[key: string]: unknown; }; annotations?: { audience?: ...[]; lastModified?: string; priority?: number; }; data: string; mimeType: string; type: "audio"; } | { _meta?: {[key: string]: unknown; }; annotations?: { audience?: ...[]; lastModified?: string; priority?: number; }; description?: string; icons?: object[]; mimeType?: string; name: string; size?: number; title?: string; type: "resource_link"; uri: string; } | { _meta?: {[key: string]: unknown; }; annotations?: { audience?: ...[]; lastModified?: string; priority?: number; }; resource: { _meta?: {[key: ...]: ...; }; mimeType?: string; text: string; uri: string; } | { _meta?: {[key: ...]: ...; }; blob: string; mimeType?: string; uri: string; }; type: "resource"; })[]; isError?: boolean; structuredContent?: {[key: string]: unknown; }; toolUseId: string; type: "tool_result"; }
_meta?
optional_meta?:object
See MCP specification for notes on _meta usage.
Index Signature
[key: string]: unknown
content
content: ({
_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };text:string;type:"text"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };data:string;mimeType:string;type:"image"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };data:string;mimeType:string;type:"audio"; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };description?:string;icons?:object[];mimeType?:string;name:string;size?:number;title?:string;type:"resource_link";uri:string; } | {_meta?: {[key:string]:unknown; };annotations?: {audience?: ...[];lastModified?:string;priority?:number; };resource: {_meta?: {[key: ...]: ...; };mimeType?:string;text:string;uri:string; } | {_meta?: {[key: ...]: ...; };blob:string;mimeType?:string;uri:string; };type:"resource"; })[]
isError?
optionalisError?:boolean
structuredContent?
optionalstructuredContent?:object
Index Signature
[key: string]: unknown
toolUseId
toolUseId:
string
type
type:
"tool_result"
({ _meta?: {[key: string]: unknown; }; annotations?: { audience?: (... | ...)[]; lastModified?: string; priority?: number; }; text: string; type: "text"; } | { _meta?: {[key: string]: unknown; }; annotations?: { audience?: (... | ...)[]; lastModified?: string; priority?: number; }; data: string; mimeType: string; type: "image"; } | { _meta?: {[key: string]: unknown; }; annotations?: { audience?: (... | ...)[]; lastModified?: string; priority?: number; }; data: string; mimeType: string; type: "audio"; } | { _meta?: {[key: string]: unknown; }; id: string; input: {[key: string]: unknown; }; name: string; type: "tool_use"; } | { _meta?: {[key: string]: unknown; }; content: ({ _meta?: {[key: ...]: ...; }; annotations?: { audience?: ...; lastModified?: ...; priority?: ...; }; text: string; type: "text"; } | { _meta?: {[key: ...]: ...; }; annotations?: { audience?: ...; lastModified?: ...; priority?: ...; }; data: string; mimeType: string; type: "image"; } | { _meta?: {[key: ...]: ...; }; annotations?: { audience?: ...; lastModified?: ...; priority?: ...; }; data: string; mimeType: string; type: "audio"; } | { _meta?: {[key: ...]: ...; }; annotations?: { audience?: ...; lastModified?: ...; priority?: ...; }; description?: string; icons?: ...[]; mimeType?: string; name: string; size?: number; title?: string; type: "resource_link"; uri: string; } | { _meta?: {[key: ...]: ...; }; annotations?: { audience?: ...; lastModified?: ...; priority?: ...; }; resource: { _meta?: ...; mimeType?: ...; text: ...; uri: ...; } | { _meta?: ...; blob: ...; mimeType?: ...; uri: ...; }; type: "resource"; })[]; isError?: boolean; structuredContent?: {[key: string]: unknown; }; toolUseId: string; type: "tool_result"; })[]
role
role:
"user"|"assistant"=RoleSchema
Inherited from
CreateMessageRequestParams.messages
metadata?
optionalmetadata?:object
Defined in: src/types.ts:1771
Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
Inherited from
CreateMessageRequestParams.metadata
modelPreferences?
optionalmodelPreferences?:object
Defined in: src/types.ts:1747
The server's preferences for which model to select. The client MAY modify or omit this request.
costPriority?
optionalcostPriority?:number
How much to prioritize cost when selecting a model.
hints?
optionalhints?:object[]
Optional hints to use for model selection.
intelligencePriority?
optionalintelligencePriority?:number
How much to prioritize intelligence and capabilities when selecting a model.
speedPriority?
optionalspeedPriority?:number
How much to prioritize sampling speed (latency) when selecting a model.
Inherited from
CreateMessageRequestParams.modelPreferences
stopSequences?
optionalstopSequences?:string[]
Defined in: src/types.ts:1767
Inherited from
CreateMessageRequestParams.stopSequences
systemPrompt?
optionalsystemPrompt?:string
Defined in: src/types.ts:1751
An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
Inherited from
CreateMessageRequestParams.systemPrompt
task?
optionaltask?:object
Defined in: src/types.ts:93
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.
ttl?
optionalttl?:number
Inherited from
CreateMessageRequestParams.task
temperature?
optionaltemperature?:number
Defined in: src/types.ts:1760
Inherited from
CreateMessageRequestParams.temperature
toolChoice?
optionaltoolChoice?:object
Defined in: src/types.ts:1782
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" }.
mode?
optionalmode?:"required"|"none"|"auto"
Controls when tools are used:
- "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
Inherited from
CreateMessageRequestParams.toolChoice
tools
tools:
object[]
Defined in: src/types.ts:2572
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.
_meta?
optional_meta?:object
See MCP specification for notes on _meta usage.
Index Signature
[key: string]: unknown
annotations?
optionalannotations?:object
Optional additional tool information.
annotations.destructiveHint?
optionaldestructiveHint?:boolean
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
annotations.idempotentHint?
optionalidempotentHint?:boolean
If true, calling the tool repeatedly with the same arguments will have no additional effect on the its environment.
(This property is meaningful only when readOnlyHint == false)
Default: false
annotations.openWorldHint?
optionalopenWorldHint?:boolean
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
annotations.readOnlyHint?
optionalreadOnlyHint?:boolean
If true, the tool does not modify its environment.
Default: false
annotations.title?
optionaltitle?:string
A human-readable title for the tool.
description?
optionaldescription?:string
A human-readable description of the tool.
execution?
optionalexecution?:object
Execution-related properties for this tool.
execution.taskSupport?
optionaltaskSupport?:"optional"|"required"|"forbidden"
Indicates the tool's preference for task-augmented execution.
- "required": Clients MUST invoke the tool as a task
- "optional": Clients MAY invoke the tool as a task or normal request
- "forbidden": Clients MUST NOT attempt to invoke the tool as a task
If not present, defaults to "forbidden".
icons?
optionalicons?:object[]
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)
inputSchema
inputSchema:
object
A JSON Schema 2020-12 object defining the expected parameters for the tool. Must have type: 'object' at the root level per MCP spec.
Index Signature
[key: string]: unknown
inputSchema.properties?
optionalproperties?:object
Index Signature
[key: string]: object
inputSchema.required?
optionalrequired?:string[]
inputSchema.type
type:
"object"
name
name:
string
Intended for programmatic or logical use, but used as a display name in past specs or fallback
outputSchema?
optionaloutputSchema?:object
An optional JSON Schema 2020-12 object defining the structure of the tool's output returned in the structuredContent field of a CallToolResult. Must have type: 'object' at the root level per MCP spec.
Index Signature
[key: string]: unknown
outputSchema.properties?
optionalproperties?:object
Index Signature
[key: string]: object
outputSchema.required?
optionalrequired?:string[]
outputSchema.type
type:
"object"
title?
optionaltitle?:string
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).
Overrides
CreateMessageRequestParams.tools
MessageExtraInfo
Defined in: src/types.ts:2387
Extra information about a message.
Properties
authInfo?
optionalauthInfo?:AuthInfo
Defined in: src/types.ts:2396
The authentication information.
closeSSEStream?
optionalcloseSSEStream?: () =>void
Defined in: src/types.ts:2402
Callback to close the SSE stream for this request, triggering client reconnection. Only available when using StreamableHTTPServerTransport with eventStore configured.
Returns
void
closeStandaloneSSEStream?
optionalcloseStandaloneSSEStream?: () =>void
Defined in: src/types.ts:2408
Callback to close the standalone GET SSE stream, triggering client reconnection. Only available when using StreamableHTTPServerTransport with eventStore configured.
Returns
void
requestInfo?
optionalrequestInfo?:RequestInfo
Defined in: src/types.ts:2391
The request information.
RequestInfo
Defined in: src/types.ts:2373
Information about the incoming request.
Properties
headers
headers:
IsomorphicHeaders
Defined in: src/types.ts:2377
The headers of the request.
url?
optionalurl?:URL
Defined in: src/types.ts:2381
The full URL of the request.
Annotations
Annotations =
Infer<typeofAnnotationsSchema>
Defined in: src/types.ts:2447
AudioContent
AudioContent =
Infer<typeofAudioContentSchema>
Defined in: src/types.ts:2521
BaseMetadata
BaseMetadata =
Infer<typeofBaseMetadataSchema>
Defined in: src/types.ts:2446
BlobResourceContents
BlobResourceContents =
Infer<typeofBlobResourceContentsSchema>
Defined in: src/types.ts:2493
BooleanSchema
BooleanSchema =
Infer<typeofBooleanSchemaSchema>
Defined in: src/types.ts:2576
CallToolRequest
CallToolRequest =
Infer<typeofCallToolRequestSchema>
Defined in: src/types.ts:2540
CallToolRequestParams
CallToolRequestParams =
Infer<typeofCallToolRequestParamsSchema>
Defined in: src/types.ts:2537
CallToolResult
CallToolResult =
Infer<typeofCallToolResultSchema>
Defined in: src/types.ts:2538
CancelledNotification
CancelledNotification =
Infer<typeofCancelledNotificationSchema>
Defined in: src/types.ts:2441
CancelledNotificationParams
CancelledNotificationParams =
Infer<typeofCancelledNotificationParamsSchema>
Defined in: src/types.ts:2440
CancelTaskRequest
CancelTaskRequest =
Infer<typeofCancelTaskRequestSchema>
Defined in: src/types.ts:2481
CancelTaskResult
CancelTaskResult =
Infer<typeofCancelTaskResultSchema>
Defined in: src/types.ts:2482
ClientCapabilities
ClientCapabilities =
Infer<typeofClientCapabilitiesSchema>
Defined in: src/types.ts:2452
ClientNotification
ClientNotification =
Infer<typeofClientNotificationSchema>
Defined in: src/types.ts:2621
ClientRequest
ClientRequest =
Infer<typeofClientRequestSchema>
Defined in: src/types.ts:2620
ClientResult
ClientResult =
Infer<typeofClientResultSchema>
Defined in: src/types.ts:2622
CompatibilityCallToolResult
CompatibilityCallToolResult =
Infer<typeofCompatibilityCallToolResultSchema>
Defined in: src/types.ts:2539
CompleteRequest
CompleteRequest =
Infer<typeofCompleteRequestSchema>
Defined in: src/types.ts:2606
CompleteRequestParams
CompleteRequestParams =
Infer<typeofCompleteRequestParamsSchema>
Defined in: src/types.ts:2605
CompleteRequestPrompt
CompleteRequestPrompt =
ExpandRecursively<CompleteRequest&object>
Defined in: src/types.ts:2610
CompleteRequestResourceTemplate
CompleteRequestResourceTemplate =
ExpandRecursively<CompleteRequest&object>
Defined in: src/types.ts:2607
CompleteResult
CompleteResult =
Infer<typeofCompleteResultSchema>
Defined in: src/types.ts:2611
ContentBlock
ContentBlock =
Infer<typeofContentBlockSchema>
Defined in: src/types.ts:2526
CreateMessageRequest
CreateMessageRequest =
Infer<typeofCreateMessageRequestSchema>
Defined in: src/types.ts:2558
CreateMessageRequestParams
CreateMessageRequestParams =
Infer<typeofCreateMessageRequestParamsSchema>
Defined in: src/types.ts:2557
CreateMessageRequestParamsBase
CreateMessageRequestParamsBase =
Omit<CreateMessageRequestParams,"tools"|"toolChoice">
Defined in: src/types.ts:2566
CreateMessageRequestParams without tools - for backwards-compatible overload. Excludes tools/toolChoice to indicate they should not be provided.
CreateMessageResult
CreateMessageResult =
Infer<typeofCreateMessageResultSchema>
Defined in: src/types.ts:2559
CreateMessageResultWithTools
CreateMessageResultWithTools =
Infer<typeofCreateMessageResultWithToolsSchema>
Defined in: src/types.ts:2560
CreateTaskResult
CreateTaskResult =
Infer<typeofCreateTaskResultSchema>
Defined in: src/types.ts:2473
Cursor
Cursor =
Infer<typeofCursorSchema>
Defined in: src/types.ts:2413
ElicitationCompleteNotification
ElicitationCompleteNotification =
Infer<typeofElicitationCompleteNotificationSchema>
Defined in: src/types.ts:2595
ElicitationCompleteNotificationParams
ElicitationCompleteNotificationParams =
Infer<typeofElicitationCompleteNotificationParamsSchema>
Defined in: src/types.ts:2594
ElicitRequest
ElicitRequest =
Infer<typeofElicitRequestSchema>
Defined in: src/types.ts:2593
ElicitRequestFormParams
ElicitRequestFormParams =
Infer<typeofElicitRequestFormParamsSchema>
Defined in: src/types.ts:2591
ElicitRequestParams
ElicitRequestParams =
Infer<typeofElicitRequestParamsSchema>
Defined in: src/types.ts:2590
ElicitRequestURLParams
ElicitRequestURLParams =
Infer<typeofElicitRequestURLParamsSchema>
Defined in: src/types.ts:2592
ElicitResult
ElicitResult =
Infer<typeofElicitResultSchema>
Defined in: src/types.ts:2596
EmbeddedResource
EmbeddedResource =
Infer<typeofEmbeddedResourceSchema>
Defined in: src/types.ts:2524
EmptyResult
EmptyResult =
Infer<typeofEmptyResultSchema>
Defined in: src/types.ts:2437
EnumSchema
EnumSchema =
Infer<typeofEnumSchemaSchema>
Defined in: src/types.ts:2580
GetPromptRequest
GetPromptRequest =
Infer<typeofGetPromptRequestSchema>
Defined in: src/types.ts:2518
GetPromptRequestParams
GetPromptRequestParams =
Infer<typeofGetPromptRequestParamsSchema>
Defined in: src/types.ts:2517
GetPromptResult
GetPromptResult =
Infer<typeofGetPromptResultSchema>
Defined in: src/types.ts:2528
GetTaskPayloadRequest
GetTaskPayloadRequest =
Infer<typeofGetTaskPayloadRequestSchema>
Defined in: src/types.ts:2478
GetTaskPayloadResult
GetTaskPayloadResult =
Infer<typeofGetTaskPayloadResultSchema>
Defined in: src/types.ts:2483
GetTaskRequest
GetTaskRequest =
Infer<typeofGetTaskRequestSchema>
Defined in: src/types.ts:2476
GetTaskResult
GetTaskResult =
Infer<typeofGetTaskResultSchema>
Defined in: src/types.ts:2477
Icon
Icon =
Infer<typeofIconSchema>
Defined in: src/types.ts:2444
Icons
Icons =
Infer<typeofIconsSchema>
Defined in: src/types.ts:2445
ImageContent
ImageContent =
Infer<typeofImageContentSchema>
Defined in: src/types.ts:2520
Implementation
Implementation =
Infer<typeofImplementationSchema>
Defined in: src/types.ts:2451
InitializedNotification
InitializedNotification =
Infer<typeofInitializedNotificationSchema>
Defined in: src/types.ts:2457
InitializeRequest
InitializeRequest =
Infer<typeofInitializeRequestSchema>
Defined in: src/types.ts:2454
InitializeRequestParams
InitializeRequestParams =
Infer<typeofInitializeRequestParamsSchema>
Defined in: src/types.ts:2453
InitializeResult
InitializeResult =
Infer<typeofInitializeResultSchema>
Defined in: src/types.ts:2456
IsomorphicHeaders
IsomorphicHeaders =
Record<string,string|string[] |undefined>
Defined in: src/types.ts:2368
Headers that are compatible with both Node.js and the browser.
JSONRPCError
JSONRPCError =
JSONRPCErrorResponse
Defined in: src/types.ts:2429
Deprecated
Use JSONRPCErrorResponse instead.
Please note that spec types have renamed JSONRPCError to JSONRPCErrorResponse as per the updated JSON-RPC specification. (was previously just JSONRPCError) and future versions will remove JSONRPCError.
JSONRPCErrorResponse
JSONRPCErrorResponse =
Infer<typeofJSONRPCErrorResponseSchema>
Defined in: src/types.ts:2423
JSONRPCMessage
JSONRPCMessage =
Infer<typeofJSONRPCMessageSchema>
Defined in: src/types.ts:2432
JSONRPCNotification
JSONRPCNotification =
Infer<typeofJSONRPCNotificationSchema>
Defined in: src/types.ts:2421
JSONRPCRequest
JSONRPCRequest =
Infer<typeofJSONRPCRequestSchema>
Defined in: src/types.ts:2420
JSONRPCResponse
JSONRPCResponse =
Infer<typeofJSONRPCResponseSchema>
Defined in: src/types.ts:2422
JSONRPCResultResponse
JSONRPCResultResponse =
Infer<typeofJSONRPCResultResponseSchema>
Defined in: src/types.ts:2430
LegacyTitledEnumSchema
LegacyTitledEnumSchema =
Infer<typeofLegacyTitledEnumSchemaSchema>
Defined in: src/types.ts:2583
ListChangedCallback
ListChangedCallback<
T> = (error,items) =>void
Defined in: src/types.ts:1519
Callback type for list changed notifications.
Type Parameters
T
T
Parameters
error
Error | null
items
T[] | null
Returns
void
ListChangedHandlers
ListChangedHandlers =
object
Defined in: src/types.ts:1581
Configuration for list changed notification handlers.
Use this to configure handlers for tools, prompts, and resources list changes when creating a client.
Note: Handlers are only activated if the server advertises the corresponding listChanged capability (e.g., tools.listChanged: true). If the server doesn't advertise this capability, the handler will not be set up.
Properties
prompts?
optionalprompts?:ListChangedOptions<Prompt>
Defined in: src/types.ts:1589
Handler for prompt list changes.
resources?
optionalresources?:ListChangedOptions<Resource>
Defined in: src/types.ts:1593
Handler for resource list changes.
tools?
optionaltools?:ListChangedOptions<Tool>
Defined in: src/types.ts:1585
Handler for tool list changes.
ListChangedOptions
ListChangedOptions<
T> =object
Defined in: src/types.ts:1551
Options for subscribing to list changed notifications.
Type Parameters
T
T
The type of items in the list (Tool, Prompt, or Resource)
Properties
autoRefresh?
optionalautoRefresh?:boolean
Defined in: src/types.ts:1556
If true, the list will be refreshed automatically when a list changed notification is received.
Default
truedebounceMs?
optionaldebounceMs?:number
Defined in: src/types.ts:1561
Debounce time in milliseconds. Set to 0 to disable.
Default
300onChanged
onChanged:
ListChangedCallback<T>
Defined in: src/types.ts:1568
Callback invoked when the list changes.
If autoRefresh is true, items contains the updated list. If autoRefresh is false, items is null (caller should refresh manually).
ListPromptsRequest
ListPromptsRequest =
Infer<typeofListPromptsRequestSchema>
Defined in: src/types.ts:2515
ListPromptsResult
ListPromptsResult =
Infer<typeofListPromptsResultSchema>
Defined in: src/types.ts:2516
ListResourcesRequest
ListResourcesRequest =
Infer<typeofListResourcesRequestSchema>
Defined in: src/types.ts:2496
ListResourcesResult
ListResourcesResult =
Infer<typeofListResourcesResultSchema>
Defined in: src/types.ts:2497
ListResourceTemplatesRequest
ListResourceTemplatesRequest =
Infer<typeofListResourceTemplatesRequestSchema>
Defined in: src/types.ts:2498
ListResourceTemplatesResult
ListResourceTemplatesResult =
Infer<typeofListResourceTemplatesResultSchema>
Defined in: src/types.ts:2499
ListRootsRequest
ListRootsRequest =
Infer<typeofListRootsRequestSchema>
Defined in: src/types.ts:2615
ListRootsResult
ListRootsResult =
Infer<typeofListRootsResultSchema>
Defined in: src/types.ts:2616
ListTasksRequest
ListTasksRequest =
Infer<typeofListTasksRequestSchema>
Defined in: src/types.ts:2479
ListTasksResult
ListTasksResult =
Infer<typeofListTasksResultSchema>
Defined in: src/types.ts:2480
ListToolsRequest
ListToolsRequest =
Infer<typeofListToolsRequestSchema>
Defined in: src/types.ts:2535
ListToolsResult
ListToolsResult =
Infer<typeofListToolsResultSchema>
Defined in: src/types.ts:2536
LoggingLevel
LoggingLevel =
Infer<typeofLoggingLevelSchema>
Defined in: src/types.ts:2544
LoggingMessageNotification
LoggingMessageNotification =
Infer<typeofLoggingMessageNotificationSchema>
Defined in: src/types.ts:2548
LoggingMessageNotificationParams
LoggingMessageNotificationParams =
Infer<typeofLoggingMessageNotificationParamsSchema>
Defined in: src/types.ts:2547
ModelHint
ModelHint =
Infer<typeofModelHintSchema>
Defined in: src/types.ts:2552
ModelPreferences
ModelPreferences =
Infer<typeofModelPreferencesSchema>
Defined in: src/types.ts:2553
MultiSelectEnumSchema
MultiSelectEnumSchema =
Infer<typeofMultiSelectEnumSchemaSchema>
Defined in: src/types.ts:2587
Notification
Notification =
Infer<typeofNotificationSchema>
Defined in: src/types.ts:2417
NotificationParams
NotificationParams =
Infer<typeofNotificationsParamsSchema>
Defined in: src/types.ts:2434
NumberSchema
NumberSchema =
Infer<typeofNumberSchemaSchema>
Defined in: src/types.ts:2578
PaginatedRequest
PaginatedRequest =
Infer<typeofPaginatedRequestSchema>
Defined in: src/types.ts:2487
PaginatedRequestParams
PaginatedRequestParams =
Infer<typeofPaginatedRequestParamsSchema>
Defined in: src/types.ts:2486
PaginatedResult
PaginatedResult =
Infer<typeofPaginatedResultSchema>
Defined in: src/types.ts:2488
PingRequest
PingRequest =
Infer<typeofPingRequestSchema>
Defined in: src/types.ts:2460
PrimitiveSchemaDefinition
PrimitiveSchemaDefinition =
Infer<typeofPrimitiveSchemaDefinitionSchema>
Defined in: src/types.ts:2589
Progress
Progress =
Infer<typeofProgressSchema>
Defined in: src/types.ts:2463
ProgressNotification
ProgressNotification =
Infer<typeofProgressNotificationSchema>
Defined in: src/types.ts:2465
ProgressNotificationParams
ProgressNotificationParams =
Infer<typeofProgressNotificationParamsSchema>
Defined in: src/types.ts:2464
ProgressToken
ProgressToken =
Infer<typeofProgressTokenSchema>
Defined in: src/types.ts:2412
Prompt
Prompt =
Infer<typeofPromptSchema>
Defined in: src/types.ts:2514
PromptArgument
PromptArgument =
Infer<typeofPromptArgumentSchema>
Defined in: src/types.ts:2513
PromptListChangedNotification
PromptListChangedNotification =
Infer<typeofPromptListChangedNotificationSchema>
Defined in: src/types.ts:2529
PromptMessage
PromptMessage =
Infer<typeofPromptMessageSchema>
Defined in: src/types.ts:2527
PromptReference
PromptReference =
Infer<typeofPromptReferenceSchema>
Defined in: src/types.ts:2604
ReadResourceRequest
ReadResourceRequest =
Infer<typeofReadResourceRequestSchema>
Defined in: src/types.ts:2502
ReadResourceRequestParams
ReadResourceRequestParams =
Infer<typeofReadResourceRequestParamsSchema>
Defined in: src/types.ts:2501
ReadResourceResult
ReadResourceResult =
Infer<typeofReadResourceResultSchema>
Defined in: src/types.ts:2503
RelatedTaskMetadata
RelatedTaskMetadata =
Infer<typeofRelatedTaskMetadataSchema>
Defined in: src/types.ts:2472
Request
Request =
Infer<typeofRequestSchema>
Defined in: src/types.ts:2414
RequestId
RequestId =
Infer<typeofRequestIdSchema>
Defined in: src/types.ts:2419
RequestMeta
RequestMeta =
Infer<typeofRequestMetaSchema>
Defined in: src/types.ts:2416
RequestParams
RequestParams =
Infer<typeofBaseRequestParamsSchema>
Defined in: src/types.ts:2433
Resource
Resource =
Infer<typeofResourceSchema>
Defined in: src/types.ts:2494
ResourceContents
ResourceContents =
Infer<typeofResourceContentsSchema>
Defined in: src/types.ts:2491
ResourceLink
ResourceLink =
Infer<typeofResourceLinkSchema>
Defined in: src/types.ts:2525
ResourceListChangedNotification
ResourceListChangedNotification =
Infer<typeofResourceListChangedNotificationSchema>
Defined in: src/types.ts:2504
ResourceReference
ResourceReference =
ResourceTemplateReference
Defined in: src/types.ts:2603
Deprecated
Use ResourceTemplateReference instead
ResourceRequestParams
ResourceRequestParams =
Infer<typeofResourceRequestParamsSchema>
Defined in: src/types.ts:2500
ResourceTemplate
ResourceTemplate =
Infer<typeofResourceTemplateSchema>
Defined in: src/types.ts:2495
ResourceTemplateReference
ResourceTemplateReference =
Infer<typeofResourceTemplateReferenceSchema>
Defined in: src/types.ts:2599
ResourceUpdatedNotification
ResourceUpdatedNotification =
Infer<typeofResourceUpdatedNotificationSchema>
Defined in: src/types.ts:2510
ResourceUpdatedNotificationParams
ResourceUpdatedNotificationParams =
Infer<typeofResourceUpdatedNotificationParamsSchema>
Defined in: src/types.ts:2509
Result
Result =
Infer<typeofResultSchema>
Defined in: src/types.ts:2418
Role
Role =
Infer<typeofRoleSchema>
Defined in: src/types.ts:2448
Root
Root =
Infer<typeofRootSchema>
Defined in: src/types.ts:2614
RootsListChangedNotification
RootsListChangedNotification =
Infer<typeofRootsListChangedNotificationSchema>
Defined in: src/types.ts:2617
SamplingContent
SamplingContent =
Infer<typeofSamplingContentSchema>
Defined in: src/types.ts:2554
SamplingMessage
SamplingMessage =
Infer<typeofSamplingMessageSchema>
Defined in: src/types.ts:2556
SamplingMessageContentBlock
SamplingMessageContentBlock =
Infer<typeofSamplingMessageContentBlockSchema>
Defined in: src/types.ts:2555
ServerCapabilities
ServerCapabilities =
Infer<typeofServerCapabilitiesSchema>
Defined in: src/types.ts:2455
ServerNotification
ServerNotification =
Infer<typeofServerNotificationSchema>
Defined in: src/types.ts:2626
ServerRequest
ServerRequest =
Infer<typeofServerRequestSchema>
Defined in: src/types.ts:2625
ServerResult
ServerResult =
Infer<typeofServerResultSchema>
Defined in: src/types.ts:2627
SetLevelRequest
SetLevelRequest =
Infer<typeofSetLevelRequestSchema>
Defined in: src/types.ts:2546
SetLevelRequestParams
SetLevelRequestParams =
Infer<typeofSetLevelRequestParamsSchema>
Defined in: src/types.ts:2545
SingleSelectEnumSchema
SingleSelectEnumSchema =
Infer<typeofSingleSelectEnumSchemaSchema>
Defined in: src/types.ts:2586
StringSchema
StringSchema =
Infer<typeofStringSchemaSchema>
Defined in: src/types.ts:2577
SubscribeRequest
SubscribeRequest =
Infer<typeofSubscribeRequestSchema>
Defined in: src/types.ts:2506
SubscribeRequestParams
SubscribeRequestParams =
Infer<typeofSubscribeRequestParamsSchema>
Defined in: src/types.ts:2505
Task
Task =
Infer<typeofTaskSchema>
Defined in: src/types.ts:2468
TaskAugmentedRequestParams
TaskAugmentedRequestParams =
Infer<typeofTaskAugmentedRequestParamsSchema>
Defined in: src/types.ts:2415
TaskCreationParams
TaskCreationParams =
Infer<typeofTaskCreationParamsSchema>
Defined in: src/types.ts:2470
TaskMetadata
TaskMetadata =
Infer<typeofTaskMetadataSchema>
Defined in: src/types.ts:2471
TaskStatus
TaskStatus =
Infer<typeofTaskStatusSchema>
Defined in: src/types.ts:2469
TaskStatusNotification
TaskStatusNotification =
Infer<typeofTaskStatusNotificationSchema>
Defined in: src/types.ts:2475
TaskStatusNotificationParams
TaskStatusNotificationParams =
Infer<typeofTaskStatusNotificationParamsSchema>
Defined in: src/types.ts:2474
TextContent
TextContent =
Infer<typeofTextContentSchema>
Defined in: src/types.ts:2519
TextResourceContents
TextResourceContents =
Infer<typeofTextResourceContentsSchema>
Defined in: src/types.ts:2492
TitledMultiSelectEnumSchema
TitledMultiSelectEnumSchema =
Infer<typeofTitledMultiSelectEnumSchemaSchema>
Defined in: src/types.ts:2585
TitledSingleSelectEnumSchema
TitledSingleSelectEnumSchema =
Infer<typeofTitledSingleSelectEnumSchemaSchema>
Defined in: src/types.ts:2582
Tool
Tool =
Infer<typeofToolSchema>
Defined in: src/types.ts:2534
ToolAnnotations
ToolAnnotations =
Infer<typeofToolAnnotationsSchema>
Defined in: src/types.ts:2532
ToolChoice
ToolChoice =
Infer<typeofToolChoiceSchema>
Defined in: src/types.ts:2551
ToolExecution
ToolExecution =
Infer<typeofToolExecutionSchema>
Defined in: src/types.ts:2533
ToolListChangedNotification
ToolListChangedNotification =
Infer<typeofToolListChangedNotificationSchema>
Defined in: src/types.ts:2541
ToolResultContent
ToolResultContent =
Infer<typeofToolResultContentSchema>
Defined in: src/types.ts:2523
ToolUseContent
ToolUseContent =
Infer<typeofToolUseContentSchema>
Defined in: src/types.ts:2522
UnsubscribeRequest
UnsubscribeRequest =
Infer<typeofUnsubscribeRequestSchema>
Defined in: src/types.ts:2508
UnsubscribeRequestParams
UnsubscribeRequestParams =
Infer<typeofUnsubscribeRequestParamsSchema>
Defined in: src/types.ts:2507
UntitledMultiSelectEnumSchema
UntitledMultiSelectEnumSchema =
Infer<typeofUntitledMultiSelectEnumSchemaSchema>
Defined in: src/types.ts:2584
UntitledSingleSelectEnumSchema
UntitledSingleSelectEnumSchema =
Infer<typeofUntitledSingleSelectEnumSchemaSchema>
Defined in: src/types.ts:2581
AnnotationsSchema
constAnnotationsSchema:ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant:"assistant";user:"user"; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>
Defined in: src/types.ts:871
Optional annotations providing clients additional context about a resource.
AudioContentSchema
constAudioContentSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant:"assistant";user:"user"; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>
Defined in: src/types.ts:1192
An Audio provided to or from an LLM.
BaseMetadataSchema
constBaseMetadataSchema:ZodObject<{name:ZodString;title:ZodOptional<ZodString>; },$strip>
Defined in: src/types.ts:344
Base metadata interface for common properties across resources, tools, prompts, and implementations.
BlobResourceContentsSchema
constBlobResourceContentsSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;blob:ZodString;mimeType:ZodOptional<ZodString>;uri:ZodString; },$strip>
Defined in: src/types.ts:856
BooleanSchemaSchema
constBooleanSchemaSchema:ZodObject<{default:ZodOptional<ZodBoolean>;description:ZodOptional<ZodString>;title:ZodOptional<ZodString>;type:ZodLiteral<"boolean">; },$strip>
Defined in: src/types.ts:1852
Primitive schema definition for boolean fields.
CallToolRequestParamsSchema
constCallToolRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;arguments:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;name:ZodString;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>; },$strip>
Defined in: src/types.ts:1489
Parameters for a tools/call request.
CallToolRequestSchema
constCallToolRequestSchema:ZodObject<{method:ZodLiteral<"tools/call">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;arguments:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;name:ZodString;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>; },$strip>; },$strip>
Defined in: src/types.ts:1503
Used by the client to invoke a tool provided by the server.
CallToolResultSchema
constCallToolResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;content:ZodDefault<ZodArray<ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<..., ...>>>;mimeType:ZodOptional<ZodString>;name:ZodString;size:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"resource_link">;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;resource:ZodUnion<readonly [ZodObject<..., ...>,ZodObject<..., ...>]>;type:ZodLiteral<"resource">; },$strip>]>>>;isError:ZodOptional<ZodBoolean>;structuredContent:ZodOptional<ZodRecord<ZodString,ZodUnknown>>; },$loose>
Defined in: src/types.ts:1444
The server's response to a tool call.
CancelledNotificationParamsSchema
constCancelledNotificationParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;reason:ZodOptional<ZodString>;requestId:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$strip>
Defined in: src/types.ts:265
CancelledNotificationSchema
constCancelledNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/cancelled">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;reason:ZodOptional<ZodString>;requestId:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$strip>; },$strip>
Defined in: src/types.ts:287
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.
CancelTaskRequestSchema
constCancelTaskRequestSchema:ZodObject<{method:ZodLiteral<"tasks/cancel">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;taskId:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:798
A request to cancel a specific task.
CancelTaskResultSchema
constCancelTaskResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>
Defined in: src/types.ts:808
The response to a tasks/cancel request.
ClientCapabilitiesSchema
constClientCapabilitiesSchema:ZodObject<{elicitation:ZodOptional<ZodPipe<ZodTransform<unknown,unknown>,ZodIntersection<ZodObject<{form:ZodOptional<ZodIntersection<ZodObject<{applyDefaults: ...; },$strip>,ZodRecord<ZodString,ZodUnknown>>>;url:ZodOptional<ZodCustom<object,object>>; },$strip>,ZodOptional<ZodRecord<ZodString,ZodUnknown>>>>>;experimental:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;extensions:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;roots:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>; },$strip>>;sampling:ZodOptional<ZodObject<{context:ZodOptional<ZodCustom<object,object>>;tools:ZodOptional<ZodCustom<object,object>>; },$strip>>;tasks:ZodOptional<ZodObject<{cancel:ZodOptional<ZodCustom<object,object>>;list:ZodOptional<ZodCustom<object,object>>;requests:ZodOptional<ZodObject<{elicitation:ZodOptional<ZodObject<{create: ...; },$loose>>;sampling:ZodOptional<ZodObject<{createMessage: ...; },$loose>>; },$loose>>; },$loose>>; },$strip>
Defined in: src/types.ts:475
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.
ClientNotificationSchema
constClientNotificationSchema:ZodUnion<readonly [ZodObject<{method:ZodLiteral<"notifications/cancelled">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;reason:ZodOptional<ZodString>;requestId:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/progress">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;message:ZodOptional<ZodString>;progress:ZodNumber;progressToken:ZodUnion<readonly [ZodString,ZodNumber]>;total:ZodOptional<ZodNumber>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/initialized">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/roots/list_changed">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/tasks/status">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>; },$strip>]>
Defined in: src/types.ts:2248
ClientRequestSchema
constClientRequestSchema:ZodUnion<readonly [ZodObject<{method:ZodLiteral<"ping">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"initialize">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;capabilities:ZodObject<{elicitation:ZodOptional<ZodPipe<ZodTransform<..., ...>,ZodIntersection<..., ...>>>;experimental:ZodOptional<ZodRecord<ZodString,ZodCustom<..., ...>>>;extensions:ZodOptional<ZodRecord<ZodString,ZodCustom<..., ...>>>;roots:ZodOptional<ZodObject<{listChanged: ...; },$strip>>;sampling:ZodOptional<ZodObject<{context: ...;tools: ...; },$strip>>;tasks:ZodOptional<ZodObject<{cancel: ...;list: ...;requests: ...; },$loose>>; },$strip>;clientInfo:ZodObject<{description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<..., ...>>>;name:ZodString;title:ZodOptional<ZodString>;version:ZodString;websiteUrl:ZodOptional<ZodString>; },$strip>;protocolVersion:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"completion/complete">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;argument:ZodObject<{name:ZodString;value:ZodString; },$strip>;context:ZodOptional<ZodObject<{arguments:ZodOptional<ZodRecord<..., ...>>; },$strip>>;ref:ZodUnion<readonly [ZodObject<{name:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{type:ZodLiteral<...>;uri:ZodString; },$strip>]>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"logging/setLevel">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;level:ZodEnum<{alert:"alert";critical:"critical";debug:"debug";emergency:"emergency";error:"error";info:"info";notice:"notice";warning:"warning"; }>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"prompts/get">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;arguments:ZodOptional<ZodRecord<ZodString,ZodString>>;name:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"prompts/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"resources/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"resources/templates/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"resources/read">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;uri:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"resources/subscribe">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;uri:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"resources/unsubscribe">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;uri:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"tools/call">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;arguments:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;name:ZodString;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"tools/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"tasks/get">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;taskId:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"tasks/result">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;taskId:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"tasks/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"tasks/cancel">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;taskId:ZodString; },$strip>; },$strip>]>
Defined in: src/types.ts:2228
ClientResultSchema
constClientResultSchema:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>; },$strict>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;content:ZodDiscriminatedUnion<[ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>]>;model:ZodString;role:ZodEnum<{assistant:"assistant";user:"user"; }>;stopReason:ZodOptional<ZodUnion<[ZodEnum<{endTurn:"endTurn";maxTokens:"maxTokens";stopSequence:"stopSequence"; }>,ZodString]>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;content:ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;text:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;data:ZodString;mimeType:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;data:ZodString;mimeType:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;id:ZodString;input:ZodRecord<..., ...>;name:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;content:ZodDefault<...>;isError:ZodOptional<...>;structuredContent:ZodOptional<...>;toolUseId:ZodString;type:ZodLiteral<...>; },$strip>]>,ZodArray<ZodDiscriminatedUnion<[ZodObject<{_meta: ...;annotations: ...;text: ...;type: ...; },$strip>,ZodObject<{_meta: ...;annotations: ...;data: ...;mimeType: ...;type: ...; },$strip>,ZodObject<{_meta: ...;annotations: ...;data: ...;mimeType: ...;type: ...; },$strip>,ZodObject<{_meta: ...;id: ...;input: ...;name: ...;type: ...; },$strip>,ZodObject<{_meta: ...;content: ...;isError: ...;structuredContent: ...;toolUseId: ...;type: ...; },$strip>]>>]>;model:ZodString;role:ZodEnum<{assistant:"assistant";user:"user"; }>;stopReason:ZodOptional<ZodUnion<[ZodEnum<{endTurn:"endTurn";maxTokens:"maxTokens";stopSequence:"stopSequence";toolUse:"toolUse"; }>,ZodString]>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;action:ZodEnum<{accept:"accept";cancel:"cancel";decline:"decline"; }>;content:ZodPipe<ZodTransform<{ } |undefined,unknown>,ZodOptional<ZodRecord<ZodString,ZodUnion<readonly [ZodString,ZodNumber,ZodBoolean,ZodArray<ZodString>]>>>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;roots:ZodArray<ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;name:ZodOptional<ZodString>;uri:ZodString; },$strip>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;tasks:ZodArray<ZodObject<{createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;task:ZodObject<{createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>; },$loose>]>
Defined in: src/types.ts:2256
ClientTasksCapabilitySchema
constClientTasksCapabilitySchema:ZodObject<{cancel:ZodOptional<ZodCustom<object,object>>;list:ZodOptional<ZodCustom<object,object>>;requests:ZodOptional<ZodObject<{elicitation:ZodOptional<ZodObject<{create:ZodOptional<ZodCustom<object,object>>; },$loose>>;sampling:ZodOptional<ZodObject<{createMessage:ZodOptional<ZodCustom<object,object>>; },$loose>>; },$loose>>; },$loose>
Defined in: src/types.ts:409
Task capabilities for clients, indicating which request types support task creation.
CompatibilityCallToolResultSchema
constCompatibilityCallToolResultSchema:ZodUnion<[ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;content:ZodDefault<ZodArray<ZodUnion<readonly [ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;text:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;data:ZodString;mimeType:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;data:ZodString;mimeType:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;description:ZodOptional<...>;icons:ZodOptional<...>;mimeType:ZodOptional<...>;name:ZodString;size:ZodOptional<...>;title:ZodOptional<...>;type:ZodLiteral<...>;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;resource:ZodUnion<...>;type:ZodLiteral<...>; },$strip>]>>>;isError:ZodOptional<ZodBoolean>;structuredContent:ZodOptional<ZodRecord<ZodString,ZodUnknown>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;toolResult:ZodUnknown; },$loose>]>
Defined in: src/types.ts:1480
CallToolResultSchema extended with backwards compatibility to protocol version 2024-10-07.
CompleteRequestParamsSchema
constCompleteRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;argument:ZodObject<{name:ZodString;value:ZodString; },$strip>;context:ZodOptional<ZodObject<{arguments:ZodOptional<ZodRecord<ZodString,ZodString>>; },$strip>>;ref:ZodUnion<readonly [ZodObject<{name:ZodString;type:ZodLiteral<"ref/prompt">; },$strip>,ZodObject<{type:ZodLiteral<"ref/resource">;uri:ZodString; },$strip>]>; },$strip>
Defined in: src/types.ts:2117
Parameters for a completion/complete request.
CompleteRequestSchema
constCompleteRequestSchema:ZodObject<{method:ZodLiteral<"completion/complete">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;argument:ZodObject<{name:ZodString;value:ZodString; },$strip>;context:ZodOptional<ZodObject<{arguments:ZodOptional<ZodRecord<ZodString,ZodString>>; },$strip>>;ref:ZodUnion<readonly [ZodObject<{name:ZodString;type:ZodLiteral<"ref/prompt">; },$strip>,ZodObject<{type:ZodLiteral<"ref/resource">;uri:ZodString; },$strip>]>; },$strip>; },$strip>
Defined in: src/types.ts:2144
A request from the client to the server, to ask for completion options.
CompleteResultSchema
constCompleteResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;completion:ZodObject<{hasMore:ZodOptional<ZodBoolean>;total:ZodOptional<ZodNumber>;values:ZodArray<ZodString>; },$loose>; },$loose>
Defined in: src/types.ts:2166
The server's response to a completion/complete request
ContentBlockSchema
constContentBlockSchema:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark: ...;light: ...; }>>; },$strip>>>;mimeType:ZodOptional<ZodString>;name:ZodString;size:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"resource_link">;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;resource:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;mimeType:ZodOptional<ZodString>;text:ZodString;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;blob:ZodString;mimeType:ZodOptional<ZodString>;uri:ZodString; },$strip>]>;type:ZodLiteral<"resource">; },$strip>]>
Defined in: src/types.ts:1272
A content block that can be used in prompts and tool results.
CreateMessageRequestParamsSchema
constCreateMessageRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;includeContext:ZodOptional<ZodEnum<{allServers:"allServers";none:"none";thisServer:"thisServer"; }>>;maxTokens:ZodNumber;messages:ZodArray<ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;content:ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{_meta: ...;annotations: ...;text: ...;type: ...; },$strip>,ZodObject<{_meta: ...;annotations: ...;data: ...;mimeType: ...;type: ...; },$strip>,ZodObject<{_meta: ...;annotations: ...;data: ...;mimeType: ...;type: ...; },$strip>,ZodObject<{_meta: ...;id: ...;input: ...;name: ...;type: ...; },$strip>,ZodObject<{_meta: ...;content: ...;isError: ...;structuredContent: ...;toolUseId: ...;type: ...; },$strip>]>,ZodArray<ZodDiscriminatedUnion<[ZodObject<..., ...>,ZodObject<..., ...>,ZodObject<..., ...>,ZodObject<..., ...>,ZodObject<..., ...>]>>]>;role:ZodEnum<{assistant:"assistant";user:"user"; }>; },$strip>>;metadata:ZodOptional<ZodCustom<object,object>>;modelPreferences:ZodOptional<ZodObject<{costPriority:ZodOptional<ZodNumber>;hints:ZodOptional<ZodArray<ZodObject<{name:ZodOptional<ZodString>; },$strip>>>;intelligencePriority:ZodOptional<ZodNumber>;speedPriority:ZodOptional<ZodNumber>; },$strip>>;stopSequences:ZodOptional<ZodArray<ZodString>>;systemPrompt:ZodOptional<ZodString>;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>;temperature:ZodOptional<ZodNumber>;toolChoice:ZodOptional<ZodObject<{mode:ZodOptional<ZodEnum<{auto:"auto";none:"none";required:"required"; }>>; },$strip>>;tools:ZodOptional<ZodArray<ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{destructiveHint:ZodOptional<ZodBoolean>;idempotentHint:ZodOptional<ZodBoolean>;openWorldHint:ZodOptional<ZodBoolean>;readOnlyHint:ZodOptional<ZodBoolean>;title:ZodOptional<ZodString>; },$strip>>;description:ZodOptional<ZodString>;execution:ZodOptional<ZodObject<{taskSupport:ZodOptional<ZodEnum<...>>; },$strip>>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<...>;sizes:ZodOptional<...>;src:ZodString;theme:ZodOptional<...>; },$strip>>>;inputSchema:ZodObject<{properties:ZodOptional<ZodRecord<ZodString,ZodCustom<..., ...>>>;required:ZodOptional<ZodArray<ZodString>>;type:ZodLiteral<"object">; },$catchall<ZodUnknown>>;name:ZodString;outputSchema:ZodOptional<ZodObject<{properties:ZodOptional<ZodRecord<..., ...>>;required:ZodOptional<ZodArray<...>>;type:ZodLiteral<"object">; },$catchall<ZodUnknown>>>;title:ZodOptional<ZodString>; },$strip>>>; },$strip>
Defined in: src/types.ts:1742
Parameters for a sampling/createMessage request.
CreateMessageRequestSchema
constCreateMessageRequestSchema:ZodObject<{method:ZodLiteral<"sampling/createMessage">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;includeContext:ZodOptional<ZodEnum<{allServers:"allServers";none:"none";thisServer:"thisServer"; }>>;maxTokens:ZodNumber;messages:ZodArray<ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;content:ZodUnion<readonly [ZodDiscriminatedUnion<[..., ..., ..., ..., ...]>,ZodArray<ZodDiscriminatedUnion<...>>]>;role:ZodEnum<{assistant:"assistant";user:"user"; }>; },$strip>>;metadata:ZodOptional<ZodCustom<object,object>>;modelPreferences:ZodOptional<ZodObject<{costPriority:ZodOptional<ZodNumber>;hints:ZodOptional<ZodArray<ZodObject<{name: ...; },$strip>>>;intelligencePriority:ZodOptional<ZodNumber>;speedPriority:ZodOptional<ZodNumber>; },$strip>>;stopSequences:ZodOptional<ZodArray<ZodString>>;systemPrompt:ZodOptional<ZodString>;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>;temperature:ZodOptional<ZodNumber>;toolChoice:ZodOptional<ZodObject<{mode:ZodOptional<ZodEnum<{auto:"auto";none:"none";required:"required"; }>>; },$strip>>;tools:ZodOptional<ZodArray<ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{destructiveHint: ...;idempotentHint: ...;openWorldHint: ...;readOnlyHint: ...;title: ...; },$strip>>;description:ZodOptional<ZodString>;execution:ZodOptional<ZodObject<{taskSupport: ...; },$strip>>;icons:ZodOptional<ZodArray<ZodObject<..., ...>>>;inputSchema:ZodObject<{properties:ZodOptional<...>;required:ZodOptional<...>;type:ZodLiteral<...>; },$catchall<ZodUnknown>>;name:ZodString;outputSchema:ZodOptional<ZodObject<{properties: ...;required: ...;type: ...; },$catchall<...>>>;title:ZodOptional<ZodString>; },$strip>>>; },$strip>; },$strip>
Defined in: src/types.ts:1787
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.
CreateMessageResultSchema
constCreateMessageResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;content:ZodDiscriminatedUnion<[ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<...>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<...>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<...>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>]>;model:ZodString;role:ZodEnum<{assistant:"assistant";user:"user"; }>;stopReason:ZodOptional<ZodUnion<[ZodEnum<{endTurn:"endTurn";maxTokens:"maxTokens";stopSequence:"stopSequence"; }>,ZodString]>>; },$loose>
Defined in: src/types.ts:1797
The client's response to a sampling/create_message request from the server. This is the backwards-compatible version that returns single content (no arrays). Used when the request does not include tools.
CreateMessageResultWithToolsSchema
constCreateMessageResultWithToolsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;content:ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;id:ZodString;input:ZodRecord<ZodString,ZodUnknown>;name:ZodString;type:ZodLiteral<"tool_use">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;content:ZodDefault<ZodArray<ZodUnion<...>>>;isError:ZodOptional<ZodBoolean>;structuredContent:ZodOptional<ZodObject<{ },$loose>>;toolUseId:ZodString;type:ZodLiteral<"tool_result">; },$strip>]>,ZodArray<ZodDiscriminatedUnion<[ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;id:ZodString;input:ZodRecord<ZodString,ZodUnknown>;name:ZodString;type:ZodLiteral<"tool_use">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;content:ZodDefault<ZodArray<...>>;isError:ZodOptional<ZodBoolean>;structuredContent:ZodOptional<ZodObject<..., ...>>;toolUseId:ZodString;type:ZodLiteral<"tool_result">; },$strip>]>>]>;model:ZodString;role:ZodEnum<{assistant:"assistant";user:"user"; }>;stopReason:ZodOptional<ZodUnion<[ZodEnum<{endTurn:"endTurn";maxTokens:"maxTokens";stopSequence:"stopSequence";toolUse:"toolUse"; }>,ZodString]>>; },$loose>
Defined in: src/types.ts:1824
The client's response to a sampling/create_message request when tools were provided. This version supports array content for tool use flows.
CreateTaskResultSchema
constCreateTaskResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;task:ZodObject<{createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>; },$loose>
Defined in: src/types.ts:731
Result returned when a task is created, containing the task data wrapped in a task field.
CursorSchema
constCursorSchema:ZodString
Defined in: src/types.ts:31
An opaque token used to represent a cursor for pagination.
DEFAULT_NEGOTIATED_PROTOCOL_VERSION
constDEFAULT_NEGOTIATED_PROTOCOL_VERSION:"2025-03-26"='2025-03-26'
Defined in: src/types.ts:5
ElicitRequestFormParamsSchema
constElicitRequestFormParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;message:ZodString;mode:ZodOptional<ZodLiteral<"form">>;requestedSchema:ZodObject<{properties:ZodRecord<ZodString,ZodUnion<readonly [ZodUnion<readonly [ZodObject<{default: ...;description: ...;enum: ...;enumNames: ...;title: ...;type: ...; },$strip>,ZodUnion<readonly [..., ...]>,ZodUnion<readonly [..., ...]>]>,ZodObject<{default:ZodOptional<ZodBoolean>;description:ZodOptional<ZodString>;title:ZodOptional<ZodString>;type:ZodLiteral<"boolean">; },$strip>,ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;format:ZodOptional<ZodEnum<...>>;maxLength:ZodOptional<ZodNumber>;minLength:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>,ZodObject<{default:ZodOptional<ZodNumber>;description:ZodOptional<ZodString>;maximum:ZodOptional<ZodNumber>;minimum:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodEnum<{integer: ...;number: ...; }>; },$strip>]>>;required:ZodOptional<ZodArray<ZodString>>;type:ZodLiteral<"object">; },$strip>;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>; },$strip>
Defined in: src/types.ts:1981
Parameters for an elicitation/create request for form-based elicitation.
ElicitRequestParamsSchema
constElicitRequestParamsSchema:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;message:ZodString;mode:ZodOptional<ZodLiteral<"form">>;requestedSchema:ZodObject<{properties:ZodRecord<ZodString,ZodUnion<readonly [ZodUnion<readonly [..., ..., ...]>,ZodObject<{default: ...;description: ...;title: ...;type: ...; },$strip>,ZodObject<{default: ...;description: ...;format: ...;maxLength: ...;minLength: ...;title: ...;type: ...; },$strip>,ZodObject<{default: ...;description: ...;maximum: ...;minimum: ...;title: ...;type: ...; },$strip>]>>;required:ZodOptional<ZodArray<ZodString>>;type:ZodLiteral<"object">; },$strip>;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;elicitationId:ZodString;message:ZodString;mode:ZodLiteral<"url">;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>;url:ZodString; },$strip>]>
Defined in: src/types.ts:2029
The parameters for a request to elicit additional information from the user via the client.
ElicitRequestSchema
constElicitRequestSchema:ZodObject<{method:ZodLiteral<"elicitation/create">;params:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;message:ZodString;mode:ZodOptional<ZodLiteral<"form">>;requestedSchema:ZodObject<{properties:ZodRecord<ZodString,ZodUnion<readonly [..., ..., ..., ...]>>;required:ZodOptional<ZodArray<ZodString>>;type:ZodLiteral<"object">; },$strip>;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;elicitationId:ZodString;message:ZodString;mode:ZodLiteral<"url">;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>;url:ZodString; },$strip>]>; },$strip>
Defined in: src/types.ts:2036
A request from the server to elicit user input via the client. The client should present the message and form fields to the user (form mode) or navigate to a URL (URL mode).
ElicitRequestURLParamsSchema
constElicitRequestURLParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;elicitationId:ZodString;message:ZodString;mode:ZodLiteral<"url">;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>;url:ZodString; },$strip>
Defined in: src/types.ts:2006
Parameters for an elicitation/create request for URL-based elicitation.
ElicitResultSchema
constElicitResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;action:ZodEnum<{accept:"accept";cancel:"cancel";decline:"decline"; }>;content:ZodPipe<ZodTransform<{ } |undefined,unknown>,ZodOptional<ZodRecord<ZodString,ZodUnion<readonly [ZodString,ZodNumber,ZodBoolean,ZodArray<ZodString>]>>>>; },$loose>
Defined in: src/types.ts:2066
The client's response to an elicitation/create request from the server.
EmbeddedResourceSchema
constEmbeddedResourceSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant:"assistant";user:"user"; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;resource:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;mimeType:ZodOptional<ZodString>;text:ZodString;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;blob:ZodString;mimeType:ZodOptional<ZodString>;uri:ZodString; },$strip>]>;type:ZodLiteral<"resource">; },$strip>
Defined in: src/types.ts:1246
The contents of a resource, embedded into a prompt or tool call result.
EmptyResultSchema
constEmptyResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>; },$strict>
Defined in: src/types.ts:263
A response that indicates success but carries no data.
EnumSchemaSchema
constEnumSchemaSchema:ZodUnion<readonly [ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;enum:ZodArray<ZodString>;enumNames:ZodOptional<ZodArray<ZodString>>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>,ZodUnion<readonly [ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;enum:ZodArray<ZodString>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>,ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;oneOf:ZodArray<ZodObject<{const:ZodString;title:ZodString; },$strip>>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>]>,ZodUnion<readonly [ZodObject<{default:ZodOptional<ZodArray<ZodString>>;description:ZodOptional<ZodString>;items:ZodObject<{enum:ZodArray<ZodString>;type:ZodLiteral<"string">; },$strip>;maxItems:ZodOptional<ZodNumber>;minItems:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"array">; },$strip>,ZodObject<{default:ZodOptional<ZodArray<ZodString>>;description:ZodOptional<ZodString>;items:ZodObject<{anyOf:ZodArray<ZodObject<{const: ...;title: ...; },$strip>>; },$strip>;maxItems:ZodOptional<ZodNumber>;minItems:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"array">; },$strip>]>]>
Defined in: src/types.ts:1971
Primitive schema definition for enum fields.
GetPromptRequestParamsSchema
constGetPromptRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;arguments:ZodOptional<ZodRecord<ZodString,ZodString>>;name:ZodString; },$strip>
Defined in: src/types.ts:1123
Parameters for a prompts/get request.
GetPromptRequestSchema
constGetPromptRequestSchema:ZodObject<{method:ZodLiteral<"prompts/get">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;arguments:ZodOptional<ZodRecord<ZodString,ZodString>>;name:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:1136
Used by the client to get a prompt provided by the server.
GetPromptResultSchema
constGetPromptResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;description:ZodOptional<ZodString>;messages:ZodArray<ZodObject<{content:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<...>>;mimeType:ZodOptional<ZodString>;name:ZodString;size:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"resource_link">;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;resource:ZodUnion<readonly [..., ...]>;type:ZodLiteral<"resource">; },$strip>]>;role:ZodEnum<{assistant:"assistant";user:"user"; }>; },$strip>>; },$loose>
Defined in: src/types.ts:1291
The server's response to a prompts/get request from the client.
GetTaskPayloadRequestSchema
constGetTaskPayloadRequestSchema:ZodObject<{method:ZodLiteral<"tasks/result">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;taskId:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:766
A request to get the result of a specific task.
GetTaskPayloadResultSchema
constGetTaskPayloadResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>; },$loose>
Defined in: src/types.ts:779
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.
GetTaskRequestSchema
constGetTaskRequestSchema:ZodObject<{method:ZodLiteral<"tasks/get">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;taskId:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:751
A request to get the state of a specific task.
GetTaskResultSchema
constGetTaskResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>
Defined in: src/types.ts:761
The response to a tasks/get request.
IconSchema
constIconSchema:ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark:"dark";light:"light"; }>>; },$strip>
Defined in: src/types.ts:296
Icon schema for use in tools, prompts, resources, and implementations.
IconsSchema
constIconsSchema:ZodObject<{icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark:"dark";light:"light"; }>>; },$strip>>>; },$strip>
Defined in: src/types.ts:326
Base schema to add icons property.
ImageContentSchema
constImageContentSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant:"assistant";user:"user"; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>
Defined in: src/types.ts:1166
An image provided to or from an LLM.
ImplementationSchema
constImplementationSchema:ZodObject<{description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark:"dark";light:"light"; }>>; },$strip>>>;name:ZodString;title:ZodOptional<ZodString>;version:ZodString;websiteUrl:ZodOptional<ZodString>; },$strip>
Defined in: src/types.ts:362
Describes the name and version of an MCP implementation.
InitializedNotificationSchema
constInitializedNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/initialized">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$strip>>; },$strip>
Defined in: src/types.ts:624
This notification is sent from the client to the server after initialization has finished.
InitializeRequestParamsSchema
constInitializeRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;capabilities:ZodObject<{elicitation:ZodOptional<ZodPipe<ZodTransform<unknown,unknown>,ZodIntersection<ZodObject<{form:ZodOptional<ZodIntersection<..., ...>>;url:ZodOptional<ZodCustom<..., ...>>; },$strip>,ZodOptional<ZodRecord<ZodString,ZodUnknown>>>>>;experimental:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;extensions:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;roots:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>; },$strip>>;sampling:ZodOptional<ZodObject<{context:ZodOptional<ZodCustom<object,object>>;tools:ZodOptional<ZodCustom<object,object>>; },$strip>>;tasks:ZodOptional<ZodObject<{cancel:ZodOptional<ZodCustom<object,object>>;list:ZodOptional<ZodCustom<object,object>>;requests:ZodOptional<ZodObject<{elicitation:ZodOptional<...>;sampling:ZodOptional<...>; },$loose>>; },$loose>>; },$strip>;clientInfo:ZodObject<{description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark: ...;light: ...; }>>; },$strip>>>;name:ZodString;title:ZodOptional<ZodString>;version:ZodString;websiteUrl:ZodOptional<ZodString>; },$strip>;protocolVersion:ZodString; },$strip>
Defined in: src/types.ts:521
InitializeRequestSchema
constInitializeRequestSchema:ZodObject<{method:ZodLiteral<"initialize">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;capabilities:ZodObject<{elicitation:ZodOptional<ZodPipe<ZodTransform<unknown,unknown>,ZodIntersection<ZodObject<{form: ...;url: ...; },$strip>,ZodOptional<ZodRecord<..., ...>>>>>;experimental:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;extensions:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;roots:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>; },$strip>>;sampling:ZodOptional<ZodObject<{context:ZodOptional<ZodCustom<..., ...>>;tools:ZodOptional<ZodCustom<..., ...>>; },$strip>>;tasks:ZodOptional<ZodObject<{cancel:ZodOptional<ZodCustom<..., ...>>;list:ZodOptional<ZodCustom<..., ...>>;requests:ZodOptional<ZodObject<..., ...>>; },$loose>>; },$strip>;clientInfo:ZodObject<{description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<...>;sizes:ZodOptional<...>;src:ZodString;theme:ZodOptional<...>; },$strip>>>;name:ZodString;title:ZodOptional<ZodString>;version:ZodString;websiteUrl:ZodOptional<ZodString>; },$strip>;protocolVersion:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:532
This request is sent from the client to the server when it first connects, asking it to begin initialization.
InitializeResultSchema
constInitializeResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;capabilities:ZodObject<{completions:ZodOptional<ZodCustom<object,object>>;experimental:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;extensions:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;logging:ZodOptional<ZodCustom<object,object>>;prompts:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>; },$strip>>;resources:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>;subscribe:ZodOptional<ZodBoolean>; },$strip>>;tasks:ZodOptional<ZodObject<{cancel:ZodOptional<ZodCustom<object,object>>;list:ZodOptional<ZodCustom<object,object>>;requests:ZodOptional<ZodObject<{tools:ZodOptional<...>; },$loose>>; },$loose>>;tools:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>; },$strip>>; },$strip>;instructions:ZodOptional<ZodString>;protocolVersion:ZodString;serverInfo:ZodObject<{description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark: ...;light: ...; }>>; },$strip>>>;name:ZodString;title:ZodOptional<ZodString>;version:ZodString;websiteUrl:ZodOptional<ZodString>; },$strip>; },$loose>
Defined in: src/types.ts:606
After receiving an initialize request from the client, the server sends this response.
isJSONRPCError
constisJSONRPCError: (value) => value is { error: { code: number; data?: unknown; message: string }; id?: string | number; jsonrpc: "2.0" } =isJSONRPCErrorResponse
Defined in: src/types.ts:248
Checks if a value is a valid JSONRPCErrorResponse.
Parameters
value
unknown
The value to check.
Returns
value is { error: { code: number; data?: unknown; message: string }; id?: string | number; jsonrpc: "2.0" }
True if the value is a valid JSONRPCErrorResponse, false otherwise.
Deprecated
Use isJSONRPCErrorResponse instead.
isJSONRPCResponse
constisJSONRPCResponse: (value) => value is { id: string | number; jsonrpc: "2.0"; result: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; [key: string]: unknown } } =isJSONRPCResultResponse
Defined in: src/types.ts:186
Checks if a value is a valid JSONRPCResultResponse.
Parameters
value
unknown
The value to check.
Returns
value is { id: string | number; jsonrpc: "2.0"; result: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; [key: string]: unknown } }
True if the value is a valid JSONRPCResultResponse, false otherwise.
Deprecated
Use isJSONRPCResultResponse instead.
Please note that JSONRPCResponse is a union of JSONRPCResultResponse and JSONRPCErrorResponse as per the updated JSON-RPC specification. (was previously just JSONRPCResultResponse)
JSONRPC_VERSION
constJSONRPC_VERSION:"2.0"='2.0'
Defined in: src/types.ts:11
JSONRPCErrorResponseSchema
constJSONRPCErrorResponseSchema:ZodObject<{error:ZodObject<{code:ZodNumber;data:ZodOptional<ZodUnknown>;message:ZodString; },$strip>;id:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>;jsonrpc:ZodLiteral<"2.0">; },$strict>
Defined in: src/types.ts:210
A response to a request that indicates an error occurred.
JSONRPCErrorSchema
constJSONRPCErrorSchema:ZodObject<{error:ZodObject<{code:ZodNumber;data:ZodOptional<ZodUnknown>;message:ZodString; },$strip>;id:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>;jsonrpc:ZodLiteral<"2.0">; },$strict> =JSONRPCErrorResponseSchema
Defined in: src/types.ts:234
Deprecated
Use JSONRPCErrorResponseSchema instead.
JSONRPCMessageSchema
constJSONRPCMessageSchema:ZodUnion<readonly [ZodObject<{id:ZodUnion<readonly [ZodString,ZodNumber]>;jsonrpc:ZodLiteral<"2.0">;method:ZodString;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$loose>>; },$strict>,ZodObject<{jsonrpc:ZodLiteral<"2.0">;method:ZodString;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$loose>>; },$strict>,ZodObject<{id:ZodUnion<readonly [ZodString,ZodNumber]>;jsonrpc:ZodLiteral<"2.0">;result:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>; },$loose>; },$strict>,ZodObject<{error:ZodObject<{code:ZodNumber;data:ZodOptional<ZodUnknown>;message:ZodString; },$strip>;id:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>;jsonrpc:ZodLiteral<"2.0">; },$strict>]>
Defined in: src/types.ts:250
JSONRPCNotificationSchema
constJSONRPCNotificationSchema:ZodObject<{jsonrpc:ZodLiteral<"2.0">;method:ZodString;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$loose>>; },$strict>
Defined in: src/types.ts:152
A notification which does not expect a response.
JSONRPCRequestSchema
constJSONRPCRequestSchema:ZodObject<{id:ZodUnion<readonly [ZodString,ZodNumber]>;jsonrpc:ZodLiteral<"2.0">;method:ZodString;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$loose>>; },$strict>
Defined in: src/types.ts:139
A request that expects a response.
JSONRPCResponseSchema
constJSONRPCResponseSchema:ZodUnion<readonly [ZodObject<{id:ZodUnion<readonly [ZodString,ZodNumber]>;jsonrpc:ZodLiteral<"2.0">;result:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>; },$loose>; },$strict>,ZodObject<{error:ZodObject<{code:ZodNumber;data:ZodOptional<ZodUnknown>;message:ZodString; },$strip>;id:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>;jsonrpc:ZodLiteral<"2.0">; },$strict>]>
Defined in: src/types.ts:257
JSONRPCResultResponseSchema
constJSONRPCResultResponseSchema:ZodObject<{id:ZodUnion<readonly [ZodString,ZodNumber]>;jsonrpc:ZodLiteral<"2.0">;result:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>; },$loose>; },$strict>
Defined in: src/types.ts:164
A successful (non-error) response to a request.
LATEST_PROTOCOL_VERSION
constLATEST_PROTOCOL_VERSION:"2025-11-25"='2025-11-25'
Defined in: src/types.ts:4
LegacyTitledEnumSchemaSchema
constLegacyTitledEnumSchemaSchema:ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;enum:ZodArray<ZodString>;enumNames:ZodOptional<ZodArray<ZodString>>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>
Defined in: src/types.ts:1915
Use TitledSingleSelectEnumSchema instead. This interface will be removed in a future version.
ListChangedOptionsBaseSchema
constListChangedOptionsBaseSchema:ZodObject<{autoRefresh:ZodDefault<ZodBoolean>;debounceMs:ZodDefault<ZodNumber>; },$strip>
Defined in: src/types.ts:1525
Base schema for list changed subscription options (without callback). Used internally for Zod validation of autoRefresh and debounceMs.
ListPromptsRequestSchema
constListPromptsRequestSchema:ZodObject<{method:ZodLiteral<"prompts/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>
Defined in: src/types.ts:1109
Sent from the client to request a list of prompts and prompt templates the server has.
ListPromptsResultSchema
constListPromptsResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;prompts:ZodArray<ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;arguments:ZodOptional<ZodArray<ZodObject<{description:ZodOptional<ZodString>;name:ZodString;required:ZodOptional<ZodBoolean>; },$strip>>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<...>>;src:ZodString;theme:ZodOptional<ZodEnum<...>>; },$strip>>>;name:ZodString;title:ZodOptional<ZodString>; },$strip>>; },$loose>
Defined in: src/types.ts:1116
The server's response to a prompts/list request from the client.
ListResourcesRequestSchema
constListResourcesRequestSchema:ZodObject<{method:ZodLiteral<"resources/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>
Defined in: src/types.ts:968
Sent from the client to request a list of resources the server has.
ListResourcesResultSchema
constListResourcesResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;resources:ZodArray<ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<...>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<...>>;src:ZodString;theme:ZodOptional<ZodEnum<...>>; },$strip>>>;mimeType:ZodOptional<ZodString>;name:ZodString;size:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;uri:ZodString; },$strip>>; },$loose>
Defined in: src/types.ts:975
The server's response to a resources/list request from the client.
ListResourceTemplatesRequestSchema
constListResourceTemplatesRequestSchema:ZodObject<{method:ZodLiteral<"resources/templates/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>
Defined in: src/types.ts:982
Sent from the client to request a list of resource templates the server has.
ListResourceTemplatesResultSchema
constListResourceTemplatesResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;resourceTemplates:ZodArray<ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<...>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<...>>;src:ZodString;theme:ZodOptional<ZodEnum<...>>; },$strip>>>;mimeType:ZodOptional<ZodString>;name:ZodString;title:ZodOptional<ZodString>;uriTemplate:ZodString; },$strip>>; },$loose>
Defined in: src/types.ts:989
The server's response to a resources/templates/list request from the client.
ListRootsRequestSchema
constListRootsRequestSchema:ZodObject<{method:ZodLiteral<"roots/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$strip>>; },$strip>
Defined in: src/types.ts:2207
Sent from the server to request a list of root URIs from the client.
ListRootsResultSchema
constListRootsResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;roots:ZodArray<ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;name:ZodOptional<ZodString>;uri:ZodString; },$strip>>; },$loose>
Defined in: src/types.ts:2215
The client's response to a roots/list request from the server.
ListTasksRequestSchema
constListTasksRequestSchema:ZodObject<{method:ZodLiteral<"tasks/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>
Defined in: src/types.ts:784
A request to list tasks.
ListTasksResultSchema
constListTasksResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;tasks:ZodArray<ZodObject<{createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>>; },$loose>
Defined in: src/types.ts:791
The response to a tasks/list request.
ListToolsRequestSchema
constListToolsRequestSchema:ZodObject<{method:ZodLiteral<"tools/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>
Defined in: src/types.ts:1430
Sent from the client to request a list of tools the server has.
ListToolsResultSchema
constListToolsResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;tools:ZodArray<ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{destructiveHint:ZodOptional<ZodBoolean>;idempotentHint:ZodOptional<ZodBoolean>;openWorldHint:ZodOptional<ZodBoolean>;readOnlyHint:ZodOptional<ZodBoolean>;title:ZodOptional<ZodString>; },$strip>>;description:ZodOptional<ZodString>;execution:ZodOptional<ZodObject<{taskSupport:ZodOptional<ZodEnum<{forbidden: ...;optional: ...;required: ...; }>>; },$strip>>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<...>>;src:ZodString;theme:ZodOptional<ZodEnum<...>>; },$strip>>>;inputSchema:ZodObject<{properties:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;required:ZodOptional<ZodArray<ZodString>>;type:ZodLiteral<"object">; },$catchall<ZodUnknown>>;name:ZodString;outputSchema:ZodOptional<ZodObject<{properties:ZodOptional<ZodRecord<ZodString,ZodCustom<..., ...>>>;required:ZodOptional<ZodArray<ZodString>>;type:ZodLiteral<"object">; },$catchall<ZodUnknown>>>;title:ZodOptional<ZodString>; },$strip>>; },$loose>
Defined in: src/types.ts:1437
The server's response to a tools/list request from the client.
LoggingLevelSchema
constLoggingLevelSchema:ZodEnum<{alert:"alert";critical:"critical";debug:"debug";emergency:"emergency";error:"error";info:"info";notice:"notice";warning:"warning"; }>
Defined in: src/types.ts:1600
The severity of a log message.
LoggingMessageNotificationParamsSchema
constLoggingMessageNotificationParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;data:ZodUnknown;level:ZodEnum<{alert:"alert";critical:"critical";debug:"debug";emergency:"emergency";error:"error";info:"info";notice:"notice";warning:"warning"; }>;logger:ZodOptional<ZodString>; },$strip>
Defined in: src/types.ts:1622
Parameters for a notifications/message notification.
LoggingMessageNotificationSchema
constLoggingMessageNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/message">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;data:ZodUnknown;level:ZodEnum<{alert:"alert";critical:"critical";debug:"debug";emergency:"emergency";error:"error";info:"info";notice:"notice";warning:"warning"; }>;logger:ZodOptional<ZodString>; },$strip>; },$strip>
Defined in: src/types.ts:1639
Notification 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.
ModelHintSchema
constModelHintSchema:ZodObject<{name:ZodOptional<ZodString>; },$strip>
Defined in: src/types.ts:1648
Hints to use for model selection.
ModelPreferencesSchema
constModelPreferencesSchema:ZodObject<{costPriority:ZodOptional<ZodNumber>;hints:ZodOptional<ZodArray<ZodObject<{name:ZodOptional<ZodString>; },$strip>>>;intelligencePriority:ZodOptional<ZodNumber>;speedPriority:ZodOptional<ZodNumber>; },$strip>
Defined in: src/types.ts:1658
The server's preferences for model selection, requested of the client during sampling.
MultiSelectEnumSchemaSchema
constMultiSelectEnumSchemaSchema:ZodUnion<readonly [ZodObject<{default:ZodOptional<ZodArray<ZodString>>;description:ZodOptional<ZodString>;items:ZodObject<{enum:ZodArray<ZodString>;type:ZodLiteral<"string">; },$strip>;maxItems:ZodOptional<ZodNumber>;minItems:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"array">; },$strip>,ZodObject<{default:ZodOptional<ZodArray<ZodString>>;description:ZodOptional<ZodString>;items:ZodObject<{anyOf:ZodArray<ZodObject<{const:ZodString;title:ZodString; },$strip>>; },$strip>;maxItems:ZodOptional<ZodNumber>;minItems:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"array">; },$strip>]>
Defined in: src/types.ts:1966
Combined schema for multiple-selection enumeration
NotificationSchema
constNotificationSchema:ZodObject<{method:ZodString;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$loose>>; },$strip>
Defined in: src/types.ts:118
NumberSchemaSchema
constNumberSchemaSchema:ZodObject<{default:ZodOptional<ZodNumber>;description:ZodOptional<ZodString>;maximum:ZodOptional<ZodNumber>;minimum:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodEnum<{integer:"integer";number:"number"; }>; },$strip>
Defined in: src/types.ts:1875
Primitive schema definition for number fields.
PaginatedRequestParamsSchema
constPaginatedRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>
Defined in: src/types.ts:675
PaginatedRequestSchema
constPaginatedRequestSchema:ZodObject<{method:ZodString;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>
Defined in: src/types.ts:684
PaginatedResultSchema
constPaginatedResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>; },$loose>
Defined in: src/types.ts:688
PingRequestSchema
constPingRequestSchema:ZodObject<{method:ZodLiteral<"ping">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$strip>>; },$strip>
Defined in: src/types.ts:636
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.
PrimitiveSchemaDefinitionSchema
constPrimitiveSchemaDefinitionSchema:ZodUnion<readonly [ZodUnion<readonly [ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;enum:ZodArray<ZodString>;enumNames:ZodOptional<ZodArray<ZodString>>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>,ZodUnion<readonly [ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;enum:ZodArray<ZodString>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>,ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;oneOf:ZodArray<ZodObject<{const: ...;title: ...; },$strip>>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>]>,ZodUnion<readonly [ZodObject<{default:ZodOptional<ZodArray<ZodString>>;description:ZodOptional<ZodString>;items:ZodObject<{enum:ZodArray<...>;type:ZodLiteral<...>; },$strip>;maxItems:ZodOptional<ZodNumber>;minItems:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"array">; },$strip>,ZodObject<{default:ZodOptional<ZodArray<ZodString>>;description:ZodOptional<ZodString>;items:ZodObject<{anyOf:ZodArray<...>; },$strip>;maxItems:ZodOptional<ZodNumber>;minItems:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"array">; },$strip>]>]>,ZodObject<{default:ZodOptional<ZodBoolean>;description:ZodOptional<ZodString>;title:ZodOptional<ZodString>;type:ZodLiteral<"boolean">; },$strip>,ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;format:ZodOptional<ZodEnum<{date:"date";date-time:"date-time";"email";uri:"uri"; }>>;maxLength:ZodOptional<ZodNumber>;minLength:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>,ZodObject<{default:ZodOptional<ZodNumber>;description:ZodOptional<ZodString>;maximum:ZodOptional<ZodNumber>;minimum:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodEnum<{integer:"integer";number:"number"; }>; },$strip>]>
Defined in: src/types.ts:1976
Union of all primitive schema definitions.
ProgressNotificationParamsSchema
constProgressNotificationParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;message:ZodOptional<ZodString>;progress:ZodNumber;progressToken:ZodUnion<readonly [ZodString,ZodNumber]>;total:ZodOptional<ZodNumber>; },$strip>
Defined in: src/types.ts:657
ProgressSchema
constProgressSchema:ZodObject<{message:ZodOptional<ZodString>;progress:ZodNumber;total:ZodOptional<ZodNumber>; },$strip>
Defined in: src/types.ts:642
ProgressTokenSchema
constProgressTokenSchema:ZodUnion<readonly [ZodString,ZodNumber]>
Defined in: src/types.ts:26
A progress token, used to associate progress notifications with the original request.
PromptArgumentSchema
constPromptArgumentSchema:ZodObject<{description:ZodOptional<ZodString>;name:ZodString;required:ZodOptional<ZodBoolean>; },$strip>
Defined in: src/types.ts:1070
Describes an argument that a prompt can accept.
PromptListChangedNotificationSchema
constPromptListChangedNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/prompts/list_changed">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$strip>>; },$strip>
Defined in: src/types.ts:1302
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.
PromptMessageSchema
constPromptMessageSchema:ZodObject<{content:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<...>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<...>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<...>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<...>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<...>;sizes:ZodOptional<...>;src:ZodString;theme:ZodOptional<...>; },$strip>>>;mimeType:ZodOptional<ZodString>;name:ZodString;size:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"resource_link">;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<...>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;resource:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<...>;mimeType:ZodOptional<...>;text:ZodString;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<...>;blob:ZodString;mimeType:ZodOptional<...>;uri:ZodString; },$strip>]>;type:ZodLiteral<"resource">; },$strip>]>;role:ZodEnum<{assistant:"assistant";user:"user"; }>; },$strip>
Defined in: src/types.ts:1283
Describes a message returned as part of a prompt.
PromptReferenceSchema
constPromptReferenceSchema:ZodObject<{name:ZodString;type:ZodLiteral<"ref/prompt">; },$strip>
Defined in: src/types.ts:2106
Identifies a prompt.
PromptSchema
constPromptSchema:ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;arguments:ZodOptional<ZodArray<ZodObject<{description:ZodOptional<ZodString>;name:ZodString;required:ZodOptional<ZodBoolean>; },$strip>>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark:"dark";light:"light"; }>>; },$strip>>>;name:ZodString;title:ZodOptional<ZodString>; },$strip>
Defined in: src/types.ts:1088
A prompt or prompt template that the server offers.
ReadResourceRequestParamsSchema
constReadResourceRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;uri:ZodString; },$strip> =ResourceRequestParamsSchema
Defined in: src/types.ts:1005
Parameters for a resources/read request.
ReadResourceRequestSchema
constReadResourceRequestSchema:ZodObject<{method:ZodLiteral<"resources/read">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;uri:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:1010
Sent from the client to the server, to read a specific resource URI.
ReadResourceResultSchema
constReadResourceResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;contents:ZodArray<ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;mimeType:ZodOptional<ZodString>;text:ZodString;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;blob:ZodString;mimeType:ZodOptional<ZodString>;uri:ZodString; },$strip>]>>; },$loose>
Defined in: src/types.ts:1018
The server's response to a resources/read request from the client.
RELATED_TASK_META_KEY
constRELATED_TASK_META_KEY:"io.modelcontextprotocol/related-task"='io.modelcontextprotocol/related-task'
Defined in: src/types.ts:8
RelatedTaskMetadataSchema
constRelatedTaskMetadataSchema:ZodObject<{taskId:ZodString; },$strip>
Defined in: src/types.ts:56
Metadata for associating messages with a task. Include this in the _meta field under the key io.modelcontextprotocol/related-task.
RequestIdSchema
constRequestIdSchema:ZodUnion<readonly [ZodString,ZodNumber]>
Defined in: src/types.ts:134
A uniquely identifying ID for a request in JSON-RPC.
RequestSchema
constRequestSchema:ZodObject<{method:ZodString;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$loose>>; },$strip>
Defined in: src/types.ts:105
ResourceContentsSchema
constResourceContentsSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;mimeType:ZodOptional<ZodString>;uri:ZodString; },$strip>
Defined in: src/types.ts:814
The contents of a specific resource or sub-resource.
ResourceLinkSchema
constResourceLinkSchema:ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant:"assistant";user:"user"; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark:"dark";light:"light"; }>>; },$strip>>>;mimeType:ZodOptional<ZodString>;name:ZodString;size:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"resource_link">;uri:ZodString; },$strip>
Defined in: src/types.ts:1265
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.
ResourceListChangedNotificationSchema
constResourceListChangedNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/resources/list_changed">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$strip>>; },$strip>
Defined in: src/types.ts:1025
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.
ResourceReferenceSchema
constResourceReferenceSchema:ZodObject<{type:ZodLiteral<"ref/resource">;uri:ZodString; },$strip> =ResourceTemplateReferenceSchema
Defined in: src/types.ts:2101
Deprecated
Use ResourceTemplateReferenceSchema instead
ResourceRequestParamsSchema
constResourceRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;uri:ZodString; },$strip>
Defined in: src/types.ts:993
ResourceSchema
constResourceSchema:ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant:"assistant";user:"user"; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark:"dark";light:"light"; }>>; },$strip>>>;mimeType:ZodOptional<ZodString>;name:ZodString;size:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;uri:ZodString; },$strip>
Defined in: src/types.ts:891
A known resource that the server is capable of reading.
ResourceTemplateReferenceSchema
constResourceTemplateReferenceSchema:ZodObject<{type:ZodLiteral<"ref/resource">;uri:ZodString; },$strip>
Defined in: src/types.ts:2090
A reference to a resource or resource template definition.
ResourceTemplateSchema
constResourceTemplateSchema:ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant:"assistant";user:"user"; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark:"dark";light:"light"; }>>; },$strip>>>;mimeType:ZodOptional<ZodString>;name:ZodString;title:ZodOptional<ZodString>;uriTemplate:ZodString; },$strip>
Defined in: src/types.ts:933
A template description for resources available on the server.
ResourceUpdatedNotificationParamsSchema
constResourceUpdatedNotificationParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;uri:ZodString; },$strip>
Defined in: src/types.ts:1051
Parameters for a notifications/resources/updated notification.
ResourceUpdatedNotificationSchema
constResourceUpdatedNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/resources/updated">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;uri:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:1061
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.
ResultSchema
constResultSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>; },$loose>
Defined in: src/types.ts:123
RoleSchema
constRoleSchema:ZodEnum<{assistant:"assistant";user:"user"; }>
Defined in: src/types.ts:866
The sender or recipient of messages and data in a conversation.
RootSchema
constRootSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;name:ZodOptional<ZodString>;uri:ZodString; },$strip>
Defined in: src/types.ts:2187
Represents a root directory or file that the server can operate on.
RootsListChangedNotificationSchema
constRootsListChangedNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/roots/list_changed">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$strip>>; },$strip>
Defined in: src/types.ts:2222
A notification from the client to the server, informing it that the list of roots has changed.
SamplingContentSchema
constSamplingContentSchema:ZodDiscriminatedUnion<[ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>]>
Defined in: src/types.ts:1712
Basic content types for sampling responses (without tool use). Used for backwards-compatible CreateMessageResult when tools are not used.
SamplingMessageContentBlockSchema
constSamplingMessageContentBlockSchema:ZodDiscriminatedUnion<[ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant: ...;user: ...; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;id:ZodString;input:ZodRecord<ZodString,ZodUnknown>;name:ZodString;type:ZodLiteral<"tool_use">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;content:ZodDefault<ZodArray<ZodUnion<readonly [ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;text:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;data:ZodString;mimeType:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;data:ZodString;mimeType:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;description:ZodOptional<...>;icons:ZodOptional<...>;mimeType:ZodOptional<...>;name:ZodString;size:ZodOptional<...>;title:ZodOptional<...>;type:ZodLiteral<...>;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;resource:ZodUnion<...>;type:ZodLiteral<...>; },$strip>]>>>;isError:ZodOptional<ZodBoolean>;structuredContent:ZodOptional<ZodObject<{ },$loose>>;toolUseId:ZodString;type:ZodLiteral<"tool_result">; },$strip>]>
Defined in: src/types.ts:1718
Content block types allowed in sampling messages. This includes text, image, audio, tool use requests, and tool results.
SamplingMessageSchema
constSamplingMessageSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;content:ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;id:ZodString;input:ZodRecord<ZodString,ZodUnknown>;name:ZodString;type:ZodLiteral<"tool_use">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;content:ZodDefault<ZodArray<ZodUnion<...>>>;isError:ZodOptional<ZodBoolean>;structuredContent:ZodOptional<ZodObject<{ },$loose>>;toolUseId:ZodString;type:ZodLiteral<"tool_result">; },$strip>]>,ZodArray<ZodDiscriminatedUnion<[ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;annotations:ZodOptional<ZodObject<..., ...>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;id:ZodString;input:ZodRecord<ZodString,ZodUnknown>;name:ZodString;type:ZodLiteral<"tool_use">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;content:ZodDefault<ZodArray<...>>;isError:ZodOptional<ZodBoolean>;structuredContent:ZodOptional<ZodObject<..., ...>>;toolUseId:ZodString;type:ZodLiteral<"tool_result">; },$strip>]>>]>;role:ZodEnum<{assistant:"assistant";user:"user"; }>; },$strip>
Defined in: src/types.ts:1729
Describes a message issued to or received from an LLM API.
ServerCapabilitiesSchema
constServerCapabilitiesSchema:ZodObject<{completions:ZodOptional<ZodCustom<object,object>>;experimental:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;extensions:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;logging:ZodOptional<ZodCustom<object,object>>;prompts:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>; },$strip>>;resources:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>;subscribe:ZodOptional<ZodBoolean>; },$strip>>;tasks:ZodOptional<ZodObject<{cancel:ZodOptional<ZodCustom<object,object>>;list:ZodOptional<ZodCustom<object,object>>;requests:ZodOptional<ZodObject<{tools:ZodOptional<ZodObject<{call: ...; },$loose>>; },$loose>>; },$loose>>;tools:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>; },$strip>>; },$strip>
Defined in: src/types.ts:542
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.
ServerNotificationSchema
constServerNotificationSchema:ZodUnion<readonly [ZodObject<{method:ZodLiteral<"notifications/cancelled">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;reason:ZodOptional<ZodString>;requestId:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/progress">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;message:ZodOptional<ZodString>;progress:ZodNumber;progressToken:ZodUnion<readonly [ZodString,ZodNumber]>;total:ZodOptional<ZodNumber>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/message">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;data:ZodUnknown;level:ZodEnum<{alert:"alert";critical:"critical";debug:"debug";emergency:"emergency";error:"error";info:"info";notice:"notice";warning:"warning"; }>;logger:ZodOptional<ZodString>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/resources/updated">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;uri:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/resources/list_changed">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/tools/list_changed">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/prompts/list_changed">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/tasks/status">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"notifications/elicitation/complete">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;elicitationId:ZodString; },$strip>; },$strip>]>
Defined in: src/types.ts:2279
ServerRequestSchema
constServerRequestSchema:ZodUnion<readonly [ZodObject<{method:ZodLiteral<"ping">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"sampling/createMessage">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;includeContext:ZodOptional<ZodEnum<{allServers:"allServers";none:"none";thisServer:"thisServer"; }>>;maxTokens:ZodNumber;messages:ZodArray<ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;content:ZodUnion<readonly [..., ...]>;role:ZodEnum<{assistant: ...;user: ...; }>; },$strip>>;metadata:ZodOptional<ZodCustom<object,object>>;modelPreferences:ZodOptional<ZodObject<{costPriority:ZodOptional<ZodNumber>;hints:ZodOptional<ZodArray<...>>;intelligencePriority:ZodOptional<ZodNumber>;speedPriority:ZodOptional<ZodNumber>; },$strip>>;stopSequences:ZodOptional<ZodArray<ZodString>>;systemPrompt:ZodOptional<ZodString>;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>;temperature:ZodOptional<ZodNumber>;toolChoice:ZodOptional<ZodObject<{mode:ZodOptional<ZodEnum<...>>; },$strip>>;tools:ZodOptional<ZodArray<ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;description:ZodOptional<...>;execution:ZodOptional<...>;icons:ZodOptional<...>;inputSchema:ZodObject<..., ...>;name:ZodString;outputSchema:ZodOptional<...>;title:ZodOptional<...>; },$strip>>>; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"elicitation/create">;params:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task: ...;progressToken: ...; },$loose>>;message:ZodString;mode:ZodOptional<ZodLiteral<"form">>;requestedSchema:ZodObject<{properties:ZodRecord<..., ...>;required:ZodOptional<...>;type:ZodLiteral<...>; },$strip>;task:ZodOptional<ZodObject<{ttl: ...; },$strip>>; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task: ...;progressToken: ...; },$loose>>;elicitationId:ZodString;message:ZodString;mode:ZodLiteral<"url">;task:ZodOptional<ZodObject<{ttl: ...; },$strip>>;url:ZodString; },$strip>]>; },$strip>,ZodObject<{method:ZodLiteral<"roots/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"tasks/get">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;taskId:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"tasks/result">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;taskId:ZodString; },$strip>; },$strip>,ZodObject<{method:ZodLiteral<"tasks/list">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<...>;progressToken:ZodOptional<...>; },$loose>>;cursor:ZodOptional<ZodString>; },$strip>>; },$strip>,ZodObject<{method:ZodLiteral<"tasks/cancel">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<..., ...>>;progressToken:ZodOptional<ZodUnion<...>>; },$loose>>;taskId:ZodString; },$strip>; },$strip>]>
Defined in: src/types.ts:2268
ServerResultSchema
constServerResultSchema:ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>; },$strict>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;capabilities:ZodObject<{completions:ZodOptional<ZodCustom<object,object>>;experimental:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;extensions:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;logging:ZodOptional<ZodCustom<object,object>>;prompts:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>; },$strip>>;resources:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>;subscribe:ZodOptional<ZodBoolean>; },$strip>>;tasks:ZodOptional<ZodObject<{cancel:ZodOptional<ZodCustom<..., ...>>;list:ZodOptional<ZodCustom<..., ...>>;requests:ZodOptional<ZodObject<..., ...>>; },$loose>>;tools:ZodOptional<ZodObject<{listChanged:ZodOptional<ZodBoolean>; },$strip>>; },$strip>;instructions:ZodOptional<ZodString>;protocolVersion:ZodString;serverInfo:ZodObject<{description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<...>;sizes:ZodOptional<...>;src:ZodString;theme:ZodOptional<...>; },$strip>>>;name:ZodString;title:ZodOptional<ZodString>;version:ZodString;websiteUrl:ZodOptional<ZodString>; },$strip>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;completion:ZodObject<{hasMore:ZodOptional<ZodBoolean>;total:ZodOptional<ZodNumber>;values:ZodArray<ZodString>; },$loose>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;description:ZodOptional<ZodString>;messages:ZodArray<ZodObject<{content:ZodUnion<readonly [ZodObject<{_meta: ...;annotations: ...;text: ...;type: ...; },$strip>,ZodObject<{_meta: ...;annotations: ...;data: ...;mimeType: ...;type: ...; },$strip>,ZodObject<{_meta: ...;annotations: ...;data: ...;mimeType: ...;type: ...; },$strip>,ZodObject<{_meta: ...;annotations: ...;description: ...;icons: ...;mimeType: ...;name: ...;size: ...;title: ...;type: ...;uri: ...; },$strip>,ZodObject<{_meta: ...;annotations: ...;resource: ...;type: ...; },$strip>]>;role:ZodEnum<{assistant:"assistant";user:"user"; }>; },$strip>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;prompts:ZodArray<ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;arguments:ZodOptional<ZodArray<ZodObject<{description: ...;name: ...;required: ...; },$strip>>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType: ...;sizes: ...;src: ...;theme: ...; },$strip>>>;name:ZodString;title:ZodOptional<ZodString>; },$strip>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;resources:ZodArray<ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<...>;lastModified:ZodOptional<...>;priority:ZodOptional<...>; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType: ...;sizes: ...;src: ...;theme: ...; },$strip>>>;mimeType:ZodOptional<ZodString>;name:ZodString;size:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;uri:ZodString; },$strip>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;resourceTemplates:ZodArray<ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<...>;lastModified:ZodOptional<...>;priority:ZodOptional<...>; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<{mimeType: ...;sizes: ...;src: ...;theme: ...; },$strip>>>;mimeType:ZodOptional<ZodString>;name:ZodString;title:ZodOptional<ZodString>;uriTemplate:ZodString; },$strip>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;contents:ZodArray<ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;mimeType:ZodOptional<ZodString>;text:ZodString;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<..., ...>>;blob:ZodString;mimeType:ZodOptional<ZodString>;uri:ZodString; },$strip>]>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;content:ZodDefault<ZodArray<ZodUnion<readonly [ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;text:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;data:ZodString;mimeType:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;data:ZodString;mimeType:ZodString;type:ZodLiteral<...>; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;description:ZodOptional<...>;icons:ZodOptional<...>;mimeType:ZodOptional<...>;name:ZodString;size:ZodOptional<...>;title:ZodOptional<...>;type:ZodLiteral<...>;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<...>;annotations:ZodOptional<...>;resource:ZodUnion<...>;type:ZodLiteral<...>; },$strip>]>>>;isError:ZodOptional<ZodBoolean>;structuredContent:ZodOptional<ZodRecord<ZodString,ZodUnknown>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;tools:ZodArray<ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{destructiveHint:ZodOptional<...>;idempotentHint:ZodOptional<...>;openWorldHint:ZodOptional<...>;readOnlyHint:ZodOptional<...>;title:ZodOptional<...>; },$strip>>;description:ZodOptional<ZodString>;execution:ZodOptional<ZodObject<{taskSupport:ZodOptional<...>; },$strip>>;icons:ZodOptional<ZodArray<ZodObject<{mimeType: ...;sizes: ...;src: ...;theme: ...; },$strip>>>;inputSchema:ZodObject<{properties:ZodOptional<ZodRecord<..., ...>>;required:ZodOptional<ZodArray<...>>;type:ZodLiteral<"object">; },$catchall<ZodUnknown>>;name:ZodString;outputSchema:ZodOptional<ZodObject<{properties:ZodOptional<...>;required:ZodOptional<...>;type:ZodLiteral<...>; },$catchall<ZodUnknown>>>;title:ZodOptional<ZodString>; },$strip>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;nextCursor:ZodOptional<ZodString>;tasks:ZodArray<ZodObject<{createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>>; },$loose>,ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;task:ZodObject<{createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>; },$loose>]>
Defined in: src/types.ts:2291
ServerTasksCapabilitySchema
constServerTasksCapabilitySchema:ZodObject<{cancel:ZodOptional<ZodCustom<object,object>>;list:ZodOptional<ZodCustom<object,object>>;requests:ZodOptional<ZodObject<{tools:ZodOptional<ZodObject<{call:ZodOptional<ZodCustom<object,object>>; },$loose>>; },$loose>>; },$loose>
Defined in: src/types.ts:446
Task capabilities for servers, indicating which request types support task creation.
SetLevelRequestParamsSchema
constSetLevelRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;level:ZodEnum<{alert:"alert";critical:"critical";debug:"debug";emergency:"emergency";error:"error";info:"info";notice:"notice";warning:"warning"; }>; },$strip>
Defined in: src/types.ts:1605
Parameters for a logging/setLevel request.
SetLevelRequestSchema
constSetLevelRequestSchema:ZodObject<{method:ZodLiteral<"logging/setLevel">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;level:ZodEnum<{alert:"alert";critical:"critical";debug:"debug";emergency:"emergency";error:"error";info:"info";notice:"notice";warning:"warning"; }>; },$strip>; },$strip>
Defined in: src/types.ts:1614
A request from the client to the server, to enable or adjust logging.
SingleSelectEnumSchemaSchema
constSingleSelectEnumSchemaSchema:ZodUnion<readonly [ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;enum:ZodArray<ZodString>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>,ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;oneOf:ZodArray<ZodObject<{const:ZodString;title:ZodString; },$strip>>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>]>
Defined in: src/types.ts:1925
StringSchemaSchema
constStringSchemaSchema:ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;format:ZodOptional<ZodEnum<{date:"date";date-time:"date-time";"email";uri:"uri"; }>>;maxLength:ZodOptional<ZodNumber>;minLength:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>
Defined in: src/types.ts:1862
Primitive schema definition for string fields.
SubscribeRequestParamsSchema
constSubscribeRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;uri:ZodString; },$strip> =ResourceRequestParamsSchema
Defined in: src/types.ts:1030
SubscribeRequestSchema
constSubscribeRequestSchema:ZodObject<{method:ZodLiteral<"resources/subscribe">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;uri:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:1034
Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
SUPPORTED_PROTOCOL_VERSIONS
constSUPPORTED_PROTOCOL_VERSIONS:string[]
Defined in: src/types.ts:6
TaskAugmentedRequestParamsSchema
constTaskAugmentedRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;task:ZodOptional<ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>>; },$strip>
Defined in: src/types.ts:84
Common params for any task-augmented request.
TaskCreationParamsSchema
constTaskCreationParamsSchema:ZodObject<{pollInterval:ZodOptional<ZodNumber>;ttl:ZodOptional<ZodNumber>; },$loose>
Defined in: src/types.ts:36
Task creation parameters, used to ask that the server create a task to represent a request.
TaskMetadataSchema
constTaskMetadataSchema:ZodObject<{ttl:ZodOptional<ZodNumber>; },$strip>
Defined in: src/types.ts:48
TaskSchema
constTaskSchema:ZodObject<{createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>
Defined in: src/types.ts:705
A pollable state object associated with a request.
TaskStatusNotificationParamsSchema
constTaskStatusNotificationParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>
Defined in: src/types.ts:738
Parameters for task status notification.
TaskStatusNotificationSchema
constTaskStatusNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/tasks/status">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;createdAt:ZodString;lastUpdatedAt:ZodString;pollInterval:ZodOptional<ZodNumber>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>;statusMessage:ZodOptional<ZodString>;taskId:ZodString;ttl:ZodUnion<readonly [ZodNumber,ZodNull]>; },$strip>; },$strip>
Defined in: src/types.ts:743
A notification sent when a task's status changes.
TaskStatusSchema
constTaskStatusSchema:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";input_required:"input_required";working:"working"; }>
Defined in: src/types.ts:699
The status of a task.
TextContentSchema
constTextContentSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience:ZodOptional<ZodArray<ZodEnum<{assistant:"assistant";user:"user"; }>>>;lastModified:ZodOptional<ZodISODateTime>;priority:ZodOptional<ZodNumber>; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>
Defined in: src/types.ts:1144
Text provided to or from an LLM.
TextResourceContentsSchema
constTextResourceContentsSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;mimeType:ZodOptional<ZodString>;text:ZodString;uri:ZodString; },$strip>
Defined in: src/types.ts:830
TitledMultiSelectEnumSchemaSchema
constTitledMultiSelectEnumSchemaSchema:ZodObject<{default:ZodOptional<ZodArray<ZodString>>;description:ZodOptional<ZodString>;items:ZodObject<{anyOf:ZodArray<ZodObject<{const:ZodString;title:ZodString; },$strip>>; },$strip>;maxItems:ZodOptional<ZodNumber>;minItems:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"array">; },$strip>
Defined in: src/types.ts:1946
Schema for multiple-selection enumeration with display titles for each option.
TitledSingleSelectEnumSchemaSchema
constTitledSingleSelectEnumSchemaSchema:ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;oneOf:ZodArray<ZodObject<{const:ZodString;title:ZodString; },$strip>>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>
Defined in: src/types.ts:1898
Schema for single-selection enumeration with display titles for each option.
ToolAnnotationsSchema
constToolAnnotationsSchema:ZodObject<{destructiveHint:ZodOptional<ZodBoolean>;idempotentHint:ZodOptional<ZodBoolean>;openWorldHint:ZodOptional<ZodBoolean>;readOnlyHint:ZodOptional<ZodBoolean>;title:ZodOptional<ZodString>; },$strip>
Defined in: src/types.ts:1318
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.
ToolChoiceSchema
constToolChoiceSchema:ZodObject<{mode:ZodOptional<ZodEnum<{auto:"auto";none:"none";required:"required"; }>>; },$strip>
Defined in: src/types.ts:1680
Controls tool usage behavior in sampling requests.
ToolExecutionSchema
constToolExecutionSchema:ZodObject<{taskSupport:ZodOptional<ZodEnum<{forbidden:"forbidden";optional:"optional";required:"required"; }>>; },$strip>
Defined in: src/types.ts:1365
Execution-related properties for a tool.
ToolListChangedNotificationSchema
constToolListChangedNotificationSchema:ZodObject<{method:ZodLiteral<"notifications/tools/list_changed">;params:ZodOptional<ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId: ...; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [..., ...]>>; },$loose>>; },$strip>>; },$strip>
Defined in: src/types.ts:1511
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.
ToolResultContentSchema
constToolResultContentSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;content:ZodDefault<ZodArray<ZodUnion<readonly [ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;text:ZodString;type:ZodLiteral<"text">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"image">; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;data:ZodString;mimeType:ZodString;type:ZodLiteral<"audio">; },$strip>,ZodObject<{_meta:ZodOptional<ZodObject<{ },$loose>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;description:ZodOptional<ZodString>;icons:ZodOptional<ZodArray<ZodObject<..., ...>>>;mimeType:ZodOptional<ZodString>;name:ZodString;size:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"resource_link">;uri:ZodString; },$strip>,ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{audience: ...;lastModified: ...;priority: ...; },$strip>>;resource:ZodUnion<readonly [ZodObject<..., ...>,ZodObject<..., ...>]>;type:ZodLiteral<"resource">; },$strip>]>>>;isError:ZodOptional<ZodBoolean>;structuredContent:ZodOptional<ZodObject<{ },$loose>>;toolUseId:ZodString;type:ZodLiteral<"tool_result">; },$strip>
Defined in: src/types.ts:1694
The result of a tool execution, provided by the user (server). Represents the outcome of invoking a tool requested via ToolUseContent.
ToolSchema
constToolSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;annotations:ZodOptional<ZodObject<{destructiveHint:ZodOptional<ZodBoolean>;idempotentHint:ZodOptional<ZodBoolean>;openWorldHint:ZodOptional<ZodBoolean>;readOnlyHint:ZodOptional<ZodBoolean>;title:ZodOptional<ZodString>; },$strip>>;description:ZodOptional<ZodString>;execution:ZodOptional<ZodObject<{taskSupport:ZodOptional<ZodEnum<{forbidden:"forbidden";optional:"optional";required:"required"; }>>; },$strip>>;icons:ZodOptional<ZodArray<ZodObject<{mimeType:ZodOptional<ZodString>;sizes:ZodOptional<ZodArray<ZodString>>;src:ZodString;theme:ZodOptional<ZodEnum<{dark:"dark";light:"light"; }>>; },$strip>>>;inputSchema:ZodObject<{properties:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;required:ZodOptional<ZodArray<ZodString>>;type:ZodLiteral<"object">; },$catchall<ZodUnknown>>;name:ZodString;outputSchema:ZodOptional<ZodObject<{properties:ZodOptional<ZodRecord<ZodString,ZodCustom<object,object>>>;required:ZodOptional<ZodArray<ZodString>>;type:ZodLiteral<"object">; },$catchall<ZodUnknown>>>;title:ZodOptional<ZodString>; },$strip>
Defined in: src/types.ts:1380
Definition for a tool the client can call.
ToolUseContentSchema
constToolUseContentSchema:ZodObject<{_meta:ZodOptional<ZodRecord<ZodString,ZodUnknown>>;id:ZodString;input:ZodRecord<ZodString,ZodUnknown>;name:ZodString;type:ZodLiteral<"tool_use">; },$strip>
Defined in: src/types.ts:1219
A tool call request from an assistant (LLM). Represents the assistant's request to use a tool.
UnsubscribeRequestParamsSchema
constUnsubscribeRequestParamsSchema:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;uri:ZodString; },$strip> =ResourceRequestParamsSchema
Defined in: src/types.ts:1039
UnsubscribeRequestSchema
constUnsubscribeRequestSchema:ZodObject<{method:ZodLiteral<"resources/unsubscribe">;params:ZodObject<{_meta:ZodOptional<ZodObject<{io.modelcontextprotocol/related-task:ZodOptional<ZodObject<{taskId:ZodString; },$strip>>;progressToken:ZodOptional<ZodUnion<readonly [ZodString,ZodNumber]>>; },$loose>>;uri:ZodString; },$strip>; },$strip>
Defined in: src/types.ts:1043
Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
UntitledMultiSelectEnumSchemaSchema
constUntitledMultiSelectEnumSchemaSchema:ZodObject<{default:ZodOptional<ZodArray<ZodString>>;description:ZodOptional<ZodString>;items:ZodObject<{enum:ZodArray<ZodString>;type:ZodLiteral<"string">; },$strip>;maxItems:ZodOptional<ZodNumber>;minItems:ZodOptional<ZodNumber>;title:ZodOptional<ZodString>;type:ZodLiteral<"array">; },$strip>
Defined in: src/types.ts:1930
Schema for multiple-selection enumeration without display titles for options.
UntitledSingleSelectEnumSchemaSchema
constUntitledSingleSelectEnumSchemaSchema:ZodObject<{default:ZodOptional<ZodString>;description:ZodOptional<ZodString>;enum:ZodArray<ZodString>;title:ZodOptional<ZodString>;type:ZodLiteral<"string">; },$strip>
Defined in: src/types.ts:1887
Schema for single-selection enumeration without display titles for options.
assertCompleteRequestPrompt()
assertCompleteRequestPrompt(
request): asserts request is { method: "completion/complete"; params: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; argument: { name: string; value: string }; context?: { arguments?: { [key: string]: string } }; ref: { name: string; type: "ref/prompt" } } }
Defined in: src/types.ts:2149
Parameters
request
method
"completion/complete" = ...
params
{ _meta?: {[key: string]: unknown; io.modelcontextprotocol/related-task?: { taskId: string; }; progressToken?: string | number; }; argument: { name: string; value: string; }; context?: { arguments?: {[key: string]: string; }; }; ref: { name: string; type: "ref/prompt"; } | { type: "ref/resource"; uri: string; }; } = CompleteRequestParamsSchema
params._meta?
{[key: string]: unknown; io.modelcontextprotocol/related-task?: { taskId: string; }; progressToken?: string | number; } = ...
See General fields: _meta for notes on _meta usage.
params._meta.io.modelcontextprotocol/related-task?
{ taskId: string; } = ...
If specified, this request is related to the provided task.
params._meta.io.modelcontextprotocol/related-task.taskId
string = ...
params._meta.progressToken?
string | number = ...
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.
params.argument
{ name: string; value: string; } = ...
The argument's information
params.argument.name
string = ...
The name of the argument
params.argument.value
string = ...
The value of the argument to use for completion matching.
params.context?
{ arguments?: {[key: string]: string; }; } = ...
params.context.arguments?
{[key: string]: string; } = ...
Previously-resolved variables in a URI template or prompt.
params.ref
{ name: string; type: "ref/prompt"; } | { type: "ref/resource"; uri: string; } = ...
Returns
asserts request is { method: "completion/complete"; params: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; argument: { name: string; value: string }; context?: { arguments?: { [key: string]: string } }; ref: { name: string; type: "ref/prompt" } } }
assertCompleteRequestResourceTemplate()
assertCompleteRequestResourceTemplate(
request): asserts request is { method: "completion/complete"; params: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; argument: { name: string; value: string }; context?: { arguments?: { [key: string]: string } }; ref: { type: "ref/resource"; uri: string } } }
Defined in: src/types.ts:2156
Parameters
request
method
"completion/complete" = ...
params
{ _meta?: {[key: string]: unknown; io.modelcontextprotocol/related-task?: { taskId: string; }; progressToken?: string | number; }; argument: { name: string; value: string; }; context?: { arguments?: {[key: string]: string; }; }; ref: { name: string; type: "ref/prompt"; } | { type: "ref/resource"; uri: string; }; } = CompleteRequestParamsSchema
params._meta?
{[key: string]: unknown; io.modelcontextprotocol/related-task?: { taskId: string; }; progressToken?: string | number; } = ...
See General fields: _meta for notes on _meta usage.
params._meta.io.modelcontextprotocol/related-task?
{ taskId: string; } = ...
If specified, this request is related to the provided task.
params._meta.io.modelcontextprotocol/related-task.taskId
string = ...
params._meta.progressToken?
string | number = ...
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.
params.argument
{ name: string; value: string; } = ...
The argument's information
params.argument.name
string = ...
The name of the argument
params.argument.value
string = ...
The value of the argument to use for completion matching.
params.context?
{ arguments?: {[key: string]: string; }; } = ...
params.context.arguments?
{[key: string]: string; } = ...
Previously-resolved variables in a URI template or prompt.
params.ref
{ name: string; type: "ref/prompt"; } | { type: "ref/resource"; uri: string; } = ...
Returns
asserts request is { method: "completion/complete"; params: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; argument: { name: string; value: string }; context?: { arguments?: { [key: string]: string } }; ref: { type: "ref/resource"; uri: string } } }
isInitializedNotification()
isInitializedNotification(
value): value is { method: "notifications/initialized"; params?: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown } } }
Defined in: src/types.ts:629
Parameters
value
unknown
Returns
value is { method: "notifications/initialized"; params?: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown } } }
isInitializeRequest()
isInitializeRequest(
value): value is { method: "initialize"; params: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; capabilities: { elicitation?: { form?: { applyDefaults?: boolean; [key: string]: unknown }; url?: object; [key: string]: unknown }; experimental?: { [key: string]: object }; extensions?: { [key: string]: object }; roots?: { listChanged?: boolean }; sampling?: { context?: object; tools?: object }; tasks?: { cancel?: object; list?: object; requests?: { elicitation?: { create?: object; [key: string]: unknown }; sampling?: { createMessage?: object; [key: string]: unknown }; [key: string]: unknown }; [key: string]: unknown } }; clientInfo: { description?: string; icons?: { mimeType?: string; sizes?: string[]; src: string; theme?: "light" | "dark" }[]; name: string; title?: string; version: string; websiteUrl?: string }; protocolVersion: string } }
Defined in: src/types.ts:537
Parameters
value
unknown
Returns
value is { method: "initialize"; params: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; capabilities: { elicitation?: { form?: { applyDefaults?: boolean; [key: string]: unknown }; url?: object; [key: string]: unknown }; experimental?: { [key: string]: object }; extensions?: { [key: string]: object }; roots?: { listChanged?: boolean }; sampling?: { context?: object; tools?: object }; tasks?: { cancel?: object; list?: object; requests?: { elicitation?: { create?: object; [key: string]: unknown }; sampling?: { createMessage?: object; [key: string]: unknown }; [key: string]: unknown }; [key: string]: unknown } }; clientInfo: { description?: string; icons?: { mimeType?: string; sizes?: string[]; src: string; theme?: "light" | "dark" }[]; name: string; title?: string; version: string; websiteUrl?: string }; protocolVersion: string } }
isJSONRPCErrorResponse()
isJSONRPCErrorResponse(
value): value is { error: { code: number; data?: unknown; message: string }; id?: string | number; jsonrpc: "2.0" }
Defined in: src/types.ts:242
Checks if a value is a valid JSONRPCErrorResponse.
Parameters
value
unknown
The value to check.
Returns
value is { error: { code: number; data?: unknown; message: string }; id?: string | number; jsonrpc: "2.0" }
True if the value is a valid JSONRPCErrorResponse, false otherwise.
isJSONRPCNotification()
isJSONRPCNotification(
value): value is { jsonrpc: "2.0"; method: string; params?: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; [key: string]: unknown } }
Defined in: src/types.ts:159
Parameters
value
unknown
Returns
value is { jsonrpc: "2.0"; method: string; params?: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; [key: string]: unknown } }
isJSONRPCRequest()
isJSONRPCRequest(
value): value is { id: string | number; jsonrpc: "2.0"; method: string; params?: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; [key: string]: unknown } }
Defined in: src/types.ts:147
Parameters
value
unknown
Returns
value is { id: string | number; jsonrpc: "2.0"; method: string; params?: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; [key: string]: unknown } }
isJSONRPCResultResponse()
isJSONRPCResultResponse(
value): value is { id: string | number; jsonrpc: "2.0"; result: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; [key: string]: unknown } }
Defined in: src/types.ts:178
Checks if a value is a valid JSONRPCResultResponse.
Parameters
value
unknown
The value to check.
Returns
value is { id: string | number; jsonrpc: "2.0"; result: { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; [key: string]: unknown } }
True if the value is a valid JSONRPCResultResponse, false otherwise.
isTaskAugmentedRequestParams()
isTaskAugmentedRequestParams(
value): value is { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; task?: { ttl?: number } }
Defined in: src/types.ts:102
Checks if a value is a valid TaskAugmentedRequestParams.
Parameters
value
unknown
The value to check.
Returns
value is { _meta?: { io.modelcontextprotocol/related-task?: { taskId: string }; progressToken?: string | number; [key: string]: unknown }; task?: { ttl?: number } }
True if the value is a valid TaskAugmentedRequestParams, false otherwise.