tinyhumansai/openhuman · error

Missing required parameter: {key}

Error message

Missing required parameter: {key}

What it means

Shared argument-validation helper (non_empty_string) in the Tinyfish search tool: a required string parameter identified by {key} is missing from the args object, is not a string, or is empty. This generic guard backs multiple required params of the tool, and the faulting input is whichever key the message names.

Source

Thrown at src/openhuman/search/tools/tinyfish.rs:32

use crate::openhuman::integrations::IntegrationClient;
use crate::openhuman::tools::traits::{PermissionLevel, Tool, ToolCategory, ToolResult};
use async_trait::async_trait;
use serde::Deserialize;
use serde_json::json;
use std::sync::Arc;

fn truncate_chars(s: &str, max_chars: usize) -> (&str, bool) {
    match s.char_indices().nth(max_chars) {
        Some((byte_idx, _)) => (&s[..byte_idx], true),
        None => (s, false),
    }
}

fn non_empty_string<'a>(args: &'a serde_json::Value, key: &str) -> anyhow::Result<&'a str> {
    args.get(key)
        .and_then(|v| v.as_str())
        .filter(|s| !s.trim().is_empty())
        .ok_or_else(|| anyhow::anyhow!("Missing required parameter: {key}"))
}

fn optional_string<'a>(args: &'a serde_json::Value, key: &str) -> Option<&'a str> {
    args.get(key)
        .and_then(|v| v.as_str())
        .filter(|s| !s.trim().is_empty())
}

#[derive(Debug, Deserialize)]
struct TinyFishSearchResponse {
    #[serde(default)]
    results: Vec<TinyFishSearchResult>,
    #[serde(default)]
    total_results: Option<u64>,
    #[serde(rename = "costUsd", default)]
    cost_usd: Option<f64>,
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Supply the parameter named in the message as a non-empty string in the tool arguments.
  2. Check model-generated arguments for omitted or wrong-typed fields.
  3. Validate arguments against the tool schema before invocation.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/search/tools/tinyfish.rs:32 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/d92037af0d8c7a49. Report an issue: GitHub.