public final class McpSchema
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
McpSchema.Annotated
Base for objects that include optional annotations for the client.
|
static class |
McpSchema.Annotations
Optional annotations for the client.
|
static class |
McpSchema.BlobResourceContents
Binary contents of a resource.
|
static class |
McpSchema.CallToolRequest
Used by the client to call a tool provided by the server.
|
static class |
McpSchema.CallToolResult
The server's response to a tools/call request from the client.
|
static class |
McpSchema.ClientCapabilities
Clients can implement additional features to enrich connected MCP servers with
additional capabilities.
|
static class |
McpSchema.CompleteRequest |
static class |
McpSchema.CompleteResult |
static interface |
McpSchema.Content |
static class |
McpSchema.CreateMessageRequest |
static class |
McpSchema.CreateMessageResult |
static class |
McpSchema.EmbeddedResource |
static class |
McpSchema.ErrorCodes
Standard error codes used in MCP JSON-RPC responses.
|
static class |
McpSchema.GetPromptRequest
Used by the client to get a prompt provided by the server.
|
static class |
McpSchema.GetPromptResult
The server's response to a prompts/get request from the client.
|
static class |
McpSchema.ImageContent |
static class |
McpSchema.Implementation |
static class |
McpSchema.InitializeRequest |
static class |
McpSchema.InitializeResult |
static interface |
McpSchema.JSONRPCMessage |
static class |
McpSchema.JSONRPCNotification |
static class |
McpSchema.JSONRPCRequest |
static class |
McpSchema.JSONRPCResponse |
static class |
McpSchema.JsonSchema |
static class |
McpSchema.ListPromptsResult
The server's response to a prompts/list request from the client.
|
static class |
McpSchema.ListResourcesResult |
static class |
McpSchema.ListResourceTemplatesResult |
static class |
McpSchema.ListRootsResult
The client's response to a roots/list request from the server.
|
static class |
McpSchema.ListToolsResult
The server's response to a tools/list request from the client.
|
static class |
McpSchema.LoggingLevel |
static class |
McpSchema.LoggingMessageNotification
The Model Context Protocol (MCP) provides a standardized way for servers to send
structured log messages to clients.
|
static class |
McpSchema.ModelHint |
static class |
McpSchema.ModelPreferences |
static class |
McpSchema.PaginatedRequest |
static class |
McpSchema.PaginatedResult |
static class |
McpSchema.ProgressNotification |
static class |
McpSchema.Prompt
A prompt or prompt template that the server offers.
|
static class |
McpSchema.PromptArgument
Describes an argument that a prompt can accept.
|
static class |
McpSchema.PromptMessage
Describes a message returned as part of a prompt.
|
static class |
McpSchema.ReadResourceRequest |
static class |
McpSchema.ReadResourceResult |
static interface |
McpSchema.Request |
static class |
McpSchema.Resource
A known resource that the server is capable of reading.
|
static interface |
McpSchema.ResourceContents
The contents of a specific resource or sub-resource.
|
static class |
McpSchema.ResourceTemplate
Resource templates allow servers to expose parameterized resources using URI
templates.
|
static class |
McpSchema.Role |
static class |
McpSchema.Root
Represents a root directory or file that the server can operate on.
|
static class |
McpSchema.SamplingMessage |
static class |
McpSchema.ServerCapabilities |
static class |
McpSchema.SubscribeRequest
Sent from the client to request resources/updated notifications from the server
whenever a particular resource changes.
|
static class |
McpSchema.TextContent |
static class |
McpSchema.TextResourceContents
Text contents of a resource.
|
static class |
McpSchema.Tool
Represents a tool that the server provides.
|
static class |
McpSchema.UnsubscribeRequest |
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
JSONRPC_VERSION |
static java.lang.String |
LATEST_PROTOCOL_VERSION |
static java.lang.String |
METHOD_INITIALIZE |
static java.lang.String |
METHOD_LOGGING_SET_LEVEL |
static java.lang.String |
METHOD_NOTIFICATION_INITIALIZED |
static java.lang.String |
METHOD_NOTIFICATION_MESSAGE |
static java.lang.String |
METHOD_NOTIFICATION_PROMPTS_LIST_CHANGED |
static java.lang.String |
METHOD_NOTIFICATION_RESOURCES_LIST_CHANGED |
static java.lang.String |
METHOD_NOTIFICATION_ROOTS_LIST_CHANGED |
static java.lang.String |
METHOD_NOTIFICATION_TOOLS_LIST_CHANGED |
static java.lang.String |
METHOD_PING |
static java.lang.String |
METHOD_PROMPT_GET |
static java.lang.String |
METHOD_PROMPT_LIST |
static java.lang.String |
METHOD_RESOURCES_LIST |
static java.lang.String |
METHOD_RESOURCES_READ |
static java.lang.String |
METHOD_RESOURCES_SUBSCRIBE |
static java.lang.String |
METHOD_RESOURCES_TEMPLATES_LIST |
static java.lang.String |
METHOD_RESOURCES_UNSUBSCRIBE |
static java.lang.String |
METHOD_ROOTS_LIST |
static java.lang.String |
METHOD_SAMPLING_CREATE_MESSAGE |
static java.lang.String |
METHOD_TOOLS_CALL |
static java.lang.String |
METHOD_TOOLS_LIST |
限定符和类型 | 方法和说明 |
---|---|
static McpSchema.JSONRPCMessage |
deserializeJsonRpcMessage(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
java.lang.String jsonText)
Deserializes a JSON string into a JSONRPCMessage object.
|
public static final java.lang.String LATEST_PROTOCOL_VERSION
public static final java.lang.String JSONRPC_VERSION
public static final java.lang.String METHOD_INITIALIZE
public static final java.lang.String METHOD_NOTIFICATION_INITIALIZED
public static final java.lang.String METHOD_PING
public static final java.lang.String METHOD_TOOLS_LIST
public static final java.lang.String METHOD_TOOLS_CALL
public static final java.lang.String METHOD_NOTIFICATION_TOOLS_LIST_CHANGED
public static final java.lang.String METHOD_RESOURCES_LIST
public static final java.lang.String METHOD_RESOURCES_READ
public static final java.lang.String METHOD_NOTIFICATION_RESOURCES_LIST_CHANGED
public static final java.lang.String METHOD_RESOURCES_TEMPLATES_LIST
public static final java.lang.String METHOD_RESOURCES_SUBSCRIBE
public static final java.lang.String METHOD_RESOURCES_UNSUBSCRIBE
public static final java.lang.String METHOD_PROMPT_LIST
public static final java.lang.String METHOD_PROMPT_GET
public static final java.lang.String METHOD_NOTIFICATION_PROMPTS_LIST_CHANGED
public static final java.lang.String METHOD_LOGGING_SET_LEVEL
public static final java.lang.String METHOD_NOTIFICATION_MESSAGE
public static final java.lang.String METHOD_ROOTS_LIST
public static final java.lang.String METHOD_NOTIFICATION_ROOTS_LIST_CHANGED
public static final java.lang.String METHOD_SAMPLING_CREATE_MESSAGE
public static McpSchema.JSONRPCMessage deserializeJsonRpcMessage(com.fasterxml.jackson.databind.ObjectMapper objectMapper, java.lang.String jsonText) throws java.io.IOException
objectMapper
- The ObjectMapper instance to use for deserializationjsonText
- The JSON string to deserializeMcpSchema.JSONRPCRequest
,
McpSchema.JSONRPCNotification
, or McpSchema.JSONRPCResponse
classes.java.io.IOException
- If there's an error during deserializationjava.lang.IllegalArgumentException
- If the JSON structure doesn't match any known
message type