Skip to main content

Module tool

Module tool 

Source
Expand description

Tool traits and types for MCP servers.

This module provides the core abstractions for defining and executing MCP tools.

Structs§

FnTool
A simple function-based tool.
ToolEntry
Entry for auto-discovered tools registered via #[mcp_tool].
ToolRegistry
Registry for managing tools.

Traits§

McpTool
Trait for implementing MCP tools.
ToolProvider
Trait for types that can provide multiple tools.

Functions§

all_tools
Returns all auto-discovered tools.
tools_in_group
Returns auto-discovered tools filtered by group.

Type Aliases§

BoxFuture
A boxed future for async tool execution.
DynTool
A type-erased tool wrapper.
ToolCallResult
Result type for tool execution - returns content or an error message.
ToolFactory
A factory function that creates a tool instance.