Skip to content

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

style: apply rustfmt formatting to mcp client code

Steven Enamakel9f18c7f423f6
diff --git a/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs b/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs
index 9502fda218..9a2d9b2ce2 100644
--- a/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs
+++ b/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs
@@ -253,13 +253,18 @@ impl OpenHumanTurnPrelude {
.clear();
return;
};
- let presentations = match crate::mcp::module_client::McpConfiguredClient::configured_tool_presentations(config).await {
- Ok(presentations) => presentations,
- Err(error) => {
- tracing::debug!(?error, "[mcp] configured tool catalog is unavailable");
- Vec::new()
- }
- };
+ let presentations =
+ match crate::mcp::module_client::McpConfiguredClient::configured_tool_presentations(
+ config,
+ )
+ .await
+ {
+ Ok(presentations) => presentations,
+ Err(error) => {
+ tracing::debug!(?error, "[mcp] configured tool catalog is unavailable");
+ Vec::new()
+ }
+ };
self.mutable
.lock()
.unwrap_or_else(std::sync::PoisonError::into_inner)
diff --git a/crates/openhuman-core/src/mcp/module_client.rs b/crates/openhuman-core/src/mcp/module_client.rs
index b44ce09bf5..421714cbcb 100644
--- a/crates/openhuman-core/src/mcp/module_client.rs
+++ b/crates/openhuman-core/src/mcp/module_client.rs
@@ -22,8 +22,8 @@ use serde_json::{Map, Value};
use tinymcp_bus::{
agent_tools::{McpToolPresentation, PrepareAgentToolsRequest},
config::{McpClientConfig, OpenConfiguredRequest, OpenConfiguredResponse, TransitionStatus},
- names, McpRemoteTool, ScrubStaticToolsRequest, ServerArgumentsValidation,
- ValidateServerArgumentsRequest, SupervisorBatch,
+ names, McpRemoteTool, ScrubStaticToolsRequest, ServerArgumentsValidation, SupervisorBatch,
+ ValidateServerArgumentsRequest,
};
use crate::{
@@ -452,13 +452,15 @@ impl McpConfiguredClient {
meta: None,
})
.collect(),
- None => client
- .call(
- &client_config,
- names::methods::STATIC_LIST_TOOLS,
- (server.name.as_str(),),
- )
- .await?,
+ None => {
+ client
+ .call(
+ &client_config,
+ names::methods::STATIC_LIST_TOOLS,
+ (server.name.as_str(),),
+ )
+ .await?
+ }
};
let tools: Vec<McpRemoteTool> = client
.scrub_static_tools(&client_config, &server.name, tools)
@@ -481,9 +483,7 @@ impl McpConfiguredClient {
display_name: server.name.clone(),
tools,
default_exposure: match declared.expose {
- crate::config::McpToolExposure::Direct => {
- tinymcp_bus::McpToolExposure::Direct
- }
+ crate::config::McpToolExposure::Direct => tinymcp_bus::McpToolExposure::Direct,
crate::config::McpToolExposure::Deferred => {
tinymcp_bus::McpToolExposure::Deferred
}