mcp_models_v2025 library
Dart models for the MCP (Model Context Protocol) 2025-11-25 schema.
Classes
- Annotations
- Optional client hints attached to MCP content objects.
- AudioContent
- Audio content block for LLM interactions.
- BlobResourceContents
- Binary resource content encoded as base64.
- BooleanSchema
-
The MCP
BooleanSchemaschema type. - CallToolRequest
-
A
tools/callJSON-RPC request. - CallToolRequestParams
-
Parameters for a
tools/callrequest. - CallToolResult
-
The server's response to a
tools/callrequest. - CallToolResultResponse
- A successful response from the server for a tools/call request.
- CancelledNotification
- This notification is sent by the client to indicate that it is cancelling a request it previously issued.
- CancelledNotificationParams
- Parameters for a notifications/cancelled notification.
- CancelTaskRequest
-
A JSON-RPC request for the
cancelTaskoperation. - CancelTaskResult
- The result payload for a successful CancelTaskRequest.
- CancelTaskResultResponse
- The JSON-RPC response wrapping a successful CancelTaskResult.
- ClientCapabilities
- Capabilities declared by the MCP client.
- CompleteRequest
- A request from the client to the server, to ask for completion options.
- CompleteRequestParams
- Parameters for a completion/complete request.
- CompleteRequestParamsArgument
-
The MCP
CompleteRequestParamsArgumentschema type. - CompleteRequestParamsContext
-
The MCP
CompleteRequestParamsContextschema type. - CompleteResult
- The result returned by the server for a completion/complete request.
- CompleteResultCompletion
-
The MCP
CompleteResultCompletionschema type. - CompleteResultResponse
- A successful response from the server for a completion/complete request.
- ContentBlock
- Base class for all MCP content blocks (text, image, audio, resource, etc.).
- CreateMessageRequest
- A request from the server to sample an LLM via the client.
- CreateMessageRequestParams
- Parameters for a sampling/createMessage request.
- CreateMessageResult
- The result returned by the client for a sampling/createMessage request.
- CreateTaskResult
-
The MCP
CreateTaskResultschema type. - CreateTaskResultResponse
- The JSON-RPC response wrapping a successful CreateTaskResult.
- ElicitationCompleteNotification
-
A JSON-RPC notification for the
elicitationCompleteevent. - ElicitationCompleteNotificationParams
- Parameters for ElicitationCompleteNotification.
- ElicitRequest
- A request from the server to elicit additional information from the user via the client.
- ElicitRequestFormParams
- The parameters for a request to elicit non-sensitive information from the user via a form in the client.
- ElicitRequestFormParamsSchema
-
The MCP
ElicitRequestFormParamsSchemaschema type. - ElicitRequestParams
- The parameters for a request to elicit additional information from the user via the client.
- ElicitRequestURLParams
- The parameters for a request to elicit information from the user via a URL in the client.
- ElicitResult
- The result returned by the client for an elicitation/create request.
- EmbeddedResource
- An MCP resource embedded inside a prompt or tool-call result.
- EmptyResult
- A successful result that carries no data.
-
EnumSchema<
T> -
The MCP
EnumSchemaschema type. - Error
- A JSON-RPC 2.0 error object.
- GetPromptRequest
- Used by the client to get a prompt provided by the server.
- GetPromptRequestParams
- Parameters for a prompts/get request.
- GetPromptResult
- The result returned by the server for a prompts/get request.
- GetPromptResultResponse
- A successful response from the server for a prompts/get request.
- GetTaskPayloadRequest
-
A JSON-RPC request for the
getTaskPayloadoperation. - GetTaskPayloadResult
- The result payload for a successful GetTaskPayloadRequest.
- GetTaskPayloadResultResponse
- The JSON-RPC response wrapping a successful GetTaskPayloadResult.
- GetTaskRequest
-
A JSON-RPC request for the
getTaskoperation. - GetTaskRequestParams
- Parameters for GetTaskRequest.
- Icon
- An optionally-sized icon that may be displayed in a UI.
- ImageContent
- Image content block for LLM interactions.
- Implementation
- Describes an MCP client or server implementation.
- InitializedNotification
-
A JSON-RPC notification for the
initializedevent. - InitializeRequest
-
The MCP
initializerequest sent by the client on first connect. - InitializeRequestParams
-
Parameters for an
initializerequest. - InitializeResult
-
The server's response to an
initializerequest. - InitializeResultResponse
- The JSON-RPC response wrapping a successful InitializeResult.
- InternalError
- JSON-RPC internal error (code -32603).
- InvalidParamsError
- JSON-RPC invalid params error (code -32602).
- InvalidRequestError
- JSON-RPC invalid request error (code -32600).
- JSONRPCErrorResponse
- A JSON-RPC 2.0 error response.
- JSONRPCMessage
- Union base for all JSON-RPC wire objects.
- JSONRPCNotification
- A JSON-RPC 2.0 notification (a request with no expected response).
- JSONRPCRequest
- A JSON-RPC 2.0 request that expects a response.
- JSONRPCResponse
- Abstract base for all JSON-RPC response objects.
- JSONRPCResultResponse
- A successful JSON-RPC 2.0 response carrying a Result.
- LegacyTitledEnumSchema
- Use TitledSingleSelectEnumSchema instead.
- ListPromptsRequest
- Sent from the client to request a list of prompts and prompt templates the server has.
- ListPromptsResult
- The result returned by the server for a prompts/list request.
- ListPromptsResultResponse
- A successful response from the server for a prompts/list request.
- ListResourcesRequest
- Sent from the client to request a list of resources the server has.
- ListResourcesResult
- The result returned by the server for a resources/list request.
- ListResourcesResultResponse
- A successful response from the server for a resources/list request.
- ListResourceTemplatesRequest
- Sent from the client to request a list of resource templates the server has.
- ListResourceTemplatesResult
- The result returned by the server for a resources/templates/list request.
- ListResourceTemplatesResultResponse
- A successful response from the server for a resources/templates/list request.
- ListRootsRequest
- Sent from the server to request a list of root URIs from the client.
- ListRootsResult
- The result returned by the client for a roots/list request.
- ListTasksRequest
-
A JSON-RPC request for the
listTasksoperation. - ListTasksResult
- The result payload for a successful ListTasksRequest.
- ListTasksResultResponse
- The JSON-RPC response wrapping a successful ListTasksResult.
- ListToolsRequest
- Sent from the client to request a list of tools the server has.
- ListToolsResult
- The result returned by the server for a tools/list request.
- ListToolsResultResponse
- A successful response from the server for a tools/list request.
- LoggingMessageNotificationParams
-
Parameters for a
logging/messagenotification. -
MapMC<
K, V> -
A
MapModelthat also satisfies MCP. - MCP
- Base interface for all MCP model objects.
- McpBuilder
- Declarative MCP capability builder.
- MetaObject
-
Holds the
_metamap present on many MCP types. - MethodNotFoundError
- JSON-RPC method not found error (code -32601).
- ModelHint
- Hints to use for model selection.
- ModelPreferences
- The server's preferences for model selection, requested of the client during sampling.
-
MultiSelectEnumSchema<
T> -
The MCP
MultiSelectEnumSchemaschema type. - NotificationParams
- Parameters shared by MCP notifications.
- NumberSchema
-
The MCP
NumberSchemaschema type. - PaginatedRequestParams
- Request params for paginated MCP list calls.
- ParseError
- JSON-RPC parse error (code -32700).
- PingRequest
-
A
pingrequest used to check liveness of the other party. - PingResultResponse
- The JSON-RPC response to a PingRequest.
-
PrimitiveSchemaDefinition<
T> - Restricted schema definitions that only allow primitive types without nested objects or arrays.
- ProgressNotification
- An out-of-band notification used to inform the receiver of a progress update for a long-running request.
- ProgressNotificationParams
- Parameters for a notifications/progress notification.
- Prompt
- A prompt or prompt template offered by the server.
- PromptArgument
- Describes an argument accepted by a Prompt.
- PromptListChangedNotification
- An optional notification from the server to the client, informing it that the list of prompts it offers has changed.
- PromptMessage
- Describes a message returned as part of a prompt.
- PromptReference
- Identifies a prompt.
- ReadResourceRequest
- Sent from the client to the server, to read a specific resource URI.
- ReadResourceRequestParams
- Parameters for a resources/read request.
- ReadResourceResult
- The result returned by the server for a resources/read request.
- ReadResourceResultResponse
- A successful response from the server for a resources/read request.
- Reference
-
The MCP
Referenceschema type. - RelatedTaskMetadata
-
The MCP
RelatedTaskMetadataschema type. - RequestMetaObject
-
The
_metaobject carried inside request params. - RequestParams
- Common params for any request.
- Resource
- A known resource that the server can serve.
- ResourceContents
- Base interface for resource content (text or blob).
- ResourceLink
- A resource link returned by a tool or included in a prompt.
- ResourceListChangedNotification
- An optional notification from the server to the client, informing it that the list of resources it can read from has changed.
- ResourceTemplate
- A URI template (RFC 6570) describing a family of resources.
- ResourceTemplateReference
- A reference to a resource or resource template definition.
- ResourceUpdatedNotification
- A notification from the server to the client, informing it that a resource has changed and may need to be read again.
- ResourceUpdatedNotificationParams
- Parameters for a notifications/resources/updated notification.
- Result
- Generic MCP result that may carry arbitrary extra fields.
- Root
- Represents a root directory or file that the server can operate on.
- RootsListChangedNotification
-
A JSON-RPC notification for the
rootsListChangedevent. - SamplingMessage
- Describes a message issued to or received from an LLM API.
-
Schema<
T> -
The MCP
Schemaschema type. - ServerCapabilities
- Capabilities declared by the MCP server.
- SetLevelRequest
-
A JSON-RPC request for the
setLeveloperation. - SetLevelRequestParams
- Parameters for SetLevelRequest.
- SetLevelResultResponse
- The JSON-RPC response to a SetLevelRequest.
-
SingleSelectEnumSchema<
T> -
The MCP
SingleSelectEnumSchemaschema type. - StringSchema
-
The MCP
StringSchemaschema type. - SubscribeRequest
-
A JSON-RPC request for the
subscribeoperation. - SubscribeRequestParams
- Parameters for SubscribeRequest.
- SubscribeResultResponse
- The JSON-RPC response to a SubscribeRequest.
- Task
- Data associated with an MCP task.
- TaskMetadata
-
The MCP
TaskMetadataschema type. - TaskStatusNotification
-
A JSON-RPC notification for the
taskStatusevent. - TaskStatusNotificationParams
- Parameters for TaskStatusNotification.
- TextContent
- Plain-text content for LLM interactions.
- TextResourceContent
- Plain-text resource content embedded in a content block.
- TextResourceContents
- UTF-8 text resource contents.
- TitledMultiSelectEnumSchema
- Schema for multiple-selection enumeration with display titles for each option.
- TitledSingleSelectEnumSchema
- Schema for single-selection enumeration with display titles for each option.
- Tool
- A tool that the server exposes for the client to call.
- ToolAnnotations
- Behavioural hints for a Tool (all properties are advisory).
- ToolChoice
- Controls tool selection behavior for sampling requests.
- ToolExecution
- Execution-related properties for a Tool.
- ToolListChangedNotification
- An optional notification from the server to the client, informing it that the list of tools it offers has changed.
- ToolResultContent
- The result of a tool use, provided by the user back to the assistant.
- ToolSchema
-
JSON Schema object used for a tool's
inputSchemaoroutputSchema. - ToolUseContent
- A request from the assistant to call a tool.
- UnsubscribeRequestParams
-
The MCP
UnsubscribeRequestParamsschema type. - UnsubscribeResultResponse
-
The MCP
UnsubscribeResultResponseschema type. - UntitledMultiSelectEnumSchema
- Schema for multiple-selection enumeration without display titles for options.
- UntitledSingleSelectEnumSchema
- Schema for single-selection enumeration without display titles for options.
Enums
- ActionType
- The user action in response to an elicitation request.
- LoggingLevel
- Syslog-compatible log severity levels (RFC-5424).
- ResultType
- Indicates the type of a result, so a client knows how to parse it.
- Role
- The sender or recipient role in an MCP conversation.
- StringFormat
-
The JSON Schema
formatkeyword for string-typed values. - TaskStatus
- The status of an MCP task.
- Theme
- UI theme variants for Icon.
Typedefs
- InputResponses = dynamic
-
JSONObject
= Map<
String, Object?> - JSONValue = Object?
-
MethodHandler
= Future<
MCP> Function(Map<String, Object?> payload) -
PromptHandler
= Future<
GetPromptResult> Function(GetPromptRequest request) -
ResourceHandler
= Future<
ReadResourceResult> Function(ReadResourceRequest request) -
ToolHandler
= Future<
CallToolResult> Function(CallToolRequest request)