Expand description
MCP Protocol handlers
This module contains core MCP protocol handlers:
- handle_initialize: Initialize request handler
- handle_list_tools: List available tools
- handle_shutdown: Shutdown the server
These handlers are used by both the library and binary crate.
Structs§
- Describe
Tool Result - MCP DescribeTool response (for on-demand schema loading)
- Describe
Tools Result - MCP DescribeTools (batch) response
- Initialize
Result - MCP Initialize response payload
- List
Tool Stubs Result - MCP ListTools response with stubs (for lazy loading)
- List
Tools Result - MCP ListTools response
- McpTool
- MCP Tool structure for listing (full schema)
- OAuth
Config - OAuth 2.1 Configuration
- Protected
Resource Metadata - Protected Resource Metadata (RFC 9728)
- Tool
Stub - MCP Tool stub for lightweight listing (lazy loading optimization) This reduces token usage by 90-96% by omitting the large inputSchema field
Constants§
- SUPPORTED_
VERSIONS - Supported MCP protocol versions (in order of preference, latest first)
Functions§
- handle_
describe_ tool - Handle tools/describe request (ADR-024)
- handle_
describe_ tools - Handle tools/describe_batch request (ADR-024)
- handle_
initialize - Handle initialize request
- handle_
list_ tools - Handle tools/list request
- handle_
list_ tools_ with_ lazy - Handle tools/list request with lazy loading support (ADR-024)
- handle_
shutdown - Handle shutdown request