Supported Return Types
Supported Return Types
This page lists the return types supported for each kind of handler. Use these so the annotation processor and runtime can serialize and expose results correctly.
Tools
StringMcpSchema.CallToolResultMcpSchema.ContentMcpSchema.TextContent- POJO (serialized to JSON)
Prompts
McpSchema.GetPromptResultMcpSchema.PromptMessageList<McpSchema.PromptMessage>McpSchema.ContentString- POJO (string representation via
toString())
Resources and Resource Templates
McpSchema.ReadResourceResultMcpSchema.ResourceContentsList<McpSchema.ResourceContents>McpSchema.TextResourceContentsMcpSchema.BlobResourceContents- POJO (serialized to JSON)
Completions
McpSchema.CompleteResultMcpSchema.CompleteResult.CompleteCompletionList<String>String