MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / suggest_tools

Method suggest_tools

crates/opencode-tool/src/registry.rs:45–54  ·  view source on GitHub ↗

Given a tool name that was not found, returns a list of available tool names filtered to exclude tools in `FILTERED_FROM_SUGGESTIONS`.

(&self, _requested: &str)

Source from the content-addressed store, hash-verified

43 /// Given a tool name that was not found, returns a list of available tool names
44 /// filtered to exclude tools in `FILTERED_FROM_SUGGESTIONS`.
45 pub async fn suggest_tools(&self, _requested: &str) -> Vec<String> {
46 let tools = self.tools.read().await;
47 let mut names: Vec<String> = tools
48 .keys()
49 .filter(|name| !FILTERED_FROM_SUGGESTIONS.contains(&name.as_str()))
50 .cloned()
51 .collect();
52 names.sort();
53 names
54 }
55
56 pub async fn list_schemas(&self) -> Vec<ToolSchema> {
57 let tools = self.tools.read().await;

Callers 2

executeMethod · 0.80
executeMethod · 0.80

Calls 4

readMethod · 0.80
containsMethod · 0.80
filterMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected