{"record":{"id":"377b533037a8e272","repo":"tinyhumansai/openhuman","slug":"stdio-tools-list-response-missing-tools","errorCode":null,"errorMessage":"stdio tools/list response missing `tools`","messagePattern":"stdio tools/list response missing `tools`","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/config_servers/stdio.rs","lineNumber":164,"sourceCode":"        session.initialize = init.clone();\n        *state = Some(session);\n        Ok(init)\n    }\n\n    pub async fn list_tools(&self) -> anyhow::Result<Vec<McpRemoteTool>> {\n        self.initialize().await?;\n        let mut state = self.state.lock().await;\n        let session = state\n            .as_mut()\n            .ok_or_else(|| anyhow::anyhow!(\"stdio MCP session not initialized\"))?;\n        let response = self\n            .send_request_on_session(session, \"tools/list\", json!({}))\n            .await?;\n        serde_json::from_value(\n            response\n                .get(\"tools\")\n                .cloned()\n                .ok_or_else(|| anyhow::anyhow!(\"stdio tools/list response missing `tools`\"))?,\n        )\n        .context(\"parsing stdio tools/list payload\")\n    }\n\n    pub async fn call_tool(\n        &self,\n        name: &str,\n        arguments: Value,\n    ) -> anyhow::Result<McpServerToolResult> {\n        self.initialize().await?;\n        let mut state = self.state.lock().await;\n        let session = state\n            .as_mut()\n            .ok_or_else(|| anyhow::anyhow!(\"stdio MCP session not initialized\"))?;\n        let result = self\n            .send_request_on_session(\n                session,\n                \"tools/call\",","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/config_servers/stdio.rs#L146-L182","documentation":"The stdio server's tools/list JSON-RPC reply parsed as JSON but had no top-level \"tools\" array — a malformed or unexpected response shape from the remote MCP server (e.g. an error envelope or capabilities object instead of a tool listing).","triggerScenarios":"Thrown at src/openhuman/mcp/config_servers/stdio.rs:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Log the full payload to see what the server actually returned instead of a tools array","Check the server's MCP protocol version — the reply shape may differ from what the client expects","Verify the server implements the required tools/list method"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}