tinyhumansai/openhuman · error · anyhow::Error

Missing required parameter: to

Error message

Missing required parameter: to

What it means

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.

Source

Thrown at src/openhuman/integrations/tools/twilio.rs:91

                }
            },
            "required": ["to"]
        })
    }

    fn permission_level(&self) -> PermissionLevel {
        PermissionLevel::Execute
    }

    fn scope(&self) -> ToolScope {
        ToolScope::CliRpcOnly
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        let to = args
            .get("to")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("Missing required parameter: to"))?;

        if to.trim().is_empty() {
            return Ok(ToolResult::error("Phone number 'to' cannot be empty"));
        }

        let message = args.get("message").and_then(|v| v.as_str());
        let twiml = args.get("twiml").and_then(|v| v.as_str());
        let url = args.get("url").and_then(|v| v.as_str());

        if message.is_none() && twiml.is_none() && url.is_none() {
            return Ok(ToolResult::error(
                "At least one of 'message', 'twiml', or 'url' must be provided",
            ));
        }

        let mut body = json!({ "to": to });
        if let Some(m) = message {
            body["message"] = json!(m);

View on GitHub (pinned to 7491200858)

Solutions

  1. Pass a "to" string containing the recipient phone number in E.164 format (e.g. +15551234567)
  2. Verify the model's tool call included all required fields before dispatch
  3. Check that "to" is a JSON string, not a number or object
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/integrations/tools/twilio.rs:91 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/996e426de1e5408a. Report an issue: GitHub.