{"record":{"id":"f818f6f23dda07a6","repo":"openai/codex","slug":"originating-mcp-tool-is-disabled-by-app-configurat","errorCode":null,"errorMessage":"originating MCP tool is disabled by app configuration","messagePattern":"originating MCP tool is disabled by app configuration","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/codex-mcp/src/resource_origin.rs","lineNumber":296,"sourceCode":"                .and_then(|meta| meta.get(\"requires_explicit_link_id\"))\n                .and_then(serde_json::Value::as_bool)\n                == Some(true)\n        {\n            anyhow::bail!(\"originating MCP tool requires an explicit account link\");\n        }\n\n        let annotations = tool_info.tool.annotations.as_ref();\n        if !AppToolPolicyEvaluator::new(&binding.config().config_layer_stack)\n            .policy(AppToolPolicyInput {\n                connector_id: Some(&self.connector_id),\n                tool_name: tool_info.tool.name.as_ref(),\n                tool_title: tool_info.tool.title.as_deref(),\n                destructive_hint: annotations.and_then(|value| value.destructive_hint),\n                open_world_hint: annotations.and_then(|value| value.open_world_hint),\n            })\n            .enabled\n        {\n            anyhow::bail!(\"originating MCP tool is disabled by app configuration\");\n        }\n\n        let meta = serde_json::from_value(serde_json::json!({\n            \"threadId\": thread_id,\n            \"x-codex-turn-metadata\": {\n                \"mcp_request_meta\": {\n                    \"selected_connector_ids\": [&self.connector_id],\n                    \"link_id\": &self.link_id,\n                }\n            },\n        }))?;\n        binding\n            .read_resource(\n                CODEX_APPS_MCP_SERVER_NAME,\n                ReadResourceRequestParams::new(uri).with_meta(meta),\n            )\n            .await\n    }","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/codex-mcp/src/resource_origin.rs#L278-L314","documentation":"Error \"originating MCP tool is disabled by app configuration\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/codex-mcp/src/resource_origin.rs:296 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the tool in the app configuration before using it."],"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"}