{"record":{"id":"7dc1945ff01496ea","repo":"tinyhumansai/openhuman","slug":"missing-required-boolean-argument-show-tray","errorCode":null,"errorMessage":"missing required boolean argument `show_tray`","messagePattern":"missing required boolean argument `show_tray`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/platform/service/tools.rs","lineNumber":148,"sourceCode":"\n    fn parameters_schema(&self) -> serde_json::Value {\n        json!({\n            \"type\": \"object\",\n            \"properties\": { \"show_tray\": { \"type\": \"boolean\", \"description\": \"Show the tray icon.\" } },\n            \"required\": [\"show_tray\"]\n        })\n    }\n\n    fn permission_level(&self) -> PermissionLevel {\n        PermissionLevel::Write\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][service] daemon_host_prefs_set invoked\");\n        let show_tray = args\n            .get(\"show_tray\")\n            .and_then(serde_json::Value::as_bool)\n            .ok_or_else(|| anyhow::anyhow!(\"missing required boolean argument `show_tray`\"))?;\n        emit!(\n            ops::daemon_host_set(&self.config, show_tray).await,\n            \"daemon_host_prefs_set\"\n        )\n    }\n}\n\n/// Restart the core process. Default-OFF.\npub struct ServiceRestartTool;\n\n#[async_trait]\nimpl Tool for ServiceRestartTool {\n    fn name(&self) -> &str {\n        \"service_restart\"\n    }\n\n    fn description(&self) -> &str {\n        \"Request an asynchronous restart of the core process, with optional \\","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/platform/service/tools.rs#L130-L166","documentation":"A required-argument guard in the `daemon_host_prefs_set` service tool: the tool-call arguments carried no usable boolean `show_tray` field — absent, null, or not a JSON boolean. The tool's schema declares `show_tray` as required, so this is a malformed model-issued tool call (or a caller that skipped schema validation), not a service-layer failure.","triggerScenarios":"Thrown at src/openhuman/platform/service/tools.rs:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include `\"show_tray\": true` (or false) as a JSON boolean in the tool call","When invoking programmatically, validate arguments against the tool schema first","Do not pass the string `\"true\"` — the guard requires a genuine boolean"],"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-14T05:17:10.506Z"}