Skip to main content

Module tool_discovery

Module tool_discovery 

Source
Expand description

Tool discovery and search functionality for MCP tools.

This module implements progressive disclosure of MCP tools to agents, allowing for context-efficient tool discovery without flooding the model’s context with full tool schemas.

§Example

let discovery = ToolDiscovery::new(mcp_client);

// Search for tools by keyword
let results = discovery.search_tools("file", DetailLevel::NameOnly).await?;

// Get detailed schema for a specific tool
let detail = discovery.get_tool_detail("read_file").await?;

Structs§

ToolDiscovery
Tool discovery service for progressive disclosure of MCP tools.
ToolDiscoveryResult
Result of a tool discovery operation.

Enums§

DetailLevel
Level of detail returned in tool search results.