Expand description
Tool system for MCP servers
This module provides the abstraction for implementing and managing tools in MCP servers. Tools are functions that can be called by clients to perform specific operations. Enhanced with advanced parameter validation, type checking, and metadata support.
Structs§
- Addition
Tool - Tool for adding two numbers
- Calculator
Tool - Enhanced calculator tool with comprehensive validation
- Echo
Tool - Simple echo tool for testing
- Text
Processor Tool - Text processing tool with advanced string validation
- Timestamp
Tool - Tool for getting current timestamp
- Tool
- A registered tool with its handler, validation, and enhanced metadata
- Tool
Builder - Builder for creating tools with fluent API, advanced validation, and enhanced metadata
- Validation
Chain Tool
Traits§
- Parameter
Ext - Extension trait for HashMap to make parameter extraction easier
- Tool
Handler - Trait for implementing tool handlers
- Validated
Tool Handler - Trait for tools that can provide their own parameter validation
Functions§
- create_
string_ tool - Helper function to create a simple string parameter tool
- create_
typed_ tool - Helper function to create a tool with multiple typed parameters