Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: skip failed tool listing

Louis96d3f7d7a443
diff --git a/src-tauri/src/core/mcp/commands.rs b/src-tauri/src/core/mcp/commands.rs
index 78e695579..077111cc0 100644
--- a/src-tauri/src/core/mcp/commands.rs
+++ b/src-tauri/src/core/mcp/commands.rs
@@ -171,7 +171,11 @@ pub async fn get_tools(state: State<'_, AppState>) -> Result<Vec<ToolWithServer>
// List tools with timeout
let tools_future = service.list_all_tools();
let tools = match timeout(timeout_duration, tools_future).await {
- Ok(result) => result.map_err(|e| e.to_string())?,
+ Ok(Ok(tools)) => tools,
+ Ok(Err(e)) => {
+ log::warn!("MCP server {} failed to list tools: {}", server_name, e);
+ continue;
+ }
Err(_) => {
log::warn!(
"Listing tools timed out after {} seconds",