tinyhumansai/openhuman · error

missing required parameter '{key}'

Error message

missing required parameter '{key}'

What it means

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.

Source

Thrown at src/openhuman/tinyplace/agent_tools/common.rs:146

    fn is_concurrency_safe(&self, _args: &Value) -> bool {
        self.concurrency_safe
    }

    fn supports_markdown(&self) -> bool {
        true
    }

    fn max_result_size_chars(&self) -> Option<usize> {
        Some(48 * 1024)
    }
}

// ── Argument helpers ────────────────────────────────────────────────────────

/// Required, non-empty string argument.
pub fn req_str(args: &Value, key: &str) -> anyhow::Result<String> {
    opt_str(args, key).ok_or_else(|| anyhow::anyhow!("missing required parameter '{key}'"))
}

/// Optional, trimmed, non-empty string argument.
pub fn opt_str(args: &Value, key: &str) -> Option<String> {
    args.get(key)
        .and_then(Value::as_str)
        .map(str::trim)
        .filter(|s| !s.is_empty())
        .map(str::to_string)
}

/// Optional integer argument (accepts JSON numbers and numeric strings).
pub fn opt_i64(args: &Value, key: &str) -> Option<i64> {
    let v = args.get(key)?;
    v.as_i64()
        .or_else(|| v.as_str().and_then(|s| s.trim().parse().ok()))
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Provide the named parameter as a non-empty string
  2. Trim whitespace; an all-whitespace value is treated as missing
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tinyplace/agent_tools/common.rs:146 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/0bc5529576ad2104. Report an issue: GitHub.