{"record":{"id":"c99def3651ecf028","repo":"openai/codex","slug":"tool-tool-is-disabled-for-mcp-server-server","errorCode":null,"errorMessage":"tool '{tool}' is disabled for MCP server '{server}'","messagePattern":"tool '(.+?)' is disabled for MCP server '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/codex-mcp/src/connection_manager.rs","lineNumber":891,"sourceCode":"        arguments: Option<serde_json::Value>,\n        meta: Option<serde_json::Value>,\n        requested_timeout: Option<Duration>,\n        wait_for_server: bool,\n    ) -> Result<CallToolResult> {\n        let view = self\n            .servers\n            .get(server)\n            .ok_or_else(|| anyhow!(\"unknown MCP server '{server}'\"))?;\n        if let Some(environment_id) = environment_id\n            && view.metadata.environment_id != environment_id\n        {\n            bail!(\n                \"MCP server `{server}` is running in environment `{}`, expected `{environment_id}`\",\n                view.metadata.environment_id\n            );\n        }\n        if !view.tool_filter.allows(tool) {\n            return Err(anyhow!(\n                \"tool '{tool}' is disabled for MCP server '{server}'\"\n            ));\n        }\n        let client = if wait_for_server {\n            view.connection\n                .client()\n                .await\n                .context(\"failed to get client\")?\n        } else {\n            let client = view\n                .connection\n                .client\n                .ready_client()\n                .ok_or_else(|| anyhow!(\"MCP server '{server}' is not connected\"))?;\n            if client.client.is_closed().await {\n                bail!(\"MCP server '{server}' is not connected\");\n            }\n            client","sourceCodeStart":873,"sourceCodeEnd":909,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/codex-mcp/src/connection_manager.rs#L873-L909","documentation":"Error \"tool '{tool}' is disabled for MCP server '{server}'\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/codex-mcp/src/connection_manager.rs:891 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable tool '{tool}' in the configuration for MCP server '{server}' (remove it from the disabled list or add it to the enabled tools)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}