Get all MCP tools, grouped by server name. Returns `(server_name, tool)` pairs — the caller is responsible for constructing the `mcp__ __ ` prefix (e.g. via [`create_mcp_tools`]).
(&self)
| 263 | /// Returns `(server_name, tool)` pairs — the caller is responsible for |
| 264 | /// constructing the `mcp__<server>__<tool>` prefix (e.g. via [`create_mcp_tools`]). |
| 265 | pub async fn get_all_tools(&self) -> Vec<(String, McpTool)> { |
| 266 | let clients = self.clients.read().await; |
| 267 | let mut all_tools = Vec::new(); |
| 268 | |
| 269 | for (server_name, client) in clients.iter() { |
| 270 | let tools = client.get_cached_tools().await; |
| 271 | for tool in tools { |
| 272 | all_tools.push((server_name.clone(), tool)); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | all_tools |
| 277 | } |
| 278 | |
| 279 | /// Call an MCP tool by full name |
| 280 | /// |