Expand description
Core MCP protocol types and error handling MCP Tools Protocol Types
This module defines the types used for the MCP tools functionality.
Structs§
- Call
Tool Params - Parameters for tools/call request (matches TypeScript CallToolRequest.params)
- Call
Tool Request - Complete tools/call request (matches TypeScript CallToolRequest interface)
- Call
Tool Result - Result for tools/call (per MCP spec)
- List
Tools Params - Parameters for tools/list request
- List
Tools Request - Complete tools/list request (matches TypeScript ListToolsRequest interface)
- List
Tools Result - Result for tools/list (per MCP spec) - extends PaginatedResult
- Tool
- Tool definition
- Tool
Annotations - Tool annotations structure (matches TypeScript ToolAnnotations) NOTE: all properties in ToolAnnotations are hints. They are not guaranteed to provide a faithful description of tool behavior. Clients should never make tool use decisions based on ToolAnnotations from untrusted servers.
- Tool
Schema - JSON Schema definition for tool input/output (matches TypeScript spec exactly) Must be an object with type: “object”, properties, and required fields
Type Aliases§
- Tool
Result - Tool result type - an alias for ContentBlock to maintain backward compatibility while ensuring MCP 2025-06-18 specification compliance