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

Method list_for_server

crates/opencode-mcp/src/tool.rs:74–81  ·  view source on GitHub ↗
(&self, server_name: &str)

Source from the content-addressed store, hash-verified

72 }
73
74 pub async fn list_for_server(&self, server_name: &str) -> Vec<McpTool> {
75 let tools = self.tools.read().await;
76 tools
77 .values()
78 .filter(|t| t.server_name == server_name)
79 .cloned()
80 .collect()
81 }
82
83 pub async fn clear_server(&self, server_name: &str) {
84 let mut tools = self.tools.write().await;

Calls 2

readMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected