tinyhumansai/openhuman · error · anyhow::Error

stdio tools/list response missing `tools`

Error message

stdio tools/list response missing `tools`

What it means

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).

Source

Thrown at src/openhuman/mcp/config_servers/stdio.rs:164

        session.initialize = init.clone();
        *state = Some(session);
        Ok(init)
    }

    pub async fn list_tools(&self) -> anyhow::Result<Vec<McpRemoteTool>> {
        self.initialize().await?;
        let mut state = self.state.lock().await;
        let session = state
            .as_mut()
            .ok_or_else(|| anyhow::anyhow!("stdio MCP session not initialized"))?;
        let response = self
            .send_request_on_session(session, "tools/list", json!({}))
            .await?;
        serde_json::from_value(
            response
                .get("tools")
                .cloned()
                .ok_or_else(|| anyhow::anyhow!("stdio tools/list response missing `tools`"))?,
        )
        .context("parsing stdio tools/list payload")
    }

    pub async fn call_tool(
        &self,
        name: &str,
        arguments: Value,
    ) -> anyhow::Result<McpServerToolResult> {
        self.initialize().await?;
        let mut state = self.state.lock().await;
        let session = state
            .as_mut()
            .ok_or_else(|| anyhow::anyhow!("stdio MCP session not initialized"))?;
        let result = self
            .send_request_on_session(
                session,
                "tools/call",

View on GitHub (pinned to 7491200858)

Solutions

  1. Log the full payload to see what the server actually returned instead of a tools array
  2. Check the server's MCP protocol version — the reply shape may differ from what the client expects
  3. Verify the server implements the required tools/list method
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/mcp/config_servers/stdio.rs:164 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/377b533037a8e272. Report an issue: GitHub.