Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(mcp): compute description before building McpTool struct

Steven Enamakel4bfcd5c38e16
diff --git a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs
index 230707803f..8b8e56f555 100644
--- a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs
+++ b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs
@@ -213,10 +213,13 @@ impl Tool for ConfiguredMcpServerTool {
let safe = crate::mcp::registry::tools_safe_for_agent(
server,
live.into_iter()
- .map(|remote| tinymcp_bus::McpTool {
- name: remote.name,
- description: remote.display_description(),
- input_schema: remote.input_schema,
+ .map(|remote| {
+ let description = remote.display_description();
+ tinymcp_bus::McpTool {
+ name: remote.name,
+ description,
+ input_schema: remote.input_schema,
+ }
})
.collect(),
);