{"record":{"id":"0f425253b513f7e9","repo":"openai/codex","slug":"mcp-tool-arguments-must-be-a-json-object-got-oth","errorCode":null,"errorMessage":"MCP tool arguments must be a JSON object, got {other}","messagePattern":"MCP tool arguments 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":782,"sourceCode":"                .boxed()\n            })\n            .await?;\n        self.persist_oauth_tokens().await;\n        Ok(result)\n    }\n\n    pub async fn call_tool(\n        &self,\n        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","sourceCodeStart":764,"sourceCodeEnd":800,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rmcp-client/src/rmcp_client.rs#L764-L800","documentation":"Error \"MCP tool arguments must be a JSON object, got {other}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rmcp-client/src/rmcp_client.rs:782 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"}