{"record":{"id":"0bc5529576ad2104","repo":"tinyhumansai/openhuman","slug":"missing-required-parameter-key-0bc552","errorCode":null,"errorMessage":"missing required parameter '{key}'","messagePattern":"missing required parameter '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tinyplace/agent_tools/common.rs","lineNumber":146,"sourceCode":"\n    fn is_concurrency_safe(&self, _args: &Value) -> bool {\n        self.concurrency_safe\n    }\n\n    fn supports_markdown(&self) -> bool {\n        true\n    }\n\n    fn max_result_size_chars(&self) -> Option<usize> {\n        Some(48 * 1024)\n    }\n}\n\n// ── Argument helpers ────────────────────────────────────────────────────────\n\n/// Required, non-empty string argument.\npub fn req_str(args: &Value, key: &str) -> anyhow::Result<String> {\n    opt_str(args, key).ok_or_else(|| anyhow::anyhow!(\"missing required parameter '{key}'\"))\n}\n\n/// Optional, trimmed, non-empty string argument.\npub fn opt_str(args: &Value, key: &str) -> Option<String> {\n    args.get(key)\n        .and_then(Value::as_str)\n        .map(str::trim)\n        .filter(|s| !s.is_empty())\n        .map(str::to_string)\n}\n\n/// Optional integer argument (accepts JSON numbers and numeric strings).\npub fn opt_i64(args: &Value, key: &str) -> Option<i64> {\n    let v = args.get(key)?;\n    v.as_i64()\n        .or_else(|| v.as_str().and_then(|s| s.trim().parse().ok()))\n}\n","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tinyplace/agent_tools/common.rs#L128-L164","documentation":"Generic required-argument guard in the tiny.place agent-tool helpers: req_str found `key` missing, absent, or whitespace-only in the tool args (opt_str returns None for all three). Whichever parameter name appears in {key} is the one the calling tool requires as a non-empty string.","triggerScenarios":"Thrown at src/openhuman/tinyplace/agent_tools/common.rs:146 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the named parameter as a non-empty string","Trim whitespace; an all-whitespace value is treated as missing"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}