{"record":{"id":"996e426de1e5408a","repo":"tinyhumansai/openhuman","slug":"missing-required-parameter-to","errorCode":null,"errorMessage":"Missing required parameter: to","messagePattern":"Missing required parameter: to","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/tools/twilio.rs","lineNumber":91,"sourceCode":"                }\n            },\n            \"required\": [\"to\"]\n        })\n    }\n\n    fn permission_level(&self) -> PermissionLevel {\n        PermissionLevel::Execute\n    }\n\n    fn scope(&self) -> ToolScope {\n        ToolScope::CliRpcOnly\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let to = args\n            .get(\"to\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing required parameter: to\"))?;\n\n        if to.trim().is_empty() {\n            return Ok(ToolResult::error(\"Phone number 'to' cannot be empty\"));\n        }\n\n        let message = args.get(\"message\").and_then(|v| v.as_str());\n        let twiml = args.get(\"twiml\").and_then(|v| v.as_str());\n        let url = args.get(\"url\").and_then(|v| v.as_str());\n\n        if message.is_none() && twiml.is_none() && url.is_none() {\n            return Ok(ToolResult::error(\n                \"At least one of 'message', 'twiml', or 'url' must be provided\",\n            ));\n        }\n\n        let mut body = json!({ \"to\": to });\n        if let Some(m) = message {\n            body[\"message\"] = json!(m);","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/tools/twilio.rs#L73-L109","documentation":"Guard in the Twilio tool's execute: args.get(\"to\") returned None (missing key or non-string value). The tool schema declares \"to\" required; this sentinel fires before any Twilio API call when the model omits the recipient phone number.","triggerScenarios":"Thrown at src/openhuman/integrations/tools/twilio.rs:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a \"to\" string containing the recipient phone number in E.164 format (e.g. +15551234567)","Verify the model's tool call included all required fields before dispatch","Check that \"to\" is a JSON string, not a number or object"],"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"}