tinyhumansai/openhuman · error · anyhow::Error
Missing required parameter: query
Error message
Missing required parameter: query
What it means
Argument-validation guard in WebSearchTool::execute_with_options: the args lack a "query" key or hold a non-string value (whitespace-only strings pass here and are rejected by the next empty-query check). The unified web-search entry point cannot route a search without a query, so it fails before any provider dispatch. Generic guard; the faulting input is a missing or non-string query.
Source
Thrown at src/openhuman/search/tools/web_search.rs:178
async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
self.execute_with_options(args, ToolCallOptions::default())
.await
}
fn supports_markdown(&self) -> bool {
true
}
async fn execute_with_options(
&self,
args: serde_json::Value,
options: ToolCallOptions,
) -> anyhow::Result<ToolResult> {
let query = args
.get("query")
.and_then(|q| q.as_str())
.ok_or_else(|| anyhow::anyhow!("Missing required parameter: query"))?;
if query.trim().is_empty() {
anyhow::bail!("Search query cannot be empty");
}
let query = query.trim().to_string();
if let Some(direct_search) = &self.direct_search {
tracing::debug!(
query_len = query.chars().count(),
max_results = self.max_results,
timeout_secs = self.timeout_secs,
"[web_search] direct Seltz search"
);
let mut normalized_args = args;
if let Some(obj) = normalized_args.as_object_mut() {
obj.insert("query".to_string(), Value::String(query.clone()));
}
return direct_searchView on GitHub (pinned to 7491200858)
Solutions
- Call the web search tool with a non-empty string "query" argument.
- Verify upstream code that builds the query produces a string.
- Trim user input and re-prompt when the field is omitted.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/search/tools/web_search.rs:178 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/e6f21856df8c3d7b.
Report an issue: GitHub.