MCPcopy Create free account
hub / github.com/7df-lab/devo / ToolHandler

Interface ToolHandler

crates/tools/src/tool_handler.rs:11–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9/// and returns `ToolResult` (struct-based output) instead of trait objects.
10#[async_trait]
11pub trait ToolHandler: Send + Sync {
12 /// Return the tool's specification.
13 fn spec(&self) -> &ToolSpec;
14
15 /// Execute the tool with the given context and input.
16 async fn handle(
17 &self,
18 ctx: ToolContext,
19 input: serde_json::Value,
20 progress: Option<ToolProgressSender>,
21 ) -> Result<ToolResult, ToolCallError>;
22}

Callers

nothing calls this directly

Implementers 15

query.rscrates/core/src/query.rs
registry.rscrates/core/src/tools/registry.rs
router.rscrates/core/src/tools/router.rs
code_search.rscrates/core/src/tools/handlers/code_se
read.rscrates/core/src/tools/handlers/read.rs
websearch.rscrates/core/src/tools/handlers/websear
glob.rscrates/core/src/tools/handlers/glob.rs
webfetch.rscrates/core/src/tools/handlers/webfetc
bash.rscrates/core/src/tools/handlers/bash.rs
apply_patch.rscrates/core/src/tools/handlers/apply_p
agent.rscrates/core/src/tools/handlers/agent.r
tool_search.rscrates/core/src/tools/handlers/tool_se

Calls

no outgoing calls

Tested by

no test coverage detected