Skip to content

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

fix(network): use shared MCP result conversion

Steven Enamakeld6c4afc81726
diff --git a/src/openhuman/tools/impl/network/gitbooks.rs b/src/openhuman/tools/impl/network/gitbooks.rs
index 99583a2daf..b3bcfe4c17 100644
--- a/src/openhuman/tools/impl/network/gitbooks.rs
+++ b/src/openhuman/tools/impl/network/gitbooks.rs
@@ -82,7 +82,9 @@ impl Tool for GitbooksSearchTool {
.call_tool("searchDocumentation", json!({ "query": query }))
.await
{
- Ok(result) => Ok(result.rendered.into()),
+ Ok(result) => Ok(crate::openhuman::skills::types::tool_result_from_mcp(
+ result.rendered,
+ )),
Err(e) => Ok(ToolResult::error(format!("gitbooks_search failed: {e}"))),
}
}
@@ -162,7 +164,9 @@ impl Tool for GitbooksGetPageTool {
.call_tool("getPage", json!({ "url": url }))
.await
{
- Ok(result) => Ok(result.rendered.into()),
+ Ok(result) => Ok(crate::openhuman::skills::types::tool_result_from_mcp(
+ result.rendered,
+ )),
Err(e) => Ok(ToolResult::error(format!("gitbooks_get_page failed: {e}"))),
}
}
diff --git a/src/openhuman/tools/impl/network/mcp.rs b/src/openhuman/tools/impl/network/mcp.rs
index 618fd64725..6fdb1a944d 100644
--- a/src/openhuman/tools/impl/network/mcp.rs
+++ b/src/openhuman/tools/impl/network/mcp.rs
@@ -277,7 +277,7 @@ impl Tool for McpCallTool {
if options.prefer_markdown && result.markdown_formatted.is_none() {
result.markdown_formatted = Some(result.output());
}
- Ok(result.into())
+ Ok(crate::openhuman::skills::types::tool_result_from_mcp(result))
}
async fn execute(&self, args: Value) -> anyhow::Result<ToolResult> {