Skip to content

v2026_07_28

Internal wire-shape models for protocol 2026-07-28. Generated; do not edit.

Regenerate with scripts/gen_surface_types.py from schema/2026-07-28.json (sha256 ed1ad4ba94aaeb2068b78969ef901b1150f7b2f06cf86472b3032abee1380b6a).

BaseMetadata

Bases: WireModel

Base interface for metadata with name (identifier) and title (display name) properties.

Source code in src/mcp/types/v2026_07_28/__init__.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class BaseMetadata(WireModel):
    """
    Base interface for metadata with name (identifier) and title (display name) properties.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    name: str
    """
    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
    """
    title: str | None = None
    """
    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 {@link Tool},
    where `annotations.title` should be given precedence over using `name`,
    if present).
    """

name instance-attribute

name: str

Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

title class-attribute instance-attribute

title: str | None = None

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 {@link Tool}, where annotations.title should be given precedence over using name, if present).

Argument

Bases: WireModel

The argument's information

Source code in src/mcp/types/v2026_07_28/__init__.py
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class Argument(WireModel):
    """
    The argument's information
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    name: str
    """
    The name of the argument
    """
    value: str
    """
    The value of the argument to use for completion matching.
    """

name instance-attribute

name: str

The name of the argument

value instance-attribute

value: str

The value of the argument to use for completion matching.

Context

Bases: WireModel

Additional, optional context for completions

Source code in src/mcp/types/v2026_07_28/__init__.py
66
67
68
69
70
71
72
73
74
75
76
77
class Context(WireModel):
    """
    Additional, optional context for completions
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    arguments: dict[str, str] | None = None
    """
    Previously-resolved variables in a URI template or prompt.
    """

arguments class-attribute instance-attribute

arguments: dict[str, str] | None = None

Previously-resolved variables in a URI template or prompt.

Completion

Bases: WireModel

Source code in src/mcp/types/v2026_07_28/__init__.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
class Completion(WireModel):
    model_config = ConfigDict(
        extra="ignore",
    )
    has_more: Annotated[bool | None, Field(alias="hasMore")] = None
    """
    Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
    """
    total: int | None = None
    """
    The total number of completion options available. This can exceed the number of values actually sent in the response.
    """
    values: Annotated[list[str], Field(max_length=100)]
    """
    An array of completion values. Must not exceed 100 items.
    """

has_more class-attribute instance-attribute

has_more: Annotated[bool | None, Field(alias="hasMore")] = (
    None
)

Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.

total class-attribute instance-attribute

total: int | None = None

The total number of completion options available. This can exceed the number of values actually sent in the response.

values instance-attribute

values: Annotated[list[str], Field(max_length=100)]

An array of completion values. Must not exceed 100 items.

Cursor

Bases: RootModel[str]

Source code in src/mcp/types/v2026_07_28/__init__.py
 98
 99
100
101
102
class Cursor(RootModel[str]):
    root: str
    """
    An opaque token used to represent a cursor for pagination.
    """

root instance-attribute

root: str

An opaque token used to represent a cursor for pagination.

RequestedSchema

Bases: WireModel

A restricted subset of JSON Schema. Only top-level properties are allowed, without nesting.

Source code in src/mcp/types/v2026_07_28/__init__.py
105
106
107
108
109
110
111
112
113
114
115
116
117
class RequestedSchema(WireModel):
    """
    A restricted subset of JSON Schema.
    Only top-level properties are allowed, without nesting.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    schema_: Annotated[str | None, Field(alias="$schema")] = None
    properties: dict[str, Any]
    required: list[str] | None = None
    type: Literal["object"]

ElicitRequestFormParams

Bases: WireModel

The parameters for a request to elicit non-sensitive information from the user via a form in the client.

Source code in src/mcp/types/v2026_07_28/__init__.py
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
class ElicitRequestFormParams(WireModel):
    """
    The parameters for a request to elicit non-sensitive information from the user via a form in the client.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    message: str
    """
    The message to present to the user describing what information is being requested.
    """
    mode: Literal["form"] = "form"
    """
    The elicitation mode.
    """
    requested_schema: Annotated[RequestedSchema, Field(alias="requestedSchema")]
    """
    A restricted subset of JSON Schema.
    Only top-level properties are allowed, without nesting.
    """

message instance-attribute

message: str

The message to present to the user describing what information is being requested.

mode class-attribute instance-attribute

mode: Literal['form'] = 'form'

The elicitation mode.

requested_schema instance-attribute

requested_schema: Annotated[
    RequestedSchema, Field(alias="requestedSchema")
]

A restricted subset of JSON Schema. Only top-level properties are allowed, without nesting.

ElicitRequestURLParams

Bases: WireModel

The parameters for a request to elicit information from the user via a URL in the client.

Source code in src/mcp/types/v2026_07_28/__init__.py
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
class ElicitRequestURLParams(WireModel):
    """
    The parameters for a request to elicit information from the user via a URL in the client.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    message: str
    """
    The message to present to the user explaining why the interaction is needed.
    """
    mode: Literal["url"]
    """
    The elicitation mode.
    """
    url: str
    """
    The URL that the user should navigate to.
    """

message instance-attribute

message: str

The message to present to the user explaining why the interaction is needed.

mode instance-attribute

mode: Literal['url']

The elicitation mode.

url instance-attribute

url: str

The URL that the user should navigate to.

ElicitResult

Bases: WireModel

The result returned by the client for an {@link ElicitRequestelicitation/create} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
class ElicitResult(WireModel):
    """
    The result returned by the client for an {@link ElicitRequestelicitation/create} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    action: Literal["accept", "cancel", "decline"]
    """
    The user action in response to the elicitation.
    - `"accept"`: User submitted the form/confirmed the action
    - `"decline"`: User explicitly declined the action
    - `"cancel"`: User dismissed without making an explicit choice
    """
    content: dict[str, list[str] | str | int | float | bool | None] | None = None
    """
    The submitted form data, only present when action is `"accept"` and mode was `"form"`.
    Contains values matching the requested schema.
    Omitted for out-of-band mode responses.
    """

action instance-attribute

action: Literal['accept', 'cancel', 'decline']

The user action in response to the elicitation. - "accept": User submitted the form/confirmed the action - "decline": User explicitly declined the action - "cancel": User dismissed without making an explicit choice

content class-attribute instance-attribute

content: (
    dict[str, list[str] | str | int | float | bool | None]
    | None
) = None

The submitted form data, only present when action is "accept" and mode was "form". Contains values matching the requested schema. Omitted for out-of-band mode responses.

Error

Bases: WireModel

Source code in src/mcp/types/v2026_07_28/__init__.py
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
class Error(WireModel):
    model_config = ConfigDict(
        extra="ignore",
    )
    code: int
    """
    The error type that occurred.
    """
    data: Any | None = None
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """
    message: str
    """
    A short description of the error. The message SHOULD be limited to a concise single sentence.
    """

code instance-attribute

code: int

The error type that occurred.

data class-attribute instance-attribute

data: Any | None = None

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

message instance-attribute

message: str

A short description of the error. The message SHOULD be limited to a concise single sentence.

Error1

Bases: Error

Source code in src/mcp/types/v2026_07_28/__init__.py
206
207
208
209
210
211
212
213
class Error1(Error):
    model_config = ConfigDict(
        extra="ignore",
    )
    code: Literal[-32020]
    """
    The error type that occurred.
    """

code instance-attribute

code: Literal[-32020]

The error type that occurred.

Icon

Bases: WireModel

An optionally-sized icon that can be displayed in a user interface.

Source code in src/mcp/types/v2026_07_28/__init__.py
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
class Icon(WireModel):
    """
    An optionally-sized icon that can be displayed in a user interface.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    mime_type: Annotated[str | None, Field(alias="mimeType")] = None
    """
    Optional MIME type override if the source MIME type is missing or generic.
    For example: `"image/png"`, `"image/jpeg"`, or `"image/svg+xml"`.
    """
    sizes: list[str] | None = None
    """
    Optional array of strings that specify sizes at which the icon can be used.
    Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.

    If not provided, the client should assume that the icon can be used at any size.
    """
    src: str
    """
    A standard URI pointing to an icon resource. May be an HTTP/HTTPS URL or a
    `data:` URI with Base64-encoded image data.

    Consumers SHOULD take steps to ensure URLs serving icons are from the
    same domain as the client/server or a trusted domain.

    Consumers SHOULD take appropriate precautions when consuming SVGs as they can contain
    executable JavaScript.
    """
    theme: Literal["dark", "light"] | None = None
    """
    Optional specifier for the theme this icon is designed for. `"light"` indicates
    the icon is designed to be used with a light background, and `"dark"` indicates
    the icon is designed to be used with a dark background.

    If not provided, the client should assume the icon can be used with any theme.
    """

mime_type class-attribute instance-attribute

mime_type: Annotated[
    str | None, Field(alias="mimeType")
] = None

Optional MIME type override if the source MIME type is missing or generic. For example: "image/png", "image/jpeg", or "image/svg+xml".

sizes class-attribute instance-attribute

sizes: list[str] | None = None

Optional array of strings that specify sizes at which the icon can be used. Each string should be in WxH format (e.g., "48x48", "96x96") or "any" for scalable formats like SVG.

If not provided, the client should assume that the icon can be used at any size.

src instance-attribute

src: str

A standard URI pointing to an icon resource. May be an HTTP/HTTPS URL or a data: URI with Base64-encoded image data.

Consumers SHOULD take steps to ensure URLs serving icons are from the same domain as the client/server or a trusted domain.

Consumers SHOULD take appropriate precautions when consuming SVGs as they can contain executable JavaScript.

theme class-attribute instance-attribute

theme: Literal['dark', 'light'] | None = None

Optional specifier for the theme this icon is designed for. "light" indicates the icon is designed to be used with a light background, and "dark" indicates the icon is designed to be used with a dark background.

If not provided, the client should assume the icon can be used with any theme.

Icons

Bases: WireModel

Base interface to add icons property.

Source code in src/mcp/types/v2026_07_28/__init__.py
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
class Icons(WireModel):
    """
    Base interface to add `icons` property.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    icons: list[Icon] | None = None
    """
    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` (and `image/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)
    """

icons class-attribute instance-attribute

icons: list[Icon] | None = None

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 (and image/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)

Implementation

Bases: WireModel

Describes the MCP implementation.

Source code in src/mcp/types/v2026_07_28/__init__.py
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
class Implementation(WireModel):
    """
    Describes the MCP implementation.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    description: str | None = None
    """
    An optional human-readable description of what this implementation does.

    This can be used by clients or servers to provide context about their purpose
    and capabilities. For example, a server might describe the types of resources
    or tools it provides, while a client might describe its intended use case.
    """
    icons: list[Icon] | None = None
    """
    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` (and `image/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)
    """
    name: str
    """
    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
    """
    title: str | None = None
    """
    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 {@link Tool},
    where `annotations.title` should be given precedence over using `name`,
    if present).
    """
    version: str
    """
    The version of this implementation.
    """
    website_url: Annotated[str | None, Field(alias="websiteUrl")] = None
    """
    An optional URL of the website for this implementation.
    """

description class-attribute instance-attribute

description: str | None = None

An optional human-readable description of what this implementation does.

This can be used by clients or servers to provide context about their purpose and capabilities. For example, a server might describe the types of resources or tools it provides, while a client might describe its intended use case.

icons class-attribute instance-attribute

icons: list[Icon] | None = None

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 (and image/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)

name instance-attribute

name: str

Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

title class-attribute instance-attribute

title: str | None = None

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 {@link Tool}, where annotations.title should be given precedence over using name, if present).

version instance-attribute

version: str

The version of this implementation.

website_url class-attribute instance-attribute

website_url: Annotated[
    str | None, Field(alias="websiteUrl")
] = None

An optional URL of the website for this implementation.

InternalError

Bases: WireModel

A JSON-RPC error indicating that an internal error occurred on the receiver. This error is returned when the receiver encounters an unexpected condition that prevents it from fulfilling the request.

Source code in src/mcp/types/v2026_07_28/__init__.py
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
class InternalError(WireModel):
    """
    A JSON-RPC error indicating that an internal error occurred on the receiver. This error is returned when the receiver encounters an unexpected condition that prevents it from fulfilling the request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    code: Literal[-32603]
    """
    The error type that occurred.
    """
    data: Any | None = None
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """
    message: str
    """
    A short description of the error. The message SHOULD be limited to a concise single sentence.
    """

code instance-attribute

code: Literal[-32603]

The error type that occurred.

data class-attribute instance-attribute

data: Any | None = None

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

message instance-attribute

message: str

A short description of the error. The message SHOULD be limited to a concise single sentence.

InvalidParamsError

Bases: WireModel

A JSON-RPC error indicating that the method parameters are invalid or malformed.

In MCP, this error is returned in various contexts when request parameters fail validation:

  • Tools: Unknown tool name or invalid tool arguments
  • Prompts: Unknown prompt name or missing required arguments
  • Pagination: Invalid or expired cursor values
  • Logging: Invalid log level
  • Elicitation: Server requests an elicitation mode not declared in client capabilities
  • Sampling: Missing tool result or tool results mixed with other content
Source code in src/mcp/types/v2026_07_28/__init__.py
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
class InvalidParamsError(WireModel):
    """
    A JSON-RPC error indicating that the method parameters are invalid or malformed.

    In MCP, this error is returned in various contexts when request parameters fail validation:

    - **Tools**: Unknown tool name or invalid tool arguments
    - **Prompts**: Unknown prompt name or missing required arguments
    - **Pagination**: Invalid or expired cursor values
    - **Logging**: Invalid log level
    - **Elicitation**: Server requests an elicitation mode not declared in client capabilities
    - **Sampling**: Missing tool result or tool results mixed with other content
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    code: Literal[-32602]
    """
    The error type that occurred.
    """
    data: Any | None = None
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """
    message: str
    """
    A short description of the error. The message SHOULD be limited to a concise single sentence.
    """

code instance-attribute

code: Literal[-32602]

The error type that occurred.

data class-attribute instance-attribute

data: Any | None = None

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

message instance-attribute

message: str

A short description of the error. The message SHOULD be limited to a concise single sentence.

InvalidRequestError

Bases: WireModel

A JSON-RPC error indicating that the request is not a valid request object. This error is returned when the message structure does not conform to the JSON-RPC 2.0 specification requirements for a request (e.g., missing required fields like jsonrpc or method, or using invalid types for these fields).

Source code in src/mcp/types/v2026_07_28/__init__.py
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
class InvalidRequestError(WireModel):
    """
    A JSON-RPC error indicating that the request is not a valid request object. This error is returned when the message structure does not conform to the JSON-RPC 2.0 specification requirements for a request (e.g., missing required fields like `jsonrpc` or `method`, or using invalid types for these fields).
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    code: Literal[-32600]
    """
    The error type that occurred.
    """
    data: Any | None = None
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """
    message: str
    """
    A short description of the error. The message SHOULD be limited to a concise single sentence.
    """

code instance-attribute

code: Literal[-32600]

The error type that occurred.

data class-attribute instance-attribute

data: Any | None = None

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

message instance-attribute

message: str

A short description of the error. The message SHOULD be limited to a concise single sentence.

JSONRPCNotification

Bases: WireModel

A notification which does not expect a response.

Source code in src/mcp/types/v2026_07_28/__init__.py
405
406
407
408
409
410
411
412
413
414
415
class JSONRPCNotification(WireModel):
    """
    A notification which does not expect a response.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: str
    params: dict[str, Any] | None = None

LegacyTitledEnumSchema

Bases: WireModel

Use {@link TitledSingleSelectEnumSchema} instead. This interface will be removed in a future version.

Source code in src/mcp/types/v2026_07_28/__init__.py
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
class LegacyTitledEnumSchema(WireModel):
    """
    Use {@link TitledSingleSelectEnumSchema} instead.
    This interface will be removed in a future version.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    default: str | None = None
    description: str | None = None
    enum: list[str]
    enum_names: Annotated[list[str] | None, Field(alias="enumNames")] = None
    """
    (Legacy) Display names for enum values.
    Non-standard according to JSON schema 2020-12.
    """
    title: str | None = None
    type: Literal["string"]

enum_names class-attribute instance-attribute

enum_names: Annotated[
    list[str] | None, Field(alias="enumNames")
] = None

(Legacy) Display names for enum values. Non-standard according to JSON schema 2020-12.

LoggingLevel

Bases: RootModel[Literal['alert', 'critical', 'debug', 'emergency', 'error', 'info', 'notice', 'warning']]

Source code in src/mcp/types/v2026_07_28/__init__.py
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
class LoggingLevel(
    RootModel[
        Literal[
            "alert",
            "critical",
            "debug",
            "emergency",
            "error",
            "info",
            "notice",
            "warning",
        ]
    ]
):
    root: Literal["alert", "critical", "debug", "emergency", "error", "info", "notice", "warning"]
    """
    The severity of a log message.

    These map to syslog message severities, as specified in RFC-5424:
    https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1
    """

root instance-attribute

root: Literal[
    "alert",
    "critical",
    "debug",
    "emergency",
    "error",
    "info",
    "notice",
    "warning",
]

The severity of a log message.

These map to syslog message severities, as specified in RFC-5424: https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1

MetaObject

Bases: WireModel

Represents the contents of a _meta field, which clients and servers use to attach additional metadata to their interactions.

Certain key names are reserved by MCP for protocol-level metadata; implementations MUST NOT make assumptions about values at these keys. Additionally, specific schema definitions may reserve particular names for purpose-specific metadata, as declared in those definitions.

Valid keys have two segments:

Prefix: - Optional — if specified, MUST be a series of labels separated by dots (.), followed by a slash (/). - Labels MUST start with a letter and end with a letter or digit. Interior characters may be letters, digits, or hyphens (-). - Implementations SHOULD use reverse DNS notation (e.g., com.example/ rather than example.com/). - Any prefix where the second label is modelcontextprotocol or mcp is reserved for MCP use. For example: io.modelcontextprotocol/, dev.mcp/, org.modelcontextprotocol.api/, and com.mcp.tools/ are all reserved. However, com.example.mcp/ is NOT reserved, as the second label is example.

Name: - Unless empty, MUST start and end with an alphanumeric character ([a-z0-9A-Z]). - Interior characters may be alphanumeric, hyphens (-), underscores (_), or dots (.).

Source code in src/mcp/types/v2026_07_28/__init__.py
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
class MetaObject(WireModel):
    """
    Represents the contents of a `_meta` field, which clients and servers use to attach additional metadata to their interactions.

    Certain key names are reserved by MCP for protocol-level metadata; implementations MUST NOT make assumptions about values at these keys. Additionally, specific schema definitions may reserve particular names for purpose-specific metadata, as declared in those definitions.

    Valid keys have two segments:

    **Prefix:**
    - Optional — if specified, MUST be a series of _labels_ separated by dots (`.`), followed by a slash (`/`).
    - Labels MUST start with a letter and end with a letter or digit. Interior characters may be letters, digits, or hyphens (`-`).
    - Implementations SHOULD use reverse DNS notation (e.g., `com.example/` rather than `example.com/`).
    - Any prefix where the second label is `modelcontextprotocol` or `mcp` is **reserved** for MCP use. For example: `io.modelcontextprotocol/`, `dev.mcp/`, `org.modelcontextprotocol.api/`, and `com.mcp.tools/` are all reserved. However, `com.example.mcp/` is NOT reserved, as the second label is `example`.

    **Name:**
    - Unless empty, MUST start and end with an alphanumeric character (`[a-z0-9A-Z]`).
    - Interior characters may be alphanumeric, hyphens (`-`), underscores (`_`), or dots (`.`).
    """

    model_config = ConfigDict(
        extra="allow",
    )

MethodNotFoundError

Bases: WireModel

A JSON-RPC error indicating that the requested method does not exist or is not available.

In MCP, a server returns this error when a client invokes a method the server does not implement — either a genuinely unknown method, or one gated behind a server capability the server did not advertise (e.g., calling prompts/list when the prompts capability was not advertised).

A request that requires a client capability the client did not declare is signalled instead by {@link MissingRequiredClientCapabilityError} (-32021).

Source code in src/mcp/types/v2026_07_28/__init__.py
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
class MethodNotFoundError(WireModel):
    """
    A JSON-RPC error indicating that the requested method does not exist or is not available.

    In MCP, a server returns this error when a client invokes a method the server does not implement — either a genuinely unknown method, or one gated behind a server capability the server did not advertise (e.g., calling `prompts/list` when the `prompts` capability was not advertised).

    A request that requires a client capability the client did not declare is signalled instead by {@link MissingRequiredClientCapabilityError} (`-32021`).
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    code: Literal[-32601]
    """
    The error type that occurred.
    """
    data: Any | None = None
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """
    message: str
    """
    A short description of the error. The message SHOULD be limited to a concise single sentence.
    """

code instance-attribute

code: Literal[-32601]

The error type that occurred.

data class-attribute instance-attribute

data: Any | None = None

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

message instance-attribute

message: str

A short description of the error. The message SHOULD be limited to a concise single sentence.

ModelHint

Bases: WireModel

Hints to use for model selection.

Keys not declared here are currently left unspecified by the spec and are up to the client to interpret.

Source code in src/mcp/types/v2026_07_28/__init__.py
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
class ModelHint(WireModel):
    """
    Hints to use for model selection.

    Keys not declared here are currently left unspecified by the spec and are up
    to the client to interpret.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    name: str | None = None
    """
    A hint for a model name.

    The client SHOULD treat this as a substring of a model name; for example:
     - `claude-3-5-sonnet` should match `claude-3-5-sonnet-20241022`
     - `sonnet` should match `claude-3-5-sonnet-20241022`, `claude-3-sonnet-20240229`, etc.
     - `claude` should match any Claude model

    The client MAY also map the string to a different provider's model name or a different model family, as long as it fills a similar niche; for example:
     - `gemini-1.5-flash` could match `claude-3-haiku-20240307`
    """

name class-attribute instance-attribute

name: str | None = None

A hint for a model name.

The client SHOULD treat this as a substring of a model name; for example: - claude-3-5-sonnet should match claude-3-5-sonnet-20241022 - sonnet should match claude-3-5-sonnet-20241022, claude-3-sonnet-20240229, etc. - claude should match any Claude model

The client MAY also map the string to a different provider's model name or a different model family, as long as it fills a similar niche; for example: - gemini-1.5-flash could match claude-3-haiku-20240307

ModelPreferences

Bases: WireModel

The server's preferences for model selection, requested of the client during sampling.

Because LLMs can vary along multiple dimensions, choosing the "best" model is rarely straightforward. Different models excel in different areas—some are faster but less capable, others are more capable but more expensive, and so on. This interface allows servers to express their priorities across multiple dimensions to help clients make an appropriate selection for their use case.

These preferences are always advisory. The client MAY ignore them. It is also up to the client to decide how to interpret these preferences and how to balance them against other considerations.

Source code in src/mcp/types/v2026_07_28/__init__.py
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
class ModelPreferences(WireModel):
    """
    The server's preferences for model selection, requested of the client during sampling.

    Because LLMs can vary along multiple dimensions, choosing the "best" model is
    rarely straightforward.  Different models excel in different areas—some are
    faster but less capable, others are more capable but more expensive, and so
    on. This interface allows servers to express their priorities across multiple
    dimensions to help clients make an appropriate selection for their use case.

    These preferences are always advisory. The client MAY ignore them. It is also
    up to the client to decide how to interpret these preferences and how to
    balance them against other considerations.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    cost_priority: Annotated[float | None, Field(alias="costPriority", ge=0.0, le=1.0)] = None
    """
    How much to prioritize cost when selecting a model. A value of 0 means cost
    is not important, while a value of 1 means cost is the most important
    factor.
    """
    hints: list[ModelHint] | None = None
    """
    Optional hints to use for model selection.

    If multiple hints are specified, the client MUST evaluate them in order
    (such that the first match is taken).

    The client SHOULD prioritize these hints over the numeric priorities, but
    MAY still use the priorities to select from ambiguous matches.
    """
    intelligence_priority: Annotated[float | None, Field(alias="intelligencePriority", ge=0.0, le=1.0)] = None
    """
    How much to prioritize intelligence and capabilities when selecting a
    model. A value of 0 means intelligence is not important, while a value of 1
    means intelligence is the most important factor.
    """
    speed_priority: Annotated[float | None, Field(alias="speedPriority", ge=0.0, le=1.0)] = None
    """
    How much to prioritize sampling speed (latency) when selecting a model. A
    value of 0 means speed is not important, while a value of 1 means speed is
    the most important factor.
    """

cost_priority class-attribute instance-attribute

cost_priority: Annotated[
    float | None,
    Field(alias="costPriority", ge=0.0, le=1.0),
] = None

How much to prioritize cost when selecting a model. A value of 0 means cost is not important, while a value of 1 means cost is the most important factor.

hints class-attribute instance-attribute

hints: list[ModelHint] | None = None

Optional hints to use for model selection.

If multiple hints are specified, the client MUST evaluate them in order (such that the first match is taken).

The client SHOULD prioritize these hints over the numeric priorities, but MAY still use the priorities to select from ambiguous matches.

intelligence_priority class-attribute instance-attribute

intelligence_priority: Annotated[
    float | None,
    Field(alias="intelligencePriority", ge=0.0, le=1.0),
] = None

How much to prioritize intelligence and capabilities when selecting a model. A value of 0 means intelligence is not important, while a value of 1 means intelligence is the most important factor.

speed_priority class-attribute instance-attribute

speed_priority: Annotated[
    float | None,
    Field(alias="speedPriority", ge=0.0, le=1.0),
] = None

How much to prioritize sampling speed (latency) when selecting a model. A value of 0 means speed is not important, while a value of 1 means speed is the most important factor.

PaginatedResult

Bases: WireModel

Source code in src/mcp/types/v2026_07_28/__init__.py
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
class PaginatedResult(WireModel):
    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    next_cursor: Annotated[str | None, Field(alias="nextCursor")] = None
    """
    An opaque token representing the pagination position after the last returned result.
    If present, there may be more results available.
    """
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """

next_cursor class-attribute instance-attribute

next_cursor: Annotated[
    str | None, Field(alias="nextCursor")
] = None

An opaque token representing the pagination position after the last returned result. If present, there may be more results available.

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

ParseError

Bases: WireModel

A JSON-RPC error indicating that invalid JSON was received by the server. This error is returned when the server cannot parse the JSON text of a message.

Source code in src/mcp/types/v2026_07_28/__init__.py
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
class ParseError(WireModel):
    """
    A JSON-RPC error indicating that invalid JSON was received by the server. This error is returned when the server cannot parse the JSON text of a message.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    code: Literal[-32700]
    """
    The error type that occurred.
    """
    data: Any | None = None
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """
    message: str
    """
    A short description of the error. The message SHOULD be limited to a concise single sentence.
    """

code instance-attribute

code: Literal[-32700]

The error type that occurred.

data class-attribute instance-attribute

data: Any | None = None

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

message instance-attribute

message: str

A short description of the error. The message SHOULD be limited to a concise single sentence.

ProgressToken

Bases: RootModel[str | int]

Source code in src/mcp/types/v2026_07_28/__init__.py
649
650
651
652
653
class ProgressToken(RootModel[str | int]):
    root: str | int
    """
    A progress token, used to associate progress notifications with the original request.
    """

root instance-attribute

root: str | int

A progress token, used to associate progress notifications with the original request.

PromptArgument

Bases: WireModel

Describes an argument that a prompt can accept.

Source code in src/mcp/types/v2026_07_28/__init__.py
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
class PromptArgument(WireModel):
    """
    Describes an argument that a prompt can accept.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    description: str | None = None
    """
    A human-readable description of the argument.
    """
    name: str
    """
    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
    """
    required: bool | None = None
    """
    Whether this argument must be provided.
    """
    title: str | None = None
    """
    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 {@link Tool},
    where `annotations.title` should be given precedence over using `name`,
    if present).
    """

description class-attribute instance-attribute

description: str | None = None

A human-readable description of the argument.

name instance-attribute

name: str

Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

required class-attribute instance-attribute

required: bool | None = None

Whether this argument must be provided.

title class-attribute instance-attribute

title: str | None = None

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 {@link Tool}, where annotations.title should be given precedence over using name, if present).

PromptReference

Bases: WireModel

Identifies a prompt.

Source code in src/mcp/types/v2026_07_28/__init__.py
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
class PromptReference(WireModel):
    """
    Identifies a prompt.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    name: str
    """
    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
    """
    title: str | None = None
    """
    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 {@link Tool},
    where `annotations.title` should be given precedence over using `name`,
    if present).
    """
    type: Literal["ref/prompt"]

name instance-attribute

name: str

Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

title class-attribute instance-attribute

title: str | None = None

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 {@link Tool}, where annotations.title should be given precedence over using name, if present).

RequestId

Bases: RootModel[str | int]

Source code in src/mcp/types/v2026_07_28/__init__.py
719
720
721
722
723
class RequestId(RootModel[str | int]):
    root: str | int
    """
    A uniquely identifying ID for a request in JSON-RPC.
    """

root instance-attribute

root: str | int

A uniquely identifying ID for a request in JSON-RPC.

ResourceContents

Bases: WireModel

The contents of a specific resource or sub-resource.

Source code in src/mcp/types/v2026_07_28/__init__.py
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
class ResourceContents(WireModel):
    """
    The contents of a specific resource or sub-resource.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    mime_type: Annotated[str | None, Field(alias="mimeType")] = None
    """
    The MIME type of this resource, if known.
    """
    uri: str
    """
    The URI of this resource.
    """

mime_type class-attribute instance-attribute

mime_type: Annotated[
    str | None, Field(alias="mimeType")
] = None

The MIME type of this resource, if known.

uri instance-attribute

uri: str

The URI of this resource.

ResourceTemplateReference

Bases: WireModel

A reference to a resource or resource template definition.

Source code in src/mcp/types/v2026_07_28/__init__.py
745
746
747
748
749
750
751
752
753
754
755
756
757
class ResourceTemplateReference(WireModel):
    """
    A reference to a resource or resource template definition.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    type: Literal["ref/resource"]
    uri: str
    """
    The URI or URI template of the resource.
    """

uri instance-attribute

uri: str

The URI or URI template of the resource.

Result

Bases: WireModel

Common result fields.

Source code in src/mcp/types/v2026_07_28/__init__.py
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
class Result(WireModel):
    """
    Common result fields.
    """

    model_config = ConfigDict(
        extra="allow",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

ResultType

Bases: RootModel[str]

Source code in src/mcp/types/v2026_07_28/__init__.py
781
782
783
784
785
786
787
788
789
class ResultType(RootModel[str]):
    root: str
    """
    Indicates the type of a {@link Result} object, allowing the client to
    determine how to parse the response.

    complete - the request completed successfully and the result contains the final content.
    input_required - the request requires additional input and the result contains an {@link InputRequiredResult} object with instructions for the client to provide additional input before retrying the original request.
    """

root instance-attribute

root: str

Indicates the type of a {@link Result} object, allowing the client to determine how to parse the response.

complete - the request completed successfully and the result contains the final content. input_required - the request requires additional input and the result contains an {@link InputRequiredResult} object with instructions for the client to provide additional input before retrying the original request.

Role

Bases: RootModel[Literal['assistant', 'user']]

Source code in src/mcp/types/v2026_07_28/__init__.py
792
793
794
795
796
class Role(RootModel[Literal["assistant", "user"]]):
    root: Literal["assistant", "user"]
    """
    The sender or recipient of messages and data in a conversation.
    """

root instance-attribute

root: Literal['assistant', 'user']

The sender or recipient of messages and data in a conversation.

Root

Bases: WireModel

Represents a root directory or file that the server can operate on.

Source code in src/mcp/types/v2026_07_28/__init__.py
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
class Root(WireModel):
    """
    Represents a root directory or file that the server can operate on.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    name: str | None = None
    """
    An optional name for the root. This can be used to provide a human-readable
    identifier for the root, which may be useful for display purposes or for
    referencing the root in other parts of the application.
    """
    uri: str
    """
    The URI identifying the root. This *must* start with `file://` for now.
    This restriction may be relaxed in future versions of the protocol to allow
    other URI schemes.
    """

name class-attribute instance-attribute

name: str | None = None

An optional name for the root. This can be used to provide a human-readable identifier for the root, which may be useful for display purposes or for referencing the root in other parts of the application.

uri instance-attribute

uri: str

The URI identifying the root. This must start with file:// for now. This restriction may be relaxed in future versions of the protocol to allow other URI schemes.

Prompts

Bases: WireModel

Present if the server offers any prompt templates.

Source code in src/mcp/types/v2026_07_28/__init__.py
822
823
824
825
826
827
828
829
830
831
832
833
class Prompts(WireModel):
    """
    Present if the server offers any prompt templates.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    list_changed: Annotated[bool | None, Field(alias="listChanged")] = None
    """
    Whether this server supports notifications for changes to the prompt list.
    """

list_changed class-attribute instance-attribute

list_changed: Annotated[
    bool | None, Field(alias="listChanged")
] = None

Whether this server supports notifications for changes to the prompt list.

Resources

Bases: WireModel

Present if the server offers any resources to read.

Source code in src/mcp/types/v2026_07_28/__init__.py
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
class Resources(WireModel):
    """
    Present if the server offers any resources to read.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    list_changed: Annotated[bool | None, Field(alias="listChanged")] = None
    """
    Whether this server supports notifications for changes to the resource list.
    """
    subscribe: bool | None = None
    """
    Whether this server supports subscribing to resource updates.
    """

list_changed class-attribute instance-attribute

list_changed: Annotated[
    bool | None, Field(alias="listChanged")
] = None

Whether this server supports notifications for changes to the resource list.

subscribe class-attribute instance-attribute

subscribe: bool | None = None

Whether this server supports subscribing to resource updates.

Tools

Bases: WireModel

Present if the server offers any tools to call.

Source code in src/mcp/types/v2026_07_28/__init__.py
854
855
856
857
858
859
860
861
862
863
864
865
class Tools(WireModel):
    """
    Present if the server offers any tools to call.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    list_changed: Annotated[bool | None, Field(alias="listChanged")] = None
    """
    Whether this server supports notifications for changes to the tool list.
    """

list_changed class-attribute instance-attribute

list_changed: Annotated[
    bool | None, Field(alias="listChanged")
] = None

Whether this server supports notifications for changes to the tool list.

SubscriptionFilter

Bases: WireModel

The set of notification types a client may opt in to on a {@link SubscriptionsListenRequestsubscriptions/listen} request.

Each notification type is opt-in; the server MUST NOT send notification types the client has not explicitly requested here.

Source code in src/mcp/types/v2026_07_28/__init__.py
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
class SubscriptionFilter(WireModel):
    """
    The set of notification types a client may opt in to on a
    {@link SubscriptionsListenRequestsubscriptions/listen} request.

    Each notification type is **opt-in**; the server **MUST NOT** send
    notification types the client has not explicitly requested here.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    prompts_list_changed: Annotated[bool | None, Field(alias="promptsListChanged")] = None
    """
    If true, receive {@link PromptListChangedNotificationnotifications/prompts/list_changed}.
    """
    resource_subscriptions: Annotated[list[str] | None, Field(alias="resourceSubscriptions")] = None
    """
    Subscribe to {@link ResourceUpdatedNotificationnotifications/resources/updated} for these resource URIs.
    Replaces the former `resources/subscribe` RPC.
    """
    resources_list_changed: Annotated[bool | None, Field(alias="resourcesListChanged")] = None
    """
    If true, receive {@link ResourceListChangedNotificationnotifications/resources/list_changed}.
    """
    tools_list_changed: Annotated[bool | None, Field(alias="toolsListChanged")] = None
    """
    If true, receive {@link ToolListChangedNotificationnotifications/tools/list_changed}.
    """

prompts_list_changed class-attribute instance-attribute

prompts_list_changed: Annotated[
    bool | None, Field(alias="promptsListChanged")
] = None

If true, receive {@link PromptListChangedNotificationnotifications/prompts/list_changed}.

resource_subscriptions class-attribute instance-attribute

resource_subscriptions: Annotated[
    list[str] | None, Field(alias="resourceSubscriptions")
] = None

Subscribe to {@link ResourceUpdatedNotificationnotifications/resources/updated} for these resource URIs. Replaces the former resources/subscribe RPC.

resources_list_changed class-attribute instance-attribute

resources_list_changed: Annotated[
    bool | None, Field(alias="resourcesListChanged")
] = None

If true, receive {@link ResourceListChangedNotificationnotifications/resources/list_changed}.

tools_list_changed class-attribute instance-attribute

tools_list_changed: Annotated[
    bool | None, Field(alias="toolsListChanged")
] = None

If true, receive {@link ToolListChangedNotificationnotifications/tools/list_changed}.

TextResourceContents

Bases: WireModel

Source code in src/mcp/types/v2026_07_28/__init__.py
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
class TextResourceContents(WireModel):
    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    mime_type: Annotated[str | None, Field(alias="mimeType")] = None
    """
    The MIME type of this resource, if known.
    """
    text: str
    """
    The text of the item. This must only be set if the item can actually be represented as text (not binary data).
    """
    uri: str
    """
    The URI of this resource.
    """

mime_type class-attribute instance-attribute

mime_type: Annotated[
    str | None, Field(alias="mimeType")
] = None

The MIME type of this resource, if known.

text instance-attribute

text: str

The text of the item. This must only be set if the item can actually be represented as text (not binary data).

uri instance-attribute

uri: str

The URI of this resource.

AnyOfItem

Bases: WireModel

Source code in src/mcp/types/v2026_07_28/__init__.py
931
932
933
934
935
936
937
938
939
940
941
942
class AnyOfItem(WireModel):
    model_config = ConfigDict(
        extra="ignore",
    )
    const: str
    """
    The constant enum value.
    """
    title: str
    """
    Display title for this option.
    """

const instance-attribute

const: str

The constant enum value.

title instance-attribute

title: str

Display title for this option.

Items

Bases: WireModel

Schema for array items with enum options and display labels.

Source code in src/mcp/types/v2026_07_28/__init__.py
945
946
947
948
949
950
951
952
953
954
955
956
class Items(WireModel):
    """
    Schema for array items with enum options and display labels.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    any_of: Annotated[list[AnyOfItem], Field(alias="anyOf")]
    """
    Array of enum options with values and display labels.
    """

any_of instance-attribute

any_of: Annotated[list[AnyOfItem], Field(alias='anyOf')]

Array of enum options with values and display labels.

TitledMultiSelectEnumSchema

Bases: WireModel

Schema for multiple-selection enumeration with display titles for each option.

Source code in src/mcp/types/v2026_07_28/__init__.py
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
class TitledMultiSelectEnumSchema(WireModel):
    """
    Schema for multiple-selection enumeration with display titles for each option.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    default: list[str] | None = None
    """
    Optional default value.
    """
    description: str | None = None
    """
    Optional description for the enum field.
    """
    items: Items
    """
    Schema for array items with enum options and display labels.
    """
    max_items: Annotated[int | None, Field(alias="maxItems")] = None
    """
    Maximum number of items to select.
    """
    min_items: Annotated[int | None, Field(alias="minItems")] = None
    """
    Minimum number of items to select.
    """
    title: str | None = None
    """
    Optional title for the enum field.
    """
    type: Literal["array"]

default class-attribute instance-attribute

default: list[str] | None = None

Optional default value.

description class-attribute instance-attribute

description: str | None = None

Optional description for the enum field.

items instance-attribute

items: Items

Schema for array items with enum options and display labels.

max_items class-attribute instance-attribute

max_items: Annotated[
    int | None, Field(alias="maxItems")
] = None

Maximum number of items to select.

min_items class-attribute instance-attribute

min_items: Annotated[
    int | None, Field(alias="minItems")
] = None

Minimum number of items to select.

title class-attribute instance-attribute

title: str | None = None

Optional title for the enum field.

OneOfItem

Bases: WireModel

Source code in src/mcp/types/v2026_07_28/__init__.py
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
class OneOfItem(WireModel):
    model_config = ConfigDict(
        extra="ignore",
    )
    const: str
    """
    The enum value.
    """
    title: str
    """
    Display label for this option.
    """

const instance-attribute

const: str

The enum value.

title instance-attribute

title: str

Display label for this option.

TitledSingleSelectEnumSchema

Bases: WireModel

Schema for single-selection enumeration with display titles for each option.

Source code in src/mcp/types/v2026_07_28/__init__.py
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
class TitledSingleSelectEnumSchema(WireModel):
    """
    Schema for single-selection enumeration with display titles for each option.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    default: str | None = None
    """
    Optional default value.
    """
    description: str | None = None
    """
    Optional description for the enum field.
    """
    one_of: Annotated[list[OneOfItem], Field(alias="oneOf")]
    """
    Array of enum options with values and display labels.
    """
    title: str | None = None
    """
    Optional title for the enum field.
    """
    type: Literal["string"]

default class-attribute instance-attribute

default: str | None = None

Optional default value.

description class-attribute instance-attribute

description: str | None = None

Optional description for the enum field.

one_of instance-attribute

one_of: Annotated[list[OneOfItem], Field(alias='oneOf')]

Array of enum options with values and display labels.

title class-attribute instance-attribute

title: str | None = None

Optional title for the enum field.

InputSchema

Bases: WireModel

A JSON Schema object defining the expected parameters for the tool.

Tool arguments are always JSON objects, so type: "object" is required at the root. Beyond that, any JSON Schema 2020-12 keyword may appear alongside type — including composition keywords (oneOf, anyOf, allOf, not), conditional keywords (if/then/else), reference keywords ($ref, $defs, $anchor), and any other standard validation or annotation keywords.

Property schemas may carry an x-mcp-header annotation to mirror the argument value into an HTTP header on the Streamable HTTP transport. See the Streamable HTTP transport specification for the validity and extraction rules.

Defaults to JSON Schema 2020-12 when no explicit $schema is provided.

Source code in src/mcp/types/v2026_07_28/__init__.py
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
class InputSchema(WireModel):
    """
    A JSON Schema object defining the expected parameters for the tool.

    Tool arguments are always JSON objects, so `type: "object"` is required at the root.
    Beyond that, any JSON Schema 2020-12 keyword may appear alongside `type` — including
    composition keywords (`oneOf`, `anyOf`, `allOf`, `not`), conditional keywords
    (`if`/`then`/`else`), reference keywords (`$ref`, `$defs`, `$anchor`), and any other
    standard validation or annotation keywords.

    Property schemas may carry an `x-mcp-header` annotation to mirror the
    argument value into an HTTP header on the Streamable HTTP transport. See
    the Streamable HTTP transport specification for the validity and
    extraction rules.

    Defaults to JSON Schema 2020-12 when no explicit `$schema` is provided.
    """

    model_config = ConfigDict(
        extra="allow",
    )
    schema_: Annotated[str | None, Field(alias="$schema")] = None
    type: Literal["object"]

OutputSchema

Bases: WireModel

An optional JSON Schema object defining the structure of the tool's output returned in the structuredContent field of a {@link CallToolResult}. This can be any valid JSON Schema 2020-12.

Defaults to JSON Schema 2020-12 when no explicit $schema is provided.

Source code in src/mcp/types/v2026_07_28/__init__.py
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
class OutputSchema(WireModel):
    """
    An optional JSON Schema object defining the structure of the tool's output returned in
    the structuredContent field of a {@link CallToolResult}. This can be any valid JSON Schema 2020-12.

    Defaults to JSON Schema 2020-12 when no explicit `$schema` is provided.
    """

    model_config = ConfigDict(
        extra="allow",
    )
    schema_: Annotated[str | None, Field(alias="$schema")] = None

ToolAnnotations

Bases: WireModel

Additional properties describing a {@link 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.

Source code in src/mcp/types/v2026_07_28/__init__.py
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
class ToolAnnotations(WireModel):
    """
    Additional properties describing a {@link 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.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    destructive_hint: Annotated[bool | None, Field(alias="destructiveHint")] = None
    """
    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
    """
    idempotent_hint: Annotated[bool | None, Field(alias="idempotentHint")] = None
    """
    If true, calling the tool repeatedly with the same arguments
    will have no additional effect on its environment.

    (This property is meaningful only when `readOnlyHint == false`)

    Default: false
    """
    open_world_hint: Annotated[bool | None, Field(alias="openWorldHint")] = None
    """
    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
    """
    read_only_hint: Annotated[bool | None, Field(alias="readOnlyHint")] = None
    """
    If true, the tool does not modify its environment.

    Default: false
    """
    title: str | None = None
    """
    A human-readable title for the tool.
    """

destructive_hint class-attribute instance-attribute

destructive_hint: Annotated[
    bool | None, Field(alias="destructiveHint")
] = None

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

idempotent_hint class-attribute instance-attribute

idempotent_hint: Annotated[
    bool | None, Field(alias="idempotentHint")
] = None

If true, calling the tool repeatedly with the same arguments will have no additional effect on its environment.

(This property is meaningful only when readOnlyHint == false)

Default: false

open_world_hint class-attribute instance-attribute

open_world_hint: Annotated[
    bool | None, Field(alias="openWorldHint")
] = None

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

read_only_hint class-attribute instance-attribute

read_only_hint: Annotated[
    bool | None, Field(alias="readOnlyHint")
] = None

If true, the tool does not modify its environment.

Default: false

title class-attribute instance-attribute

title: str | None = None

A human-readable title for the tool.

ToolChoice

Bases: WireModel

Controls tool selection behavior for sampling requests.

Source code in src/mcp/types/v2026_07_28/__init__.py
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
class ToolChoice(WireModel):
    """
    Controls tool selection behavior for sampling requests.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    mode: Literal["auto", "none", "required"] | None = None
    """
    Controls the tool use ability of the model:
    - `"auto"`: Model decides whether to use tools (default)
    - `"required"`: Model MUST use at least one tool before completing
    - `"none"`: Model MUST NOT use any tools
    """

mode class-attribute instance-attribute

mode: Literal['auto', 'none', 'required'] | None = None

Controls the tool use ability of the model: - "auto": Model decides whether to use tools (default) - "required": Model MUST use at least one tool before completing - "none": Model MUST NOT use any tools

ToolUseContent

Bases: WireModel

A request from the assistant to call a tool.

Source code in src/mcp/types/v2026_07_28/__init__.py
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
class ToolUseContent(WireModel):
    """
    A request from the assistant to call a tool.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    """
    Optional metadata about the tool use. Clients SHOULD preserve this field when
    including tool uses in subsequent sampling requests to enable caching optimizations.
    """
    id: str
    """
    A unique identifier for this tool use.

    This ID is used to match tool results to their corresponding tool uses.
    """
    input: dict[str, Any]
    """
    The arguments to pass to the tool, conforming to the tool's input schema.
    """
    name: str
    """
    The name of the tool to call.
    """
    type: Literal["tool_use"]

meta class-attribute instance-attribute

meta: Annotated[MetaObject | None, Field(alias="_meta")] = (
    None
)

Optional metadata about the tool use. Clients SHOULD preserve this field when including tool uses in subsequent sampling requests to enable caching optimizations.

id instance-attribute

id: str

A unique identifier for this tool use.

This ID is used to match tool results to their corresponding tool uses.

input instance-attribute

input: dict[str, Any]

The arguments to pass to the tool, conforming to the tool's input schema.

name instance-attribute

name: str

The name of the tool to call.

Data1

Bases: WireModel

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

Source code in src/mcp/types/v2026_07_28/__init__.py
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
class Data1(WireModel):
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    requested: str
    """
    The protocol version that was requested by the client.
    """
    supported: list[str]
    """
    Protocol versions the server supports. The client should choose a
    mutually supported version from this list and retry.
    """

requested instance-attribute

requested: str

The protocol version that was requested by the client.

supported instance-attribute

supported: list[str]

Protocol versions the server supports. The client should choose a mutually supported version from this list and retry.

Error3

Bases: Error

Source code in src/mcp/types/v2026_07_28/__init__.py
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
class Error3(Error):
    model_config = ConfigDict(
        extra="ignore",
    )
    code: Literal[-32022]
    """
    The error type that occurred.
    """
    data: Data1
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """

code instance-attribute

code: Literal[-32022]

The error type that occurred.

data instance-attribute

data: Data1

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

UnsupportedProtocolVersionError

Bases: WireModel

Returned when the request's protocol version is unknown to the server or unsupported (e.g., a known experimental or draft version the server has chosen not to implement). For HTTP, the response status code MUST be 400 Bad Request.

Source code in src/mcp/types/v2026_07_28/__init__.py
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
class UnsupportedProtocolVersionError(WireModel):
    """
    Returned when the request's protocol version is unknown to the server or
    unsupported (e.g., a known experimental or draft version the server has
    chosen not to implement). For HTTP, the response status code MUST be
    `400 Bad Request`.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    error: Error3
    id: RequestId | None = None
    jsonrpc: Literal["2.0"]

Items1

Bases: WireModel

Schema for the array items.

Source code in src/mcp/types/v2026_07_28/__init__.py
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
class Items1(WireModel):
    """
    Schema for the array items.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    enum: list[str]
    """
    Array of enum values to choose from.
    """
    type: Literal["string"]

enum instance-attribute

enum: list[str]

Array of enum values to choose from.

UntitledMultiSelectEnumSchema

Bases: WireModel

Schema for multiple-selection enumeration without display titles for options.

Source code in src/mcp/types/v2026_07_28/__init__.py
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
class UntitledMultiSelectEnumSchema(WireModel):
    """
    Schema for multiple-selection enumeration without display titles for options.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    default: list[str] | None = None
    """
    Optional default value.
    """
    description: str | None = None
    """
    Optional description for the enum field.
    """
    items: Items1
    """
    Schema for the array items.
    """
    max_items: Annotated[int | None, Field(alias="maxItems")] = None
    """
    Maximum number of items to select.
    """
    min_items: Annotated[int | None, Field(alias="minItems")] = None
    """
    Minimum number of items to select.
    """
    title: str | None = None
    """
    Optional title for the enum field.
    """
    type: Literal["array"]

default class-attribute instance-attribute

default: list[str] | None = None

Optional default value.

description class-attribute instance-attribute

description: str | None = None

Optional description for the enum field.

items instance-attribute

items: Items1

Schema for the array items.

max_items class-attribute instance-attribute

max_items: Annotated[
    int | None, Field(alias="maxItems")
] = None

Maximum number of items to select.

min_items class-attribute instance-attribute

min_items: Annotated[
    int | None, Field(alias="minItems")
] = None

Minimum number of items to select.

title class-attribute instance-attribute

title: str | None = None

Optional title for the enum field.

UntitledSingleSelectEnumSchema

Bases: WireModel

Schema for single-selection enumeration without display titles for options.

Source code in src/mcp/types/v2026_07_28/__init__.py
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
class UntitledSingleSelectEnumSchema(WireModel):
    """
    Schema for single-selection enumeration without display titles for options.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    default: str | None = None
    """
    Optional default value.
    """
    description: str | None = None
    """
    Optional description for the enum field.
    """
    enum: list[str]
    """
    Array of enum values to choose from.
    """
    title: str | None = None
    """
    Optional title for the enum field.
    """
    type: Literal["string"]

default class-attribute instance-attribute

default: str | None = None

Optional default value.

description class-attribute instance-attribute

description: str | None = None

Optional description for the enum field.

enum instance-attribute

enum: list[str]

Array of enum values to choose from.

title class-attribute instance-attribute

title: str | None = None

Optional title for the enum field.

Annotations

Bases: WireModel

Optional annotations for the client. The client can use annotations to inform how objects are used or displayed

Source code in src/mcp/types/v2026_07_28/__init__.py
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
class Annotations(WireModel):
    """
    Optional annotations for the client. The client can use annotations to inform how objects are used or displayed
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    audience: list[Role] | None = None
    """
    Describes who the intended audience of this object or data is.

    It can include multiple entries to indicate content useful for multiple audiences (e.g., `["user", "assistant"]`).
    """
    last_modified: Annotated[str | None, Field(alias="lastModified")] = None
    """
    The moment the resource was last modified, as an ISO 8601 formatted string.

    Should be an ISO 8601 formatted string (e.g., "2025-01-12T15:00:58Z").

    Examples: last activity timestamp in an open file, timestamp when the resource
    was attached, etc.
    """
    priority: Annotated[float | None, Field(ge=0.0, le=1.0)] = None
    """
    Describes how important this data is for operating the server.

    A value of 1 means "most important," and indicates that the data is
    effectively required, while 0 means "least important," and indicates that
    the data is entirely optional.
    """

audience class-attribute instance-attribute

audience: list[Role] | None = None

Describes who the intended audience of this object or data is.

It can include multiple entries to indicate content useful for multiple audiences (e.g., ["user", "assistant"]).

last_modified class-attribute instance-attribute

last_modified: Annotated[
    str | None, Field(alias="lastModified")
] = None

The moment the resource was last modified, as an ISO 8601 formatted string.

Should be an ISO 8601 formatted string (e.g., "2025-01-12T15:00:58Z").

Examples: last activity timestamp in an open file, timestamp when the resource was attached, etc.

priority class-attribute instance-attribute

priority: Annotated[float | None, Field(ge=0.0, le=1.0)] = (
    None
)

Describes how important this data is for operating the server.

A value of 1 means "most important," and indicates that the data is effectively required, while 0 means "least important," and indicates that the data is entirely optional.

AudioContent

Bases: WireModel

Audio provided to or from an LLM.

Source code in src/mcp/types/v2026_07_28/__init__.py
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
class AudioContent(WireModel):
    """
    Audio provided to or from an LLM.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    annotations: Annotations | None = None
    """
    Optional annotations for the client.
    """
    data: str
    """
    The base64-encoded audio data.
    """
    mime_type: Annotated[str, Field(alias="mimeType")]
    """
    The MIME type of the audio. Different providers may support different audio types.
    """
    type: Literal["audio"]

annotations class-attribute instance-attribute

annotations: Annotations | None = None

Optional annotations for the client.

data instance-attribute

data: str

The base64-encoded audio data.

mime_type instance-attribute

mime_type: Annotated[str, Field(alias='mimeType')]

The MIME type of the audio. Different providers may support different audio types.

BlobResourceContents

Bases: WireModel

Source code in src/mcp/types/v2026_07_28/__init__.py
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
class BlobResourceContents(WireModel):
    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    blob: str
    """
    A base64-encoded string representing the binary data of the item.
    """
    mime_type: Annotated[str | None, Field(alias="mimeType")] = None
    """
    The MIME type of this resource, if known.
    """
    uri: str
    """
    The URI of this resource.
    """

blob instance-attribute

blob: str

A base64-encoded string representing the binary data of the item.

mime_type class-attribute instance-attribute

mime_type: Annotated[
    str | None, Field(alias="mimeType")
] = None

The MIME type of this resource, if known.

uri instance-attribute

uri: str

The URI of this resource.

CacheableResult

Bases: WireModel

A result that supports a time-to-live (TTL) hint for client-side caching.

Source code in src/mcp/types/v2026_07_28/__init__.py
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
class CacheableResult(WireModel):
    """
    A result that supports a time-to-live (TTL) hint for client-side caching.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    cache_scope: Annotated[Literal["private", "public"], Field(alias="cacheScope")]
    """
    Indicates the intended scope of the cached response, analogous to HTTP
    `Cache-Control: public` vs `Cache-Control: private`.

    - `"public"`: The response does not contain user-specific data. Any
      client or intermediary (e.g., shared gateway, caching proxy) MAY cache
      the response and serve it across authorization contexts.
    - `"private"`: The response MAY be cached and reused only within the
      same authorization context. Caches MUST NOT be shared across
      authorization contexts (e.g., a different access token requires a
      different cache).
    """
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """
    ttl_ms: Annotated[int, Field(alias="ttlMs", ge=0)]
    """
    A hint from the server indicating how long (in milliseconds) the
    client MAY cache this response before re-fetching. Semantics are
    analogous to HTTP Cache-Control max-age.

    - If 0, The response SHOULD be considered immediately stale,
      The client MAY re-fetch every time the result is needed.
    - If positive, the client SHOULD consider the result fresh for this many
      milliseconds after receiving the response.
    """

cache_scope instance-attribute

cache_scope: Annotated[
    Literal["private", "public"], Field(alias="cacheScope")
]

Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.

  • "public": The response does not contain user-specific data. Any client or intermediary (e.g., shared gateway, caching proxy) MAY cache the response and serve it across authorization contexts.
  • "private": The response MAY be cached and reused only within the same authorization context. Caches MUST NOT be shared across authorization contexts (e.g., a different access token requires a different cache).

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

ttl_ms instance-attribute

ttl_ms: Annotated[int, Field(alias='ttlMs', ge=0)]

A hint from the server indicating how long (in milliseconds) the client MAY cache this response before re-fetching. Semantics are analogous to HTTP Cache-Control max-age.

  • If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
  • If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.

ClientResult

Bases: RootModel[Result]

Source code in src/mcp/types/v2026_07_28/__init__.py
1422
1423
1424
1425
1426
class ClientResult(RootModel[Result]):
    root: Result
    """
    Common result fields.
    """

root instance-attribute

root: Result

Common result fields.

CompleteResult

Bases: WireModel

The result returned by the server for a {@link CompleteRequestcompletion/complete} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
class CompleteResult(WireModel):
    """
    The result returned by the server for a {@link CompleteRequestcompletion/complete} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    completion: Completion
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

CompleteResultResponse

Bases: WireModel

A successful response from the server for a {@link CompleteRequestcompletion/complete} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
class CompleteResultResponse(WireModel):
    """
    A successful response from the server for a {@link CompleteRequestcompletion/complete} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: CompleteResult

ElicitRequestParams

Bases: RootModel[ElicitRequestFormParams | ElicitRequestURLParams]

Source code in src/mcp/types/v2026_07_28/__init__.py
1464
1465
1466
1467
1468
class ElicitRequestParams(RootModel[ElicitRequestFormParams | ElicitRequestURLParams]):
    root: ElicitRequestFormParams | ElicitRequestURLParams
    """
    The parameters for a request to elicit additional information from the user via the client.
    """

root instance-attribute

The parameters for a request to elicit additional information from the user via the client.

EmbeddedResource

Bases: WireModel

The contents of a resource, embedded into a prompt or tool call result.

It is up to the client how best to render embedded resources for the benefit of the LLM and/or the user.

Source code in src/mcp/types/v2026_07_28/__init__.py
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
class EmbeddedResource(WireModel):
    """
    The contents of a resource, embedded into a prompt or tool call result.

    It is up to the client how best to render embedded resources for the benefit
    of the LLM and/or the user.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    annotations: Annotations | None = None
    """
    Optional annotations for the client.
    """
    resource: TextResourceContents | BlobResourceContents
    type: Literal["resource"]

annotations class-attribute instance-attribute

annotations: Annotations | None = None

Optional annotations for the client.

EmptyResult

Bases: RootModel[Result]

Source code in src/mcp/types/v2026_07_28/__init__.py
1491
1492
1493
1494
1495
class EmptyResult(RootModel[Result]):
    root: Result
    """
    Common result fields.
    """

root instance-attribute

root: Result

Common result fields.

HeaderMismatchError

Bases: WireModel

Returned when a server rejects a request because the values in the HTTP headers do not match the corresponding values in the request body, or because required headers are missing or malformed. For HTTP, the response status code MUST be 400 Bad Request.

Source code in src/mcp/types/v2026_07_28/__init__.py
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
class HeaderMismatchError(WireModel):
    """
    Returned when a server rejects a request because the values in the HTTP
    headers do not match the corresponding values in the request body, or
    because required headers are missing or malformed. For HTTP, the response
    status code MUST be `400 Bad Request`.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    error: Error1
    id: RequestId | None = None
    jsonrpc: Literal["2.0"]

ImageContent

Bases: WireModel

An image provided to or from an LLM.

Source code in src/mcp/types/v2026_07_28/__init__.py
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
class ImageContent(WireModel):
    """
    An image provided to or from an LLM.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    annotations: Annotations | None = None
    """
    Optional annotations for the client.
    """
    data: str
    """
    The base64-encoded image data.
    """
    mime_type: Annotated[str, Field(alias="mimeType")]
    """
    The MIME type of the image. Different providers may support different image types.
    """
    type: Literal["image"]

annotations class-attribute instance-attribute

annotations: Annotations | None = None

Optional annotations for the client.

data instance-attribute

data: str

The base64-encoded image data.

mime_type instance-attribute

mime_type: Annotated[str, Field(alias='mimeType')]

The MIME type of the image. Different providers may support different image types.

JSONRPCErrorResponse

Bases: WireModel

A response to a request that indicates an error occurred.

Source code in src/mcp/types/v2026_07_28/__init__.py
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
class JSONRPCErrorResponse(WireModel):
    """
    A response to a request that indicates an error occurred.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    error: Error
    id: RequestId | None = None
    jsonrpc: Literal["2.0"]

JSONRPCRequest

Bases: WireModel

A request that expects a response.

Source code in src/mcp/types/v2026_07_28/__init__.py
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
class JSONRPCRequest(WireModel):
    """
    A request that expects a response.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: str
    params: dict[str, Any] | None = None

JSONRPCResultResponse

Bases: WireModel

A successful (non-error) response to a request.

Source code in src/mcp/types/v2026_07_28/__init__.py
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
class JSONRPCResultResponse(WireModel):
    """
    A successful (non-error) response to a request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: Result

ListRootsRequest

Bases: WireModel

Sent from the server to request a list of root URIs from the client. Roots allow servers to ask for specific directories or files to operate on. A common example for roots is providing a set of repositories or directories a server should operate on.

This request is typically used when the server needs to understand the file system structure or access specific locations that the client has permission to read from.

Source code in src/mcp/types/v2026_07_28/__init__.py
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
class ListRootsRequest(WireModel):
    """
    Sent from the server to request a list of root URIs from the client. Roots allow
    servers to ask for specific directories or files to operate on. A common example
    for roots is providing a set of repositories or directories a server should operate
    on.

    This request is typically used when the server needs to understand the file system
    structure or access specific locations that the client has permission to read from.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    method: Literal["roots/list"]
    params: Params | None = None

ListRootsResult

Bases: WireModel

The result returned by the client for a {@link ListRootsRequestroots/list} request. This result contains an array of {@link Root} objects, each representing a root directory or file that the server can operate on.

Source code in src/mcp/types/v2026_07_28/__init__.py
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
class ListRootsResult(WireModel):
    """
    The result returned by the client for a {@link ListRootsRequestroots/list} request.
    This result contains an array of {@link Root} objects, each representing a root directory
    or file that the server can operate on.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    roots: list[Root]

NotificationMetaObject

Bases: WireModel

Extends {@link MetaObject} with additional notification-specific fields. All key naming rules from MetaObject apply.

Source code in src/mcp/types/v2026_07_28/__init__.py
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
class NotificationMetaObject(WireModel):
    """
    Extends {@link MetaObject} with additional notification-specific fields. All key naming rules from `MetaObject` apply.
    """

    model_config = ConfigDict(
        extra="allow",
    )
    io_modelcontextprotocol_subscription_id: Annotated[
        RequestId | None, Field(alias="io.modelcontextprotocol/subscriptionId")
    ] = None
    """
    Identifies the subscription stream a notification was delivered on. The
    server MUST include this key on every notification delivered via a
    {@link SubscriptionsListenRequestsubscriptions/listen} stream, so the
    client can correlate the notification with the originating subscription.
    The key is absent on notifications not delivered via a subscription
    stream (e.g. progress notifications for an in-flight request), which is
    why it is optional here.

    The value is the JSON-RPC ID of the `subscriptions/listen` request that
    opened the stream.
    """

io_modelcontextprotocol_subscription_id class-attribute instance-attribute

io_modelcontextprotocol_subscription_id: Annotated[
    RequestId | None,
    Field(alias="io.modelcontextprotocol/subscriptionId"),
] = None

Identifies the subscription stream a notification was delivered on. The server MUST include this key on every notification delivered via a {@link SubscriptionsListenRequestsubscriptions/listen} stream, so the client can correlate the notification with the originating subscription. The key is absent on notifications not delivered via a subscription stream (e.g. progress notifications for an in-flight request), which is why it is optional here.

The value is the JSON-RPC ID of the subscriptions/listen request that opened the stream.

NotificationParams

Bases: WireModel

Common params for any notification.

Source code in src/mcp/types/v2026_07_28/__init__.py
1663
1664
1665
1666
1667
1668
1669
1670
1671
class NotificationParams(WireModel):
    """
    Common params for any notification.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[NotificationMetaObject | None, Field(alias="_meta")] = None

PrimitiveSchemaDefinition

Bases: RootModel[StringSchema | NumberSchema | BooleanSchema | UntitledSingleSelectEnumSchema | TitledSingleSelectEnumSchema | UntitledMultiSelectEnumSchema | TitledMultiSelectEnumSchema | LegacyTitledEnumSchema]

Source code in src/mcp/types/v2026_07_28/__init__.py
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
class PrimitiveSchemaDefinition(
    RootModel[
        StringSchema
        | NumberSchema
        | BooleanSchema
        | UntitledSingleSelectEnumSchema
        | TitledSingleSelectEnumSchema
        | UntitledMultiSelectEnumSchema
        | TitledMultiSelectEnumSchema
        | LegacyTitledEnumSchema
    ]
):
    root: (
        StringSchema
        | NumberSchema
        | BooleanSchema
        | UntitledSingleSelectEnumSchema
        | TitledSingleSelectEnumSchema
        | UntitledMultiSelectEnumSchema
        | TitledMultiSelectEnumSchema
        | LegacyTitledEnumSchema
    )
    """
    Restricted schema definitions that only allow primitive types
    without nested objects or arrays.
    """

root instance-attribute

Restricted schema definitions that only allow primitive types without nested objects or arrays.

ProgressNotificationParams

Bases: WireModel

Parameters for a {@link ProgressNotificationnotifications/progress} notification.

Source code in src/mcp/types/v2026_07_28/__init__.py
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
class ProgressNotificationParams(WireModel):
    """
    Parameters for a {@link ProgressNotificationnotifications/progress} notification.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[NotificationMetaObject | None, Field(alias="_meta")] = None
    message: str | None = None
    """
    An optional message describing the current progress.
    """
    progress: float
    """
    The progress thus far. This should increase every time progress is made, even if the total is unknown.
    """
    progress_token: Annotated[ProgressToken, Field(alias="progressToken")]
    """
    The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
    """
    total: float | None = None
    """
    Total number of items to process (or total progress required), if known.
    """

message class-attribute instance-attribute

message: str | None = None

An optional message describing the current progress.

progress instance-attribute

progress: float

The progress thus far. This should increase every time progress is made, even if the total is unknown.

progress_token instance-attribute

progress_token: Annotated[
    ProgressToken, Field(alias="progressToken")
]

The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.

total class-attribute instance-attribute

total: float | None = None

Total number of items to process (or total progress required), if known.

Prompt

Bases: WireModel

A prompt or prompt template that the server offers.

Source code in src/mcp/types/v2026_07_28/__init__.py
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
class Prompt(WireModel):
    """
    A prompt or prompt template that the server offers.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    arguments: list[PromptArgument] | None = None
    """
    A list of arguments to use for templating the prompt.
    """
    description: str | None = None
    """
    An optional description of what this prompt provides
    """
    icons: list[Icon] | None = None
    """
    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` (and `image/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)
    """
    name: str
    """
    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
    """
    title: str | None = None
    """
    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 {@link Tool},
    where `annotations.title` should be given precedence over using `name`,
    if present).
    """

arguments class-attribute instance-attribute

arguments: list[PromptArgument] | None = None

A list of arguments to use for templating the prompt.

description class-attribute instance-attribute

description: str | None = None

An optional description of what this prompt provides

icons class-attribute instance-attribute

icons: list[Icon] | None = None

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 (and image/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)

name instance-attribute

name: str

Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

title class-attribute instance-attribute

title: str | None = None

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 {@link Tool}, where annotations.title should be given precedence over using name, if present).

PromptListChangedNotification

Bases: WireModel

An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This is only delivered on a {@link SubscriptionsListenRequestsubscriptions/listen} stream when the client requested it via the promptsListChanged filter field.

Source code in src/mcp/types/v2026_07_28/__init__.py
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
class PromptListChangedNotification(WireModel):
    """
    An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This is only delivered on a {@link SubscriptionsListenRequestsubscriptions/listen} stream when the client requested it via the `promptsListChanged` filter field.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: Literal["notifications/prompts/list_changed"]
    params: NotificationParams | None = None

ReadResourceResult

Bases: WireModel

The result returned by the server for a {@link ReadResourceRequestresources/read} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
class ReadResourceResult(WireModel):
    """
    The result returned by the server for a {@link ReadResourceRequestresources/read} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    cache_scope: Annotated[Literal["private", "public"], Field(alias="cacheScope")]
    """
    Indicates the intended scope of the cached response, analogous to HTTP
    `Cache-Control: public` vs `Cache-Control: private`.

    - `"public"`: The response does not contain user-specific data. Any
      client or intermediary (e.g., shared gateway, caching proxy) MAY cache
      the response and serve it across authorization contexts.
    - `"private"`: The response MAY be cached and reused only within the
      same authorization context. Caches MUST NOT be shared across
      authorization contexts (e.g., a different access token requires a
      different cache).
    """
    contents: list[TextResourceContents | BlobResourceContents]
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """
    ttl_ms: Annotated[int, Field(alias="ttlMs", ge=0)]
    """
    A hint from the server indicating how long (in milliseconds) the
    client MAY cache this response before re-fetching. Semantics are
    analogous to HTTP Cache-Control max-age.

    - If 0, The response SHOULD be considered immediately stale,
      The client MAY re-fetch every time the result is needed.
    - If positive, the client SHOULD consider the result fresh for this many
      milliseconds after receiving the response.
    """

cache_scope instance-attribute

cache_scope: Annotated[
    Literal["private", "public"], Field(alias="cacheScope")
]

Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.

  • "public": The response does not contain user-specific data. Any client or intermediary (e.g., shared gateway, caching proxy) MAY cache the response and serve it across authorization contexts.
  • "private": The response MAY be cached and reused only within the same authorization context. Caches MUST NOT be shared across authorization contexts (e.g., a different access token requires a different cache).

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

ttl_ms instance-attribute

ttl_ms: Annotated[int, Field(alias='ttlMs', ge=0)]

A hint from the server indicating how long (in milliseconds) the client MAY cache this response before re-fetching. Semantics are analogous to HTTP Cache-Control max-age.

  • If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
  • If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.

Resource

Bases: WireModel

A known resource that the server is capable of reading.

Source code in src/mcp/types/v2026_07_28/__init__.py
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
class Resource(WireModel):
    """
    A known resource that the server is capable of reading.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    annotations: Annotations | None = None
    """
    Optional annotations for the client.
    """
    description: str | None = None
    """
    A description of what this resource represents.

    This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
    """
    icons: list[Icon] | None = None
    """
    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` (and `image/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)
    """
    mime_type: Annotated[str | None, Field(alias="mimeType")] = None
    """
    The MIME type of this resource, if known.
    """
    name: str
    """
    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
    """
    size: int | None = None
    """
    The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.

    This can be used by Hosts to display file sizes and estimate context window usage.
    """
    title: str | None = None
    """
    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 {@link Tool},
    where `annotations.title` should be given precedence over using `name`,
    if present).
    """
    uri: str
    """
    The URI of this resource.
    """

annotations class-attribute instance-attribute

annotations: Annotations | None = None

Optional annotations for the client.

description class-attribute instance-attribute

description: str | None = None

A description of what this resource represents.

This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.

icons class-attribute instance-attribute

icons: list[Icon] | None = None

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 (and image/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)

mime_type class-attribute instance-attribute

mime_type: Annotated[
    str | None, Field(alias="mimeType")
] = None

The MIME type of this resource, if known.

name instance-attribute

name: str

Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

size class-attribute instance-attribute

size: int | None = None

The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.

This can be used by Hosts to display file sizes and estimate context window usage.

title class-attribute instance-attribute

title: str | None = None

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 {@link Tool}, where annotations.title should be given precedence over using name, if present).

uri instance-attribute

uri: str

The URI of this resource.

Bases: WireModel

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 {@link ListResourcesRequestresources/list} requests.

Source code in src/mcp/types/v2026_07_28/__init__.py
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
class ResourceLink(WireModel):
    """
    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 {@link ListResourcesRequestresources/list} requests.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    annotations: Annotations | None = None
    """
    Optional annotations for the client.
    """
    description: str | None = None
    """
    A description of what this resource represents.

    This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
    """
    icons: list[Icon] | None = None
    """
    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` (and `image/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)
    """
    mime_type: Annotated[str | None, Field(alias="mimeType")] = None
    """
    The MIME type of this resource, if known.
    """
    name: str
    """
    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
    """
    size: int | None = None
    """
    The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.

    This can be used by Hosts to display file sizes and estimate context window usage.
    """
    title: str | None = None
    """
    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 {@link Tool},
    where `annotations.title` should be given precedence over using `name`,
    if present).
    """
    type: Literal["resource_link"]
    uri: str
    """
    The URI of this resource.
    """

annotations class-attribute instance-attribute

annotations: Annotations | None = None

Optional annotations for the client.

description class-attribute instance-attribute

description: str | None = None

A description of what this resource represents.

This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.

icons class-attribute instance-attribute

icons: list[Icon] | None = None

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 (and image/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)

mime_type class-attribute instance-attribute

mime_type: Annotated[
    str | None, Field(alias="mimeType")
] = None

The MIME type of this resource, if known.

name instance-attribute

name: str

Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

size class-attribute instance-attribute

size: int | None = None

The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.

This can be used by Hosts to display file sizes and estimate context window usage.

title class-attribute instance-attribute

title: str | None = None

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 {@link Tool}, where annotations.title should be given precedence over using name, if present).

uri instance-attribute

uri: str

The URI of this resource.

ResourceListChangedNotification

Bases: WireModel

An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This is only delivered on a {@link SubscriptionsListenRequestsubscriptions/listen} stream when the client requested it via the resourcesListChanged filter field.

Source code in src/mcp/types/v2026_07_28/__init__.py
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
class ResourceListChangedNotification(WireModel):
    """
    An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This is only delivered on a {@link SubscriptionsListenRequestsubscriptions/listen} stream when the client requested it via the `resourcesListChanged` filter field.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: Literal["notifications/resources/list_changed"]
    params: NotificationParams | None = None

ResourceTemplate

Bases: WireModel

A template description for resources available on the server.

Source code in src/mcp/types/v2026_07_28/__init__.py
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
class ResourceTemplate(WireModel):
    """
    A template description for resources available on the server.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    annotations: Annotations | None = None
    """
    Optional annotations for the client.
    """
    description: str | None = None
    """
    A description of what this template is for.

    This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
    """
    icons: list[Icon] | None = None
    """
    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` (and `image/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)
    """
    mime_type: Annotated[str | None, Field(alias="mimeType")] = None
    """
    The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
    """
    name: str
    """
    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
    """
    title: str | None = None
    """
    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 {@link Tool},
    where `annotations.title` should be given precedence over using `name`,
    if present).
    """
    uri_template: Annotated[str, Field(alias="uriTemplate")]
    """
    A URI template (according to RFC 6570) that can be used to construct resource URIs.
    """

annotations class-attribute instance-attribute

annotations: Annotations | None = None

Optional annotations for the client.

description class-attribute instance-attribute

description: str | None = None

A description of what this template is for.

This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.

icons class-attribute instance-attribute

icons: list[Icon] | None = None

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 (and image/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)

mime_type class-attribute instance-attribute

mime_type: Annotated[
    str | None, Field(alias="mimeType")
] = None

The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.

name instance-attribute

name: str

Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

title class-attribute instance-attribute

title: str | None = None

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 {@link Tool}, where annotations.title should be given precedence over using name, if present).

uri_template instance-attribute

uri_template: Annotated[str, Field(alias='uriTemplate')]

A URI template (according to RFC 6570) that can be used to construct resource URIs.

ResourceUpdatedNotificationParams

Bases: WireModel

Parameters for a notifications/resources/updated notification.

Source code in src/mcp/types/v2026_07_28/__init__.py
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
class ResourceUpdatedNotificationParams(WireModel):
    """
    Parameters for a `notifications/resources/updated` notification.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[NotificationMetaObject | None, Field(alias="_meta")] = None
    uri: str
    """
    The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
    """

uri instance-attribute

uri: str

The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.

SubscriptionsAcknowledgedNotificationParams

Bases: WireModel

Parameters for a {@link SubscriptionsAcknowledgedNotificationnotifications/subscriptions/acknowledged} notification.

Source code in src/mcp/types/v2026_07_28/__init__.py
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
class SubscriptionsAcknowledgedNotificationParams(WireModel):
    """
    Parameters for a {@link SubscriptionsAcknowledgedNotificationnotifications/subscriptions/acknowledged} notification.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[NotificationMetaObject | None, Field(alias="_meta")] = None
    notifications: SubscriptionFilter
    """
    The subset of requested notification types the server agreed to honor.
    Only includes notification types the server actually supports; if the
    client requested an unsupported type (e.g., `promptsListChanged` when
    the server has no prompts), it is omitted from this set.
    """

notifications instance-attribute

notifications: SubscriptionFilter

The subset of requested notification types the server agreed to honor. Only includes notification types the server actually supports; if the client requested an unsupported type (e.g., promptsListChanged when the server has no prompts), it is omitted from this set.

TextContent

Bases: WireModel

Text provided to or from an LLM.

Source code in src/mcp/types/v2026_07_28/__init__.py
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
class TextContent(WireModel):
    """
    Text provided to or from an LLM.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    annotations: Annotations | None = None
    """
    Optional annotations for the client.
    """
    text: str
    """
    The text content of the message.
    """
    type: Literal["text"]

annotations class-attribute instance-attribute

annotations: Annotations | None = None

Optional annotations for the client.

text instance-attribute

text: str

The text content of the message.

Tool

Bases: WireModel

Definition for a tool the client can call.

Source code in src/mcp/types/v2026_07_28/__init__.py
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
class Tool(WireModel):
    """
    Definition for a tool the client can call.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    annotations: ToolAnnotations | None = None
    """
    Optional additional tool information.

    Display name precedence order is: `title`, `annotations.title`, then `name`.
    """
    description: str | None = None
    """
    A human-readable description of the tool.

    This can be used by clients to improve the LLM's understanding of available tools. It can be thought of like a "hint" to the model.
    """
    icons: list[Icon] | None = None
    """
    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` (and `image/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)
    """
    input_schema: Annotated[InputSchema, Field(alias="inputSchema")]
    """
    A JSON Schema object defining the expected parameters for the tool.

    Tool arguments are always JSON objects, so `type: "object"` is required at the root.
    Beyond that, any JSON Schema 2020-12 keyword may appear alongside `type` — including
    composition keywords (`oneOf`, `anyOf`, `allOf`, `not`), conditional keywords
    (`if`/`then`/`else`), reference keywords (`$ref`, `$defs`, `$anchor`), and any other
    standard validation or annotation keywords.

    Property schemas may carry an `x-mcp-header` annotation to mirror the
    argument value into an HTTP header on the Streamable HTTP transport. See
    the Streamable HTTP transport specification for the validity and
    extraction rules.

    Defaults to JSON Schema 2020-12 when no explicit `$schema` is provided.
    """
    name: str
    """
    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).
    """
    output_schema: Annotated[OutputSchema | None, Field(alias="outputSchema")] = None
    """
    An optional JSON Schema object defining the structure of the tool's output returned in
    the structuredContent field of a {@link CallToolResult}. This can be any valid JSON Schema 2020-12.

    Defaults to JSON Schema 2020-12 when no explicit `$schema` is provided.
    """
    title: str | None = None
    """
    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 {@link Tool},
    where `annotations.title` should be given precedence over using `name`,
    if present).
    """

annotations class-attribute instance-attribute

annotations: ToolAnnotations | None = None

Optional additional tool information.

Display name precedence order is: title, annotations.title, then name.

description class-attribute instance-attribute

description: str | None = None

A human-readable description of the tool.

This can be used by clients to improve the LLM's understanding of available tools. It can be thought of like a "hint" to the model.

icons class-attribute instance-attribute

icons: list[Icon] | None = None

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 (and image/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)

input_schema instance-attribute

input_schema: Annotated[
    InputSchema, Field(alias="inputSchema")
]

A JSON Schema object defining the expected parameters for the tool.

Tool arguments are always JSON objects, so type: "object" is required at the root. Beyond that, any JSON Schema 2020-12 keyword may appear alongside type — including composition keywords (oneOf, anyOf, allOf, not), conditional keywords (if/then/else), reference keywords ($ref, $defs, $anchor), and any other standard validation or annotation keywords.

Property schemas may carry an x-mcp-header annotation to mirror the argument value into an HTTP header on the Streamable HTTP transport. See the Streamable HTTP transport specification for the validity and extraction rules.

Defaults to JSON Schema 2020-12 when no explicit $schema is provided.

name instance-attribute

name: str

Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

output_schema class-attribute instance-attribute

output_schema: Annotated[
    OutputSchema | None, Field(alias="outputSchema")
] = None

An optional JSON Schema object defining the structure of the tool's output returned in the structuredContent field of a {@link CallToolResult}. This can be any valid JSON Schema 2020-12.

Defaults to JSON Schema 2020-12 when no explicit $schema is provided.

title class-attribute instance-attribute

title: str | None = None

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 {@link Tool}, where annotations.title should be given precedence over using name, if present).

ToolListChangedNotification

Bases: WireModel

An optional notification from the server to the client, informing it that the list of tools it offers has changed. This is only delivered on a {@link SubscriptionsListenRequestsubscriptions/listen} stream when the client requested it via the toolsListChanged filter field.

Source code in src/mcp/types/v2026_07_28/__init__.py
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
class ToolListChangedNotification(WireModel):
    """
    An optional notification from the server to the client, informing it that the list of tools it offers has changed. This is only delivered on a {@link SubscriptionsListenRequestsubscriptions/listen} stream when the client requested it via the `toolsListChanged` filter field.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: Literal["notifications/tools/list_changed"]
    params: NotificationParams | None = None

CancelledNotificationParams

Bases: WireModel

Parameters for a notifications/cancelled notification.

Source code in src/mcp/types/v2026_07_28/__init__.py
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
class CancelledNotificationParams(WireModel):
    """
    Parameters for a `notifications/cancelled` notification.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[NotificationMetaObject | None, Field(alias="_meta")] = None
    reason: str | None = None
    """
    An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
    """
    request_id: Annotated[RequestId, Field(alias="requestId")]
    """
    The ID of the request to cancel.

    This MUST correspond to the ID of a request the client previously issued.
    """

reason class-attribute instance-attribute

reason: str | None = None

An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.

request_id instance-attribute

request_id: Annotated[RequestId, Field(alias='requestId')]

The ID of the request to cancel.

This MUST correspond to the ID of a request the client previously issued.

ClientNotification

Bases: WireModel

This notification is sent by the client to indicate that it is cancelling a request it previously issued.

On stdio, the server also sends this notification, solely to terminate a {@link SubscriptionsListenRequestsubscriptions/listen} stream: it references the ID of the subscriptions/listen request that opened the stream. Servers MUST NOT use this notification to cancel any other request.

The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.

This notification indicates that the result will be unused, so any associated processing SHOULD cease.

Source code in src/mcp/types/v2026_07_28/__init__.py
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
class ClientNotification(WireModel):
    """
    This notification is sent by the client to indicate that it is cancelling a request it previously issued.

    On stdio, the server also sends this notification, solely to terminate a {@link SubscriptionsListenRequestsubscriptions/listen} stream: it references the ID of the `subscriptions/listen` request that opened the stream. Servers MUST NOT use this notification to cancel any other request.

    The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.

    This notification indicates that the result will be unused, so any associated processing SHOULD cease.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: Literal["notifications/cancelled"]
    params: CancelledNotificationParams

ElicitRequest

Bases: WireModel

A request from the server to elicit additional information from the user via the client.

Source code in src/mcp/types/v2026_07_28/__init__.py
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
class ElicitRequest(WireModel):
    """
    A request from the server to elicit additional information from the user via the client.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    method: Literal["elicitation/create"]
    params: ElicitRequestParams

JSONRPCMessage

Bases: RootModel[JSONRPCRequest | JSONRPCNotification | JSONRPCResultResponse | JSONRPCErrorResponse]

Source code in src/mcp/types/v2026_07_28/__init__.py
2220
2221
2222
2223
2224
class JSONRPCMessage(RootModel[JSONRPCRequest | JSONRPCNotification | JSONRPCResultResponse | JSONRPCErrorResponse]):
    root: JSONRPCRequest | JSONRPCNotification | JSONRPCResultResponse | JSONRPCErrorResponse
    """
    Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
    """

root instance-attribute

Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.

JSONRPCResponse

Bases: RootModel[JSONRPCResultResponse | JSONRPCErrorResponse]

Source code in src/mcp/types/v2026_07_28/__init__.py
2227
2228
2229
2230
2231
class JSONRPCResponse(RootModel[JSONRPCResultResponse | JSONRPCErrorResponse]):
    root: JSONRPCResultResponse | JSONRPCErrorResponse
    """
    A response to a request, containing either the result or error.
    """

root instance-attribute

A response to a request, containing either the result or error.

ListPromptsResult

Bases: WireModel

The result returned by the server for a {@link ListPromptsRequestprompts/list} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
class ListPromptsResult(WireModel):
    """
    The result returned by the server for a {@link ListPromptsRequestprompts/list} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    cache_scope: Annotated[Literal["private", "public"], Field(alias="cacheScope")]
    """
    Indicates the intended scope of the cached response, analogous to HTTP
    `Cache-Control: public` vs `Cache-Control: private`.

    - `"public"`: The response does not contain user-specific data. Any
      client or intermediary (e.g., shared gateway, caching proxy) MAY cache
      the response and serve it across authorization contexts.
    - `"private"`: The response MAY be cached and reused only within the
      same authorization context. Caches MUST NOT be shared across
      authorization contexts (e.g., a different access token requires a
      different cache).
    """
    next_cursor: Annotated[str | None, Field(alias="nextCursor")] = None
    """
    An opaque token representing the pagination position after the last returned result.
    If present, there may be more results available.
    """
    prompts: list[Prompt]
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """
    ttl_ms: Annotated[int, Field(alias="ttlMs", ge=0)]
    """
    A hint from the server indicating how long (in milliseconds) the
    client MAY cache this response before re-fetching. Semantics are
    analogous to HTTP Cache-Control max-age.

    - If 0, The response SHOULD be considered immediately stale,
      The client MAY re-fetch every time the result is needed.
    - If positive, the client SHOULD consider the result fresh for this many
      milliseconds after receiving the response.
    """

cache_scope instance-attribute

cache_scope: Annotated[
    Literal["private", "public"], Field(alias="cacheScope")
]

Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.

  • "public": The response does not contain user-specific data. Any client or intermediary (e.g., shared gateway, caching proxy) MAY cache the response and serve it across authorization contexts.
  • "private": The response MAY be cached and reused only within the same authorization context. Caches MUST NOT be shared across authorization contexts (e.g., a different access token requires a different cache).

next_cursor class-attribute instance-attribute

next_cursor: Annotated[
    str | None, Field(alias="nextCursor")
] = None

An opaque token representing the pagination position after the last returned result. If present, there may be more results available.

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

ttl_ms instance-attribute

ttl_ms: Annotated[int, Field(alias='ttlMs', ge=0)]

A hint from the server indicating how long (in milliseconds) the client MAY cache this response before re-fetching. Semantics are analogous to HTTP Cache-Control max-age.

  • If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
  • If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.

ListPromptsResultResponse

Bases: WireModel

A successful response from the server for a {@link ListPromptsRequestprompts/list} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
class ListPromptsResultResponse(WireModel):
    """
    A successful response from the server for a {@link ListPromptsRequestprompts/list} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: ListPromptsResult

ListResourceTemplatesResult

Bases: WireModel

The result returned by the server for a {@link ListResourceTemplatesRequestresources/templates/list} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
class ListResourceTemplatesResult(WireModel):
    """
    The result returned by the server for a {@link ListResourceTemplatesRequestresources/templates/list} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    cache_scope: Annotated[Literal["private", "public"], Field(alias="cacheScope")]
    """
    Indicates the intended scope of the cached response, analogous to HTTP
    `Cache-Control: public` vs `Cache-Control: private`.

    - `"public"`: The response does not contain user-specific data. Any
      client or intermediary (e.g., shared gateway, caching proxy) MAY cache
      the response and serve it across authorization contexts.
    - `"private"`: The response MAY be cached and reused only within the
      same authorization context. Caches MUST NOT be shared across
      authorization contexts (e.g., a different access token requires a
      different cache).
    """
    next_cursor: Annotated[str | None, Field(alias="nextCursor")] = None
    """
    An opaque token representing the pagination position after the last returned result.
    If present, there may be more results available.
    """
    resource_templates: Annotated[list[ResourceTemplate], Field(alias="resourceTemplates")]
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """
    ttl_ms: Annotated[int, Field(alias="ttlMs", ge=0)]
    """
    A hint from the server indicating how long (in milliseconds) the
    client MAY cache this response before re-fetching. Semantics are
    analogous to HTTP Cache-Control max-age.

    - If 0, The response SHOULD be considered immediately stale,
      The client MAY re-fetch every time the result is needed.
    - If positive, the client SHOULD consider the result fresh for this many
      milliseconds after receiving the response.
    """

cache_scope instance-attribute

cache_scope: Annotated[
    Literal["private", "public"], Field(alias="cacheScope")
]

Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.

  • "public": The response does not contain user-specific data. Any client or intermediary (e.g., shared gateway, caching proxy) MAY cache the response and serve it across authorization contexts.
  • "private": The response MAY be cached and reused only within the same authorization context. Caches MUST NOT be shared across authorization contexts (e.g., a different access token requires a different cache).

next_cursor class-attribute instance-attribute

next_cursor: Annotated[
    str | None, Field(alias="nextCursor")
] = None

An opaque token representing the pagination position after the last returned result. If present, there may be more results available.

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

ttl_ms instance-attribute

ttl_ms: Annotated[int, Field(alias='ttlMs', ge=0)]

A hint from the server indicating how long (in milliseconds) the client MAY cache this response before re-fetching. Semantics are analogous to HTTP Cache-Control max-age.

  • If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
  • If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.

ListResourceTemplatesResultResponse

Bases: WireModel

A successful response from the server for a {@link ListResourceTemplatesRequestresources/templates/list} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
class ListResourceTemplatesResultResponse(WireModel):
    """
    A successful response from the server for a {@link ListResourceTemplatesRequestresources/templates/list} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: ListResourceTemplatesResult

ListResourcesResult

Bases: WireModel

The result returned by the server for a {@link ListResourcesRequestresources/list} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
class ListResourcesResult(WireModel):
    """
    The result returned by the server for a {@link ListResourcesRequestresources/list} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    cache_scope: Annotated[Literal["private", "public"], Field(alias="cacheScope")]
    """
    Indicates the intended scope of the cached response, analogous to HTTP
    `Cache-Control: public` vs `Cache-Control: private`.

    - `"public"`: The response does not contain user-specific data. Any
      client or intermediary (e.g., shared gateway, caching proxy) MAY cache
      the response and serve it across authorization contexts.
    - `"private"`: The response MAY be cached and reused only within the
      same authorization context. Caches MUST NOT be shared across
      authorization contexts (e.g., a different access token requires a
      different cache).
    """
    next_cursor: Annotated[str | None, Field(alias="nextCursor")] = None
    """
    An opaque token representing the pagination position after the last returned result.
    If present, there may be more results available.
    """
    resources: list[Resource]
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """
    ttl_ms: Annotated[int, Field(alias="ttlMs", ge=0)]
    """
    A hint from the server indicating how long (in milliseconds) the
    client MAY cache this response before re-fetching. Semantics are
    analogous to HTTP Cache-Control max-age.

    - If 0, The response SHOULD be considered immediately stale,
      The client MAY re-fetch every time the result is needed.
    - If positive, the client SHOULD consider the result fresh for this many
      milliseconds after receiving the response.
    """

cache_scope instance-attribute

cache_scope: Annotated[
    Literal["private", "public"], Field(alias="cacheScope")
]

Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.

  • "public": The response does not contain user-specific data. Any client or intermediary (e.g., shared gateway, caching proxy) MAY cache the response and serve it across authorization contexts.
  • "private": The response MAY be cached and reused only within the same authorization context. Caches MUST NOT be shared across authorization contexts (e.g., a different access token requires a different cache).

next_cursor class-attribute instance-attribute

next_cursor: Annotated[
    str | None, Field(alias="nextCursor")
] = None

An opaque token representing the pagination position after the last returned result. If present, there may be more results available.

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

ttl_ms instance-attribute

ttl_ms: Annotated[int, Field(alias='ttlMs', ge=0)]

A hint from the server indicating how long (in milliseconds) the client MAY cache this response before re-fetching. Semantics are analogous to HTTP Cache-Control max-age.

  • If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
  • If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.

ListResourcesResultResponse

Bases: WireModel

A successful response from the server for a {@link ListResourcesRequestresources/list} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
class ListResourcesResultResponse(WireModel):
    """
    A successful response from the server for a {@link ListResourcesRequestresources/list} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: ListResourcesResult

ListToolsResult

Bases: WireModel

The result returned by the server for a {@link ListToolsRequesttools/list} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
class ListToolsResult(WireModel):
    """
    The result returned by the server for a {@link ListToolsRequesttools/list} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    cache_scope: Annotated[Literal["private", "public"], Field(alias="cacheScope")]
    """
    Indicates the intended scope of the cached response, analogous to HTTP
    `Cache-Control: public` vs `Cache-Control: private`.

    - `"public"`: The response does not contain user-specific data. Any
      client or intermediary (e.g., shared gateway, caching proxy) MAY cache
      the response and serve it across authorization contexts.
    - `"private"`: The response MAY be cached and reused only within the
      same authorization context. Caches MUST NOT be shared across
      authorization contexts (e.g., a different access token requires a
      different cache).
    """
    next_cursor: Annotated[str | None, Field(alias="nextCursor")] = None
    """
    An opaque token representing the pagination position after the last returned result.
    If present, there may be more results available.
    """
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """
    tools: list[Tool]
    ttl_ms: Annotated[int, Field(alias="ttlMs", ge=0)]
    """
    A hint from the server indicating how long (in milliseconds) the
    client MAY cache this response before re-fetching. Semantics are
    analogous to HTTP Cache-Control max-age.

    - If 0, The response SHOULD be considered immediately stale,
      The client MAY re-fetch every time the result is needed.
    - If positive, the client SHOULD consider the result fresh for this many
      milliseconds after receiving the response.
    """

cache_scope instance-attribute

cache_scope: Annotated[
    Literal["private", "public"], Field(alias="cacheScope")
]

Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.

  • "public": The response does not contain user-specific data. Any client or intermediary (e.g., shared gateway, caching proxy) MAY cache the response and serve it across authorization contexts.
  • "private": The response MAY be cached and reused only within the same authorization context. Caches MUST NOT be shared across authorization contexts (e.g., a different access token requires a different cache).

next_cursor class-attribute instance-attribute

next_cursor: Annotated[
    str | None, Field(alias="nextCursor")
] = None

An opaque token representing the pagination position after the last returned result. If present, there may be more results available.

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

ttl_ms instance-attribute

ttl_ms: Annotated[int, Field(alias='ttlMs', ge=0)]

A hint from the server indicating how long (in milliseconds) the client MAY cache this response before re-fetching. Semantics are analogous to HTTP Cache-Control max-age.

  • If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
  • If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.

ListToolsResultResponse

Bases: WireModel

A successful response from the server for a {@link ListToolsRequesttools/list} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
class ListToolsResultResponse(WireModel):
    """
    A successful response from the server for a {@link ListToolsRequesttools/list} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: ListToolsResult

LoggingMessageNotificationParams

Bases: WireModel

Parameters for a notifications/message notification.

Source code in src/mcp/types/v2026_07_28/__init__.py
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
class LoggingMessageNotificationParams(WireModel):
    """
    Parameters for a `notifications/message` notification.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[NotificationMetaObject | None, Field(alias="_meta")] = None
    data: Any
    """
    The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
    """
    level: LoggingLevel
    """
    The severity of this log message.
    """
    logger: str | None = None
    """
    An optional name of the logger issuing this message.
    """

data instance-attribute

data: Any

The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.

level instance-attribute

level: LoggingLevel

The severity of this log message.

logger class-attribute instance-attribute

logger: str | None = None

An optional name of the logger issuing this message.

ProgressNotification

Bases: WireModel

An out-of-band notification used to inform the receiver of a progress update for a long-running request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
class ProgressNotification(WireModel):
    """
    An out-of-band notification used to inform the receiver of a progress update for a long-running request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: Literal["notifications/progress"]
    params: ProgressNotificationParams

PromptMessage

Bases: WireModel

Describes a message returned as part of a prompt.

This is similar to {@link SamplingMessage}, but also supports the embedding of resources from the MCP server.

Source code in src/mcp/types/v2026_07_28/__init__.py
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
class PromptMessage(WireModel):
    """
    Describes a message returned as part of a prompt.

    This is similar to {@link SamplingMessage}, but also supports the embedding of
    resources from the MCP server.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    content: ContentBlock
    role: Role

ResourceUpdatedNotification

Bases: WireModel

A notification from the server to the client, informing it that a resource has changed and may need to be read again. This is only sent for resources the client opted in to via the resourceSubscriptions field of a {@link SubscriptionsListenRequestsubscriptions/listen} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
class ResourceUpdatedNotification(WireModel):
    """
    A notification from the server to the client, informing it that a resource has changed and may need to be read again. This is only sent for resources the client opted in to via the `resourceSubscriptions` field of a {@link SubscriptionsListenRequestsubscriptions/listen} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: Literal["notifications/resources/updated"]
    params: ResourceUpdatedNotificationParams

SubscriptionsAcknowledgedNotification

Bases: WireModel

Sent by the server as the first message on a {@link SubscriptionsListenRequestsubscriptions/listen} stream to acknowledge that the subscription has been established and to report which notification types it agreed to honor.

Source code in src/mcp/types/v2026_07_28/__init__.py
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
class SubscriptionsAcknowledgedNotification(WireModel):
    """
    Sent by the server as the first message on a
    {@link SubscriptionsListenRequestsubscriptions/listen} stream to acknowledge
    that the subscription has been established and to report which notification
    types it agreed to honor.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: Literal["notifications/subscriptions/acknowledged"]
    params: SubscriptionsAcknowledgedNotificationParams

ToolResultContent

Bases: WireModel

The result of a tool use, provided by the user back to the assistant.

Source code in src/mcp/types/v2026_07_28/__init__.py
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
class ToolResultContent(WireModel):
    """
    The result of a tool use, provided by the user back to the assistant.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    """
    Optional metadata about the tool result. Clients SHOULD preserve this field when
    including tool results in subsequent sampling requests to enable caching optimizations.
    """
    content: list[ContentBlock]
    """
    The unstructured result content of the tool use.

    This has the same format as {@link CallToolResult.content} and can include text, images,
    audio, resource links, and embedded resources.
    """
    is_error: Annotated[bool | None, Field(alias="isError")] = None
    """
    Whether the tool use resulted in an error.

    If true, the content typically describes the error that occurred.
    Default: false
    """
    structured_content: Annotated[Any | None, Field(alias="structuredContent")] = None
    """
    An optional structured result value.

    This can be any JSON value (object, array, string, number, boolean, or null).
    If the tool defined an {@link Tool.outputSchema}, this SHOULD conform to that schema.
    """
    tool_use_id: Annotated[str, Field(alias="toolUseId")]
    """
    The ID of the tool use this result corresponds to.

    This MUST match the ID from a previous {@link ToolUseContent}.
    """
    type: Literal["tool_result"]

meta class-attribute instance-attribute

meta: Annotated[MetaObject | None, Field(alias="_meta")] = (
    None
)

Optional metadata about the tool result. Clients SHOULD preserve this field when including tool results in subsequent sampling requests to enable caching optimizations.

content instance-attribute

content: list[ContentBlock]

The unstructured result content of the tool use.

This has the same format as {@link CallToolResult.content} and can include text, images, audio, resource links, and embedded resources.

is_error class-attribute instance-attribute

is_error: Annotated[bool | None, Field(alias="isError")] = (
    None
)

Whether the tool use resulted in an error.

If true, the content typically describes the error that occurred. Default: false

structured_content class-attribute instance-attribute

structured_content: Annotated[
    Any | None, Field(alias="structuredContent")
] = None

An optional structured result value.

This can be any JSON value (object, array, string, number, boolean, or null). If the tool defined an {@link Tool.outputSchema}, this SHOULD conform to that schema.

tool_use_id instance-attribute

tool_use_id: Annotated[str, Field(alias='toolUseId')]

The ID of the tool use this result corresponds to.

This MUST match the ID from a previous {@link ToolUseContent}.

CallToolResult

Bases: WireModel

The result returned by the server for a {@link CallToolRequesttools/call} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
class CallToolResult(WireModel):
    """
    The result returned by the server for a {@link CallToolRequesttools/call} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    content: list[ContentBlock]
    """
    A list of content objects that represent the unstructured result of the tool call.
    """
    is_error: Annotated[bool | None, Field(alias="isError")] = None
    """
    Whether the tool call ended in an error.

    If not set, this is assumed to be false (the call was successful).

    Any errors that originate from the tool SHOULD be reported inside the result
    object, with `isError` set to true, _not_ as an MCP protocol-level error
    response. Otherwise, the LLM would not be able to see that an error occurred
    and self-correct.

    However, any errors in _finding_ the tool, an error indicating that the
    server does not support tool calls, or any other exceptional conditions,
    should be reported as an MCP error response.
    """
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """
    structured_content: Annotated[Any | None, Field(alias="structuredContent")] = None
    """
    An optional JSON value that represents the structured result of the tool call.

    This can be any JSON value (object, array, string, number, boolean, or null)
    that conforms to the tool's outputSchema if one is defined.
    """

content instance-attribute

content: list[ContentBlock]

A list of content objects that represent the unstructured result of the tool call.

is_error class-attribute instance-attribute

is_error: Annotated[bool | None, Field(alias="isError")] = (
    None
)

Whether the tool call ended in an error.

If not set, this is assumed to be false (the call was successful).

Any errors that originate from the tool SHOULD be reported inside the result object, with isError set to true, not as an MCP protocol-level error response. Otherwise, the LLM would not be able to see that an error occurred and self-correct.

However, any errors in finding the tool, an error indicating that the server does not support tool calls, or any other exceptional conditions, should be reported as an MCP error response.

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

structured_content class-attribute instance-attribute

structured_content: Annotated[
    Any | None, Field(alias="structuredContent")
] = None

An optional JSON value that represents the structured result of the tool call.

This can be any JSON value (object, array, string, number, boolean, or null) that conforms to the tool's outputSchema if one is defined.

CancelledNotification

Bases: WireModel

This notification is sent by the client to indicate that it is cancelling a request it previously issued.

On stdio, the server also sends this notification, solely to terminate a {@link SubscriptionsListenRequestsubscriptions/listen} stream: it references the ID of the subscriptions/listen request that opened the stream. Servers MUST NOT use this notification to cancel any other request.

The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.

This notification indicates that the result will be unused, so any associated processing SHOULD cease.

Source code in src/mcp/types/v2026_07_28/__init__.py
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
class CancelledNotification(WireModel):
    """
    This notification is sent by the client to indicate that it is cancelling a request it previously issued.

    On stdio, the server also sends this notification, solely to terminate a {@link SubscriptionsListenRequestsubscriptions/listen} stream: it references the ID of the `subscriptions/listen` request that opened the stream. Servers MUST NOT use this notification to cancel any other request.

    The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.

    This notification indicates that the result will be unused, so any associated processing SHOULD cease.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: Literal["notifications/cancelled"]
    params: CancelledNotificationParams

GetPromptResult

Bases: WireModel

The result returned by the server for a {@link GetPromptRequestprompts/get} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
class GetPromptResult(WireModel):
    """
    The result returned by the server for a {@link GetPromptRequestprompts/get} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    description: str | None = None
    """
    An optional description for the prompt.
    """
    messages: list[PromptMessage]
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """

description class-attribute instance-attribute

description: str | None = None

An optional description for the prompt.

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

LoggingMessageNotification

Bases: WireModel

JSONRPCNotification of a log message passed from server to client. The client opts in by setting "io.modelcontextprotocol/logLevel" in a request's _meta.

Source code in src/mcp/types/v2026_07_28/__init__.py
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
class LoggingMessageNotification(WireModel):
    """
    JSONRPCNotification of a log message passed from server to client. The client opts in by setting `"io.modelcontextprotocol/logLevel"` in a request's `_meta`.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    jsonrpc: Literal["2.0"]
    method: Literal["notifications/message"]
    params: LoggingMessageNotificationParams

CreateMessageResult

Bases: WireModel

The result returned by the client for a {@link CreateMessageRequestsampling/createMessage} request. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.

Source code in src/mcp/types/v2026_07_28/__init__.py
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
class CreateMessageResult(WireModel):
    """
    The result returned by the client for a {@link CreateMessageRequestsampling/createMessage} request.
    The client should inform the user before returning the sampled message, to allow them
    to inspect the response (human in the loop) and decide whether to allow the server to see it.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    content: (
        TextContent
        | ImageContent
        | AudioContent
        | ToolUseContent
        | ToolResultContent
        | list[SamplingMessageContentBlock]
    )
    model: str
    """
    The name of the model that generated the message.
    """
    role: Role
    stop_reason: Annotated[str | None, Field(alias="stopReason")] = None
    """
    The reason why sampling stopped, if known.

    Standard values:
    - `"endTurn"`: Natural end of the assistant's turn
    - `"stopSequence"`: A stop sequence was encountered
    - `"maxTokens"`: Maximum token limit was reached
    - `"toolUse"`: The model wants to use one or more tools

    This field is an open string to allow for provider-specific stop reasons.
    """

model instance-attribute

model: str

The name of the model that generated the message.

stop_reason class-attribute instance-attribute

stop_reason: Annotated[
    str | None, Field(alias="stopReason")
] = None

The reason why sampling stopped, if known.

Standard values: - "endTurn": Natural end of the assistant's turn - "stopSequence": A stop sequence was encountered - "maxTokens": Maximum token limit was reached - "toolUse": The model wants to use one or more tools

This field is an open string to allow for provider-specific stop reasons.

InputResponses

Bases: RootModel[dict[str, InputResponse]]

A map of client responses to server-initiated requests. Keys correspond to the keys in the {@link InputRequests} map; values are the client's result for each request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2790
2791
2792
2793
2794
2795
2796
2797
class InputResponses(RootModel[dict[str, InputResponse]]):
    """
    A map of client responses to server-initiated requests.
    Keys correspond to the keys in the {@link InputRequests} map;
    values are the client's result for each request.
    """

    root: dict[str, InputResponse]

SamplingMessage

Bases: WireModel

Describes a message issued to or received from an LLM API.

Source code in src/mcp/types/v2026_07_28/__init__.py
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
class SamplingMessage(WireModel):
    """
    Describes a message issued to or received from an LLM API.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    content: (
        TextContent
        | ImageContent
        | AudioContent
        | ToolUseContent
        | ToolResultContent
        | list[SamplingMessageContentBlock]
    )
    role: Role

CallToolRequest

Bases: WireModel

Used by the client to invoke a tool provided by the server.

Source code in src/mcp/types/v2026_07_28/__init__.py
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
class CallToolRequest(WireModel):
    """
    Used by the client to invoke a tool provided by the server.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["tools/call"]
    params: CallToolRequestParams

CallToolRequestParams

Bases: WireModel

Parameters for a tools/call request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
class CallToolRequestParams(WireModel):
    """
    Parameters for a `tools/call` request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[RequestMetaObject, Field(alias="_meta")]
    arguments: dict[str, Any] | None = None
    """
    Arguments to use for the tool call.
    """
    input_responses: Annotated[InputResponses | None, Field(alias="inputResponses")] = None
    name: str
    """
    The name of the tool.
    """
    request_state: Annotated[str | None, Field(alias="requestState")] = None

arguments class-attribute instance-attribute

arguments: dict[str, Any] | None = None

Arguments to use for the tool call.

name instance-attribute

name: str

The name of the tool.

CallToolResultResponse

Bases: WireModel

A successful response from the server for a {@link CallToolRequesttools/call} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
class CallToolResultResponse(WireModel):
    """
    A successful response from the server for a {@link CallToolRequesttools/call} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: InputRequiredResult | CallToolResult

Elicitation

Bases: WireModel

Present if the client supports elicitation from the server.

Source code in src/mcp/types/v2026_07_28/__init__.py
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
class Elicitation(WireModel):
    """
    Present if the client supports elicitation from the server.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    form: JSONObject | None = None
    url: JSONObject | None = None

Sampling

Bases: WireModel

Present if the client supports sampling from an LLM.

Source code in src/mcp/types/v2026_07_28/__init__.py
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
class Sampling(WireModel):
    """
    Present if the client supports sampling from an LLM.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    context: JSONObject | None = None
    """
    Whether the client supports context inclusion via `includeContext` parameter.
    If not declared, servers SHOULD only use `includeContext: "none"` (or omit it).
    """
    tools: JSONObject | None = None
    """
    Whether the client supports tool use via `tools` and `toolChoice` parameters.
    """

context class-attribute instance-attribute

context: JSONObject | None = None

Whether the client supports context inclusion via includeContext parameter. If not declared, servers SHOULD only use includeContext: "none" (or omit it).

tools class-attribute instance-attribute

tools: JSONObject | None = None

Whether the client supports tool use via tools and toolChoice parameters.

ClientCapabilities

Bases: WireModel

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.

Source code in src/mcp/types/v2026_07_28/__init__.py
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
class ClientCapabilities(WireModel):
    """
    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.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    elicitation: Elicitation | None = None
    """
    Present if the client supports elicitation from the server.
    """
    experimental: dict[str, JSONObject] | None = None
    """
    Experimental, non-standard capabilities that the client supports.
    """
    extensions: dict[str, JSONObject] | None = None
    """
    Optional MCP extensions that the client supports. Keys are extension identifiers
    (e.g., "io.modelcontextprotocol/oauth-client-credentials"), and values are
    per-extension settings objects. An empty object indicates support with no settings.

    Keys MUST follow the {@link MetaObject`_meta` key naming rules}, with a
    mandatory prefix.
    """
    roots: dict[str, Any] | None = None
    """
    Present if the client supports listing roots.
    """
    sampling: Sampling | None = None
    """
    Present if the client supports sampling from an LLM.
    """

elicitation class-attribute instance-attribute

elicitation: Elicitation | None = None

Present if the client supports elicitation from the server.

experimental class-attribute instance-attribute

experimental: dict[str, JSONObject] | None = None

Experimental, non-standard capabilities that the client supports.

extensions class-attribute instance-attribute

extensions: dict[str, JSONObject] | None = None

Optional MCP extensions that the client supports. Keys are extension identifiers (e.g., "io.modelcontextprotocol/oauth-client-credentials"), and values are per-extension settings objects. An empty object indicates support with no settings.

Keys MUST follow the {@link MetaObject_meta key naming rules}, with a mandatory prefix.

roots class-attribute instance-attribute

roots: dict[str, Any] | None = None

Present if the client supports listing roots.

sampling class-attribute instance-attribute

sampling: Sampling | None = None

Present if the client supports sampling from an LLM.

CompleteRequest

Bases: WireModel

A request from the client to the server, to ask for completion options.

Source code in src/mcp/types/v2026_07_28/__init__.py
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
class CompleteRequest(WireModel):
    """
    A request from the client to the server, to ask for completion options.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["completion/complete"]
    params: CompleteRequestParams

CompleteRequestParams

Bases: WireModel

Parameters for a completion/complete request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
class CompleteRequestParams(WireModel):
    """
    Parameters for a `completion/complete` request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[RequestMetaObject, Field(alias="_meta")]
    argument: Argument
    """
    The argument's information
    """
    context: Context | None = None
    """
    Additional, optional context for completions
    """
    ref: PromptReference | ResourceTemplateReference

argument instance-attribute

argument: Argument

The argument's information

context class-attribute instance-attribute

context: Context | None = None

Additional, optional context for completions

CreateMessageRequest

Bases: WireModel

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.

Source code in src/mcp/types/v2026_07_28/__init__.py
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
class CreateMessageRequest(WireModel):
    """
    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.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    method: Literal["sampling/createMessage"]
    params: CreateMessageRequestParams

CreateMessageRequestParams

Bases: WireModel

Parameters for a sampling/createMessage request.

Source code in src/mcp/types/v2026_07_28/__init__.py
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
class CreateMessageRequestParams(WireModel):
    """
    Parameters for a `sampling/createMessage` request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    include_context: Annotated[
        Literal["allServers", "none", "thisServer"] | None,
        Field(alias="includeContext"),
    ] = None
    """
    A request to include context from one or more MCP servers (including the caller), to be attached to the prompt.
    The client MAY ignore this request.

    Default is `"none"`. The values `"thisServer"` and `"allServers"` are deprecated (SEP-2596): servers SHOULD
    omit this field or use `"none"`, and SHOULD only use the deprecated values if the client declares
    {@link ClientCapabilities.sampling.context}.
    """
    max_tokens: Annotated[int, Field(alias="maxTokens")]
    """
    The requested maximum number of tokens to sample (to prevent runaway completions).

    The client MAY choose to sample fewer tokens than the requested maximum.
    """
    messages: list[SamplingMessage]
    metadata: JSONObject | None = None
    """
    Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
    """
    model_preferences: Annotated[ModelPreferences | None, Field(alias="modelPreferences")] = None
    """
    The server's preferences for which model to select. The client MAY ignore these preferences.
    """
    stop_sequences: Annotated[list[str] | None, Field(alias="stopSequences")] = None
    system_prompt: Annotated[str | None, Field(alias="systemPrompt")] = None
    """
    An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
    """
    temperature: float | None = None
    tool_choice: Annotated[ToolChoice | None, Field(alias="toolChoice")] = None
    """
    Controls how the model uses tools.
    The client MUST return an error if this field is provided but {@link ClientCapabilities.sampling.tools} is not declared.
    Default is `{ mode: "auto" }`.
    """
    tools: list[Tool] | None = None
    """
    Tools that the model may use during generation.
    The client MUST return an error if this field is provided but {@link ClientCapabilities.sampling.tools} is not declared.
    """

include_context class-attribute instance-attribute

include_context: Annotated[
    Literal["allServers", "none", "thisServer"] | None,
    Field(alias="includeContext"),
] = None

A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.

Default is "none". The values "thisServer" and "allServers" are deprecated (SEP-2596): servers SHOULD omit this field or use "none", and SHOULD only use the deprecated values if the client declares {@link ClientCapabilities.sampling.context}.

max_tokens instance-attribute

max_tokens: Annotated[int, Field(alias='maxTokens')]

The requested maximum number of tokens to sample (to prevent runaway completions).

The client MAY choose to sample fewer tokens than the requested maximum.

metadata class-attribute instance-attribute

metadata: JSONObject | None = None

Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.

model_preferences class-attribute instance-attribute

model_preferences: Annotated[
    ModelPreferences | None, Field(alias="modelPreferences")
] = None

The server's preferences for which model to select. The client MAY ignore these preferences.

system_prompt class-attribute instance-attribute

system_prompt: Annotated[
    str | None, Field(alias="systemPrompt")
] = None

An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.

tool_choice class-attribute instance-attribute

tool_choice: Annotated[
    ToolChoice | None, Field(alias="toolChoice")
] = None

Controls how the model uses tools. The client MUST return an error if this field is provided but {@link ClientCapabilities.sampling.tools} is not declared. Default is { mode: "auto" }.

tools class-attribute instance-attribute

tools: list[Tool] | None = None

Tools that the model may use during generation. The client MUST return an error if this field is provided but {@link ClientCapabilities.sampling.tools} is not declared.

DiscoverRequest

Bases: WireModel

A request from the client asking the server to advertise its supported protocol versions, capabilities, and other metadata. Servers MUST implement server/discover. Clients MAY call it but are not required to — version negotiation can also happen inline via per-request _meta.

Source code in src/mcp/types/v2026_07_28/__init__.py
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
class DiscoverRequest(WireModel):
    """
    A request from the client asking the server to advertise its supported
    protocol versions, capabilities, and other metadata. Servers **MUST**
    implement `server/discover`. Clients **MAY** call it but are not required
    to — version negotiation can also happen inline via per-request `_meta`.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["server/discover"]
    params: RequestParams

DiscoverResult

Bases: WireModel

The result returned by the server for a {@link DiscoverRequestserver/discover} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
class DiscoverResult(WireModel):
    """
    The result returned by the server for a {@link DiscoverRequestserver/discover} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    cache_scope: Annotated[Literal["private", "public"], Field(alias="cacheScope")]
    """
    Indicates the intended scope of the cached response, analogous to HTTP
    `Cache-Control: public` vs `Cache-Control: private`.

    - `"public"`: The response does not contain user-specific data. Any
      client or intermediary (e.g., shared gateway, caching proxy) MAY cache
      the response and serve it across authorization contexts.
    - `"private"`: The response MAY be cached and reused only within the
      same authorization context. Caches MUST NOT be shared across
      authorization contexts (e.g., a different access token requires a
      different cache).
    """
    capabilities: ServerCapabilities
    """
    The capabilities of the server.
    """
    instructions: str | None = None
    """
    Natural-language guidance describing the server and its features.

    This can be used by clients to improve an LLM's understanding of
    available tools (e.g., by including it in a system prompt). It should
    focus on information that helps the model use the server effectively
    and should not duplicate information already in tool descriptions.
    """
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """
    server_info: Annotated[Implementation, Field(alias="serverInfo")]
    """
    Information about the server software implementation.
    """
    supported_versions: Annotated[list[str], Field(alias="supportedVersions")]
    """
    MCP Protocol Versions this server supports. The client should choose a
    version from this list for use in subsequent requests.
    """
    ttl_ms: Annotated[int, Field(alias="ttlMs", ge=0)]
    """
    A hint from the server indicating how long (in milliseconds) the
    client MAY cache this response before re-fetching. Semantics are
    analogous to HTTP Cache-Control max-age.

    - If 0, The response SHOULD be considered immediately stale,
      The client MAY re-fetch every time the result is needed.
    - If positive, the client SHOULD consider the result fresh for this many
      milliseconds after receiving the response.
    """

cache_scope instance-attribute

cache_scope: Annotated[
    Literal["private", "public"], Field(alias="cacheScope")
]

Indicates the intended scope of the cached response, analogous to HTTP Cache-Control: public vs Cache-Control: private.

  • "public": The response does not contain user-specific data. Any client or intermediary (e.g., shared gateway, caching proxy) MAY cache the response and serve it across authorization contexts.
  • "private": The response MAY be cached and reused only within the same authorization context. Caches MUST NOT be shared across authorization contexts (e.g., a different access token requires a different cache).

capabilities instance-attribute

capabilities: ServerCapabilities

The capabilities of the server.

instructions class-attribute instance-attribute

instructions: str | None = None

Natural-language guidance describing the server and its features.

This can be used by clients to improve an LLM's understanding of available tools (e.g., by including it in a system prompt). It should focus on information that helps the model use the server effectively and should not duplicate information already in tool descriptions.

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

server_info instance-attribute

server_info: Annotated[
    Implementation, Field(alias="serverInfo")
]

Information about the server software implementation.

supported_versions instance-attribute

supported_versions: Annotated[
    list[str], Field(alias="supportedVersions")
]

MCP Protocol Versions this server supports. The client should choose a version from this list for use in subsequent requests.

ttl_ms instance-attribute

ttl_ms: Annotated[int, Field(alias='ttlMs', ge=0)]

A hint from the server indicating how long (in milliseconds) the client MAY cache this response before re-fetching. Semantics are analogous to HTTP Cache-Control max-age.

  • If 0, The response SHOULD be considered immediately stale, The client MAY re-fetch every time the result is needed.
  • If positive, the client SHOULD consider the result fresh for this many milliseconds after receiving the response.

DiscoverResultResponse

Bases: WireModel

A successful response from the server for a {@link DiscoverRequestserver/discover} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
class DiscoverResultResponse(WireModel):
    """
    A successful response from the server for a {@link DiscoverRequestserver/discover} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: DiscoverResult

GetPromptRequest

Bases: WireModel

Used by the client to get a prompt provided by the server.

Source code in src/mcp/types/v2026_07_28/__init__.py
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
class GetPromptRequest(WireModel):
    """
    Used by the client to get a prompt provided by the server.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["prompts/get"]
    params: GetPromptRequestParams

GetPromptRequestParams

Bases: WireModel

Parameters for a prompts/get request.

Source code in src/mcp/types/v2026_07_28/__init__.py
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
class GetPromptRequestParams(WireModel):
    """
    Parameters for a `prompts/get` request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[RequestMetaObject, Field(alias="_meta")]
    arguments: dict[str, str] | None = None
    """
    Arguments to use for templating the prompt.
    """
    input_responses: Annotated[InputResponses | None, Field(alias="inputResponses")] = None
    name: str
    """
    The name of the prompt or prompt template.
    """
    request_state: Annotated[str | None, Field(alias="requestState")] = None

arguments class-attribute instance-attribute

arguments: dict[str, str] | None = None

Arguments to use for templating the prompt.

name instance-attribute

name: str

The name of the prompt or prompt template.

GetPromptResultResponse

Bases: WireModel

A successful response from the server for a {@link GetPromptRequestprompts/get} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
class GetPromptResultResponse(WireModel):
    """
    A successful response from the server for a {@link GetPromptRequestprompts/get} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: InputRequiredResult | GetPromptResult

InputRequiredResult

Bases: WireModel

An InputRequiredResult sent by the server to indicate that additional input is needed before the request can be completed.

At least one of inputRequests or requestState MUST be present.

Source code in src/mcp/types/v2026_07_28/__init__.py
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
class InputRequiredResult(WireModel):
    """
    An InputRequiredResult sent by the server to indicate that additional input is needed
    before the request can be completed.

    At least one of `inputRequests` or `requestState` MUST be present.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[MetaObject | None, Field(alias="_meta")] = None
    input_requests: Annotated[InputRequests | None, Field(alias="inputRequests")] = None
    request_state: Annotated[str | None, Field(alias="requestState")] = None
    result_type: Annotated[str, Field(alias="resultType")]
    """
    Indicates the type of the result, which allows the client to determine
    how to parse the result object.

    Servers implementing this protocol version MUST include this field.
    For backward compatibility, when a client receives a result from a
    server implementing an earlier protocol version (which does not include
    `resultType`), the client MUST treat the absent field as `"complete"`.
    """

result_type instance-attribute

result_type: Annotated[str, Field(alias='resultType')]

Indicates the type of the result, which allows the client to determine how to parse the result object.

Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as "complete".

ListPromptsRequest

Bases: WireModel

Sent from the client to request a list of prompts and prompt templates the server has.

Source code in src/mcp/types/v2026_07_28/__init__.py
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
class ListPromptsRequest(WireModel):
    """
    Sent from the client to request a list of prompts and prompt templates the server has.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["prompts/list"]
    params: PaginatedRequestParams

ListResourceTemplatesRequest

Bases: WireModel

Sent from the client to request a list of resource templates the server has.

Source code in src/mcp/types/v2026_07_28/__init__.py
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
class ListResourceTemplatesRequest(WireModel):
    """
    Sent from the client to request a list of resource templates the server has.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["resources/templates/list"]
    params: PaginatedRequestParams

ListResourcesRequest

Bases: WireModel

Sent from the client to request a list of resources the server has.

Source code in src/mcp/types/v2026_07_28/__init__.py
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
class ListResourcesRequest(WireModel):
    """
    Sent from the client to request a list of resources the server has.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["resources/list"]
    params: PaginatedRequestParams

ListToolsRequest

Bases: WireModel

Sent from the client to request a list of tools the server has.

Source code in src/mcp/types/v2026_07_28/__init__.py
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
class ListToolsRequest(WireModel):
    """
    Sent from the client to request a list of tools the server has.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["tools/list"]
    params: PaginatedRequestParams

Data

Bases: WireModel

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

Source code in src/mcp/types/v2026_07_28/__init__.py
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
class Data(WireModel):
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    required_capabilities: Annotated[ClientCapabilities, Field(alias="requiredCapabilities")]
    """
    The capabilities the server requires from the client to process this request.
    """

required_capabilities instance-attribute

required_capabilities: Annotated[
    ClientCapabilities, Field(alias="requiredCapabilities")
]

The capabilities the server requires from the client to process this request.

Error2

Bases: Error

Source code in src/mcp/types/v2026_07_28/__init__.py
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
class Error2(Error):
    model_config = ConfigDict(
        extra="ignore",
    )
    code: Literal[-32021]
    """
    The error type that occurred.
    """
    data: Data
    """
    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
    """

code instance-attribute

code: Literal[-32021]

The error type that occurred.

data instance-attribute

data: Data

Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

MissingRequiredClientCapabilityError

Bases: WireModel

Returned when processing a request requires a capability the client did not declare in clientCapabilities. For HTTP, the response status code MUST be 400 Bad Request.

Source code in src/mcp/types/v2026_07_28/__init__.py
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
class MissingRequiredClientCapabilityError(WireModel):
    """
    Returned when processing a request requires a capability the client did not
    declare in `clientCapabilities`. For HTTP, the response status code MUST be
    `400 Bad Request`.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    error: Error2
    id: RequestId | None = None
    jsonrpc: Literal["2.0"]

PaginatedRequestParams

Bases: WireModel

Common params for paginated requests.

Source code in src/mcp/types/v2026_07_28/__init__.py
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
class PaginatedRequestParams(WireModel):
    """
    Common params for paginated requests.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[RequestMetaObject, Field(alias="_meta")]
    cursor: str | None = None
    """
    An opaque token representing the current pagination position.
    If provided, the server should return results starting after this cursor.
    """

cursor class-attribute instance-attribute

cursor: str | None = None

An opaque token representing the current pagination position. If provided, the server should return results starting after this cursor.

ReadResourceRequest

Bases: WireModel

Sent from the client to the server, to read a specific resource URI.

Source code in src/mcp/types/v2026_07_28/__init__.py
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
class ReadResourceRequest(WireModel):
    """
    Sent from the client to the server, to read a specific resource URI.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["resources/read"]
    params: ReadResourceRequestParams

ReadResourceRequestParams

Bases: WireModel

Parameters for a resources/read request.

Source code in src/mcp/types/v2026_07_28/__init__.py
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
class ReadResourceRequestParams(WireModel):
    """
    Parameters for a `resources/read` request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[RequestMetaObject, Field(alias="_meta")]
    input_responses: Annotated[InputResponses | None, Field(alias="inputResponses")] = None
    request_state: Annotated[str | None, Field(alias="requestState")] = None
    uri: str
    """
    The URI of the resource. The URI can use any protocol; it is up to the server how to interpret it.
    """

uri instance-attribute

uri: str

The URI of the resource. The URI can use any protocol; it is up to the server how to interpret it.

ReadResourceResultResponse

Bases: WireModel

A successful response from the server for a {@link ReadResourceRequestresources/read} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
class ReadResourceResultResponse(WireModel):
    """
    A successful response from the server for a {@link ReadResourceRequestresources/read} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    result: InputRequiredResult | ReadResourceResult

RequestMetaObject

Bases: WireModel

Extends {@link MetaObject} with additional request-specific fields. All key naming rules from MetaObject apply.

Source code in src/mcp/types/v2026_07_28/__init__.py
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
class RequestMetaObject(WireModel):
    """
    Extends {@link MetaObject} with additional request-specific fields. All key naming rules from `MetaObject` apply.
    """

    model_config = ConfigDict(
        extra="allow",
    )
    io_modelcontextprotocol_client_capabilities: Annotated[
        ClientCapabilities, Field(alias="io.modelcontextprotocol/clientCapabilities")
    ]
    """
    The client's capabilities for this specific request. Required.

    Capabilities are declared per-request rather than once at initialization;
    an empty object means the client supports no optional capabilities.
    Servers MUST NOT infer capabilities from prior requests.
    """
    io_modelcontextprotocol_client_info: Annotated[Implementation, Field(alias="io.modelcontextprotocol/clientInfo")]
    """
    Identifies the client software making the request. Required.

    The {@link Implementation} schema requires `name` and `version`; other
    fields are optional.
    """
    io_modelcontextprotocol_log_level: Annotated[
        LoggingLevel | None, Field(alias="io.modelcontextprotocol/logLevel")
    ] = None
    """
    The desired log level for this request. Optional.

    If absent, the server MUST NOT send any {@link LoggingMessageNotificationnotifications/message}
    notifications for this request. The client opts in to log messages by
    explicitly setting a level. Replaces the former `logging/setLevel` RPC.
    """
    io_modelcontextprotocol_protocol_version: Annotated[str, Field(alias="io.modelcontextprotocol/protocolVersion")]
    """
    The MCP Protocol Version being used for this request. Required.

    For the HTTP transport, this value MUST match the `MCP-Protocol-Version`
    header; otherwise the server MUST return a `400 Bad Request`. If the
    server does not support the requested version, it MUST return an
    {@link UnsupportedProtocolVersionError}.
    """
    progress_token: Annotated[ProgressToken | None, Field(alias="progressToken")] = None
    """
    If specified, the caller is requesting out-of-band progress notifications for this request (as represented by {@link ProgressNotificationnotifications/progress}). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
    """

io_modelcontextprotocol_client_capabilities instance-attribute

io_modelcontextprotocol_client_capabilities: Annotated[
    ClientCapabilities,
    Field(
        alias="io.modelcontextprotocol/clientCapabilities"
    ),
]

The client's capabilities for this specific request. Required.

Capabilities are declared per-request rather than once at initialization; an empty object means the client supports no optional capabilities. Servers MUST NOT infer capabilities from prior requests.

io_modelcontextprotocol_client_info instance-attribute

io_modelcontextprotocol_client_info: Annotated[
    Implementation,
    Field(alias="io.modelcontextprotocol/clientInfo"),
]

Identifies the client software making the request. Required.

The {@link Implementation} schema requires name and version; other fields are optional.

io_modelcontextprotocol_log_level class-attribute instance-attribute

io_modelcontextprotocol_log_level: Annotated[
    LoggingLevel | None,
    Field(alias="io.modelcontextprotocol/logLevel"),
] = None

The desired log level for this request. Optional.

If absent, the server MUST NOT send any {@link LoggingMessageNotificationnotifications/message} notifications for this request. The client opts in to log messages by explicitly setting a level. Replaces the former logging/setLevel RPC.

io_modelcontextprotocol_protocol_version instance-attribute

io_modelcontextprotocol_protocol_version: Annotated[
    str,
    Field(alias="io.modelcontextprotocol/protocolVersion"),
]

The MCP Protocol Version being used for this request. Required.

For the HTTP transport, this value MUST match the MCP-Protocol-Version header; otherwise the server MUST return a 400 Bad Request. If the server does not support the requested version, it MUST return an {@link UnsupportedProtocolVersionError}.

progress_token class-attribute instance-attribute

progress_token: Annotated[
    ProgressToken | None, Field(alias="progressToken")
] = None

If specified, the caller is requesting out-of-band progress notifications for this request (as represented by {@link ProgressNotificationnotifications/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.

RequestParams

Bases: WireModel

Common params for any request.

Source code in src/mcp/types/v2026_07_28/__init__.py
3433
3434
3435
3436
3437
3438
3439
3440
3441
class RequestParams(WireModel):
    """
    Common params for any request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[RequestMetaObject, Field(alias="_meta")]

ResourceRequestParams

Bases: WireModel

Common params for resource-related requests.

Source code in src/mcp/types/v2026_07_28/__init__.py
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
class ResourceRequestParams(WireModel):
    """
    Common params for resource-related requests.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[RequestMetaObject, Field(alias="_meta")]
    uri: str
    """
    The URI of the resource. The URI can use any protocol; it is up to the server how to interpret it.
    """

uri instance-attribute

uri: str

The URI of the resource. The URI can use any protocol; it is up to the server how to interpret it.

ServerCapabilities

Bases: WireModel

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.

Source code in src/mcp/types/v2026_07_28/__init__.py
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
class ServerCapabilities(WireModel):
    """
    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.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    completions: JSONObject | None = None
    """
    Present if the server supports argument autocompletion suggestions.
    """
    experimental: dict[str, JSONObject] | None = None
    """
    Experimental, non-standard capabilities that the server supports.
    """
    extensions: dict[str, JSONObject] | None = None
    """
    Optional MCP extensions that the server supports. Keys are extension identifiers
    (e.g., "io.modelcontextprotocol/tasks"), and values are per-extension settings
    objects. An empty object indicates support with no settings.

    Keys MUST follow the {@link MetaObject`_meta` key naming rules}, with a
    mandatory prefix.
    """
    logging: JSONObject | None = None
    """
    Present if the server supports sending log messages to the client.
    """
    prompts: Prompts | None = None
    """
    Present if the server offers any prompt templates.
    """
    resources: Resources | None = None
    """
    Present if the server offers any resources to read.
    """
    tools: Tools | None = None
    """
    Present if the server offers any tools to call.
    """

completions class-attribute instance-attribute

completions: JSONObject | None = None

Present if the server supports argument autocompletion suggestions.

experimental class-attribute instance-attribute

experimental: dict[str, JSONObject] | None = None

Experimental, non-standard capabilities that the server supports.

extensions class-attribute instance-attribute

extensions: dict[str, JSONObject] | None = None

Optional MCP extensions that the server supports. Keys are extension identifiers (e.g., "io.modelcontextprotocol/tasks"), and values are per-extension settings objects. An empty object indicates support with no settings.

Keys MUST follow the {@link MetaObject_meta key naming rules}, with a mandatory prefix.

logging class-attribute instance-attribute

logging: JSONObject | None = None

Present if the server supports sending log messages to the client.

prompts class-attribute instance-attribute

prompts: Prompts | None = None

Present if the server offers any prompt templates.

resources class-attribute instance-attribute

resources: Resources | None = None

Present if the server offers any resources to read.

tools class-attribute instance-attribute

tools: Tools | None = None

Present if the server offers any tools to call.

SubscriptionsListenRequest

Bases: WireModel

Sent from the client to open a long-lived channel for receiving notifications outside the context of a specific request. Replaces the previous HTTP GET endpoint and ensures consistent behavior between HTTP and STDIO.

Source code in src/mcp/types/v2026_07_28/__init__.py
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
class SubscriptionsListenRequest(WireModel):
    """
    Sent from the client to open a long-lived channel for receiving notifications
    outside the context of a specific request. Replaces the previous HTTP GET
    endpoint and ensures consistent behavior between HTTP and STDIO.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    id: RequestId
    jsonrpc: Literal["2.0"]
    method: Literal["subscriptions/listen"]
    params: SubscriptionsListenRequestParams

SubscriptionsListenRequestParams

Bases: WireModel

Parameters for a {@link SubscriptionsListenRequestsubscriptions/listen} request.

Source code in src/mcp/types/v2026_07_28/__init__.py
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
class SubscriptionsListenRequestParams(WireModel):
    """
    Parameters for a {@link SubscriptionsListenRequestsubscriptions/listen} request.
    """

    model_config = ConfigDict(
        extra="ignore",
    )
    meta: Annotated[RequestMetaObject, Field(alias="_meta")]
    notifications: SubscriptionFilter
    """
    The notifications the client opts in to on this stream. The server
    **MUST NOT** send notification types the client has not explicitly
    requested.
    """

notifications instance-attribute

notifications: SubscriptionFilter

The notifications the client opts in to on this stream. The server MUST NOT send notification types the client has not explicitly requested.

InputRequests

Bases: RootModel[dict[str, InputRequest]]

A map of server-initiated requests that the client must fulfill. Keys are server-assigned identifiers; values are the request objects.

Source code in src/mcp/types/v2026_07_28/__init__.py
3597
3598
3599
3600
3601
3602
3603
class InputRequests(RootModel[dict[str, InputRequest]]):
    """
    A map of server-initiated requests that the client must fulfill.
    Keys are server-assigned identifiers; values are the request objects.
    """

    root: dict[str, InputRequest]