{"record":{"id":"db7821d0fb32d449","repo":"Kuberwastaken/claurst","slug":"rmcp-tool-arguments-must-be-a-json-object-got","errorCode":null,"errorMessage":"rmcp tool arguments must be a JSON object, got {}","messagePattern":"rmcp tool arguments must be a JSON object, got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/mcp/src/rmcp_backend.rs","lineNumber":834,"sourceCode":"        rmcp_model::RawContent::ResourceLink(link) => McpContent::Resource {\n            resource: ResourceContents {\n                uri: link.uri,\n                mime_type: link.mime_type,\n                text: None,\n                blob: None,\n            },\n        },\n        rmcp_model::RawContent::Audio(audio) => McpContent::Text {\n            text: format!(\"[Audio: {} | base64 bytes omitted]\", audio.mime_type),\n        },\n    }\n}\n\n\nfn json_value_to_object(value: Value) -> anyhow::Result<rmcp_model::JsonObject> {\n    match value {\n        Value::Object(map) => Ok(map),\n        other => Err(anyhow::anyhow!(\n            \"rmcp tool arguments must be a JSON object, got {}\",\n            other\n        )),\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use claurst_core::config::McpServerConfig;\n    use tokio::io::{AsyncReadExt, AsyncWriteExt};\n    use tokio::net::TcpListener;\n    use tokio::time::{Duration, timeout};\n\n    fn test_sse_config(url: String) -> McpServerConfig {\n        McpServerConfig {\n            name: \"test-sse\".to_string(),\n            command: None,","sourceCodeStart":816,"sourceCodeEnd":852,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/mcp/src/rmcp_backend.rs#L816-L852","documentation":"Type-guard failure when converting tool-call arguments for an MCP tool invocation: the arguments Value is not a JSON object (it is an array, string, number, null, etc.). The rmcp transport requires a JsonObject; a caller supplied malformed arguments to call_tool.","triggerScenarios":"Thrown at src-rust/crates/mcp/src/rmcp_backend.rs:834 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass tool arguments as a JSON object with string keys","Fix the caller constructing the tool request to shape arguments as an object"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}