{"record":{"id":"8166c0425cecb695","repo":"openai/codex","slug":"mcp-tool-request-meta-must-be-a-json-object-got","errorCode":null,"errorMessage":"MCP tool request _meta must be a JSON object, got {other}","messagePattern":"MCP tool request _meta must be a JSON object, got (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/rmcp-client/src/rmcp_client.rs","lineNumber":791,"sourceCode":"        name: String,\n        arguments: Option<serde_json::Value>,\n        meta: Option<serde_json::Value>,\n        timeout: Option<Duration>,\n    ) -> Result<CallToolResult> {\n        self.refresh_oauth_if_needed().await?;\n        let arguments = match arguments {\n            Some(Value::Object(map)) => Some(map),\n            Some(other) => {\n                return Err(anyhow!(\n                    \"MCP tool arguments must be a JSON object, got {other}\"\n                ));\n            }\n            None => None,\n        };\n        let meta = match meta {\n            Some(Value::Object(map)) => Some(RequestMetaObject::from(map)),\n            Some(other) => {\n                return Err(anyhow!(\n                    \"MCP tool request _meta must be a JSON object, got {other}\"\n                ));\n            }\n            None => None,\n        };\n        let mut rmcp_params = CallToolRequestParams::new(name);\n        rmcp_params.arguments = arguments;\n        let requested_modern = self.protocol_mode == McpProtocolMode::V20260728;\n        let result = self\n            .run_service_operation(\"tools/call\", timeout, move |service| {\n                let mut rmcp_params = rmcp_params.clone();\n                let meta = meta.clone();\n                async move {\n                    let modern_session = requested_modern\n                        && service.peer().peer_info().is_some_and(|info| {\n                            info.protocol_version == ProtocolVersion::V_2026_07_28\n                        });\n                    if modern_session {","sourceCodeStart":773,"sourceCodeEnd":809,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rmcp-client/src/rmcp_client.rs#L773-L809","documentation":"Error \"MCP tool request _meta must be a JSON object, got {other}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rmcp-client/src/rmcp_client.rs:791 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}