Module tools

Module tools 

Source
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§

CallToolParams
Parameters for tools/call request (matches TypeScript CallToolRequest.params)
CallToolRequest
Complete tools/call request (matches TypeScript CallToolRequest interface)
CallToolResult
Result for tools/call (per MCP spec)
ListToolsParams
Parameters for tools/list request
ListToolsRequest
Complete tools/list request (matches TypeScript ListToolsRequest interface)
ListToolsResult
Result for tools/list (per MCP spec) - extends PaginatedResult
Tool
Tool definition
ToolAnnotations
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.
ToolSchema
JSON Schema definition for tool input/output (matches TypeScript spec exactly) Must be an object with type: “object”, properties, and required fields

Type Aliases§

ToolResult
Tool result type - an alias for ContentBlock to maintain backward compatibility while ensuring MCP 2025-06-18 specification compliance