mcp/tools/base_tool library
Base class for MCP tools with dependency injection.
Each tool implementation should extend this class and provide:
name: Unique tool identifierdescription: Human-readable description of what the tool doesinputSchema: JSON schema for tool argumentsoutputSchema: Optional JSON schema for tool outputannotations: Optional tool behavior hints (readOnly, destructive, etc.)meta: Optional metadata for the toolexecute: Implementation of the tool logic
Classes
- BaseTool
- Base class for all MCP tools.
Extensions
- ToolRegistration on McpServer
- Extension to register tools with an MCP server.