Skip to content

Task: Add Structured Tool Output SupportΒ #410

@ezynda3

Description

@ezynda3

Priority: High
Breaking Change: No (backward compatible)

Description: Tools can now specify an outputSchema and return structured content via structuredContent field.

Implementation Tasks:

  • Add OutputSchema field to Tool struct
  • Add StructuredContent field to CallToolResult struct
  • Implement JSON schema validation for structured content
  • Update tool registration to support output schemas
  • Add helper functions for creating structured tool results
  • Update examples to demonstrate structured output
  • Add tests for schema validation

Files to Update:

  • mcp/tools.go
  • mcp/types.go
  • server/server.go
  • Add new validation utilities

Metadata

Metadata

Assignees

Labels

area: mcp specIssues related to MCP specification compliancepriority: highHigh priority, needs immediate attention

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions