Hmbown/CodeWhale · error

Reviewed plugin MCP server returned an error in

Error message

Reviewed plugin MCP server returned an error in '{method}' (server details suppressed to protect environment-backed credentials)

What it means

When a reviewed plugin's MCP server returns a JSON-RPC error response, the raw error object is normally surfaced as "MCP error in '<method>': <error>". For reviewed plugins, suppress_server_details is set so the error body is hidden — its text may echo environment-backed credentials the plugin server can see. This generic message is thrown instead, protecting those secrets.

Solutions

  1. Read the plugin's own logs to learn the underlying error, since details are deliberately suppressed here
  2. Fix the tool invocation (arguments, permissions, backend state) that made the plugin server fail
  3. If you fully trust the context, run the same server unreviewed (or adjust the suppression policy) to see raw error details — understanding the credential-exposure tradeoff first
Defensive patterns

Strategy: try-catch

Try / catch

match client.call_tool("tools/call", args) {
    Err(e) if e.to_string().contains("server details suppressed") => {
        log::warn!("reviewed plugin server failed for tools/call; details hidden. Check plugin logs.");
        // do NOT retry blindly; inspect plugin-side logs for the real cause
    }
    other => other?,
}

Prevention

When it happens

Trigger: check_response-style code is called with suppress_server_details=true and the server's JSON-RPC response contains an "error" key; thrown for any failed call (tools/list, tools/call, initialize, etc.) against a reviewed-plugin server.

Common situations: The plugin tool returned a genuine server-side error (invalid arguments, rate limit, backend outage); the server rejected authentication; the tool output included sensitive text that must not be displayed.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/a2271b8c8ed30a2c. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/mcp.rs:1390

    /// The server supplied a spec-shaped `capabilities` object at initialize.
    Advertised(McpServerCapabilities),
    /// A connected legacy server omitted metadata, so bounded discovery probes
    /// remain enabled for backward compatibility.
    LegacyFallback,
    /// The server has not completed initialization, so no truthful capability
    /// claim can be made yet.
    #[default]
    NotObserved,
}

fn response_result<'a>(
    response: &'a serde_json::Value,
    method: &str,
    suppress_server_details: bool,
) -> Result<Option<&'a serde_json::Value>> {
    if let Some(error) = response.get("error") {
        if suppress_server_details {
            anyhow::bail!(
                "Reviewed plugin MCP server returned an error in '{method}' (server details suppressed to protect environment-backed credentials)"
            );
        }
        anyhow::bail!("MCP error in '{method}': {error}");
    }
    Ok(response.get("result"))
}

async fn run_optional_discovery<F>(server: &str, method: &str, timeout: Duration, discovery: F)
where
    F: Future<Output = Result<()>>,
{
    match tokio::time::timeout(timeout, discovery).await {
        Ok(Ok(())) => {}
        Ok(Err(error)) => {
            tracing::warn!(
                target: "mcp",
                server,

View on GitHub (pinned to 73e0f67d83)