tinyhumansai/openhuman · error
invalid arguments for memory_vector_search: {e}
Error message
invalid arguments for memory_vector_search: {e} What it means
The `memory_vector_search` arguments failed serde deserialization into the tool's typed `Args` struct. The schema is descriptive, not enforced by JSON Schema itself — the Rust parse is the real gate — so this fires on wrong types (query not a string, limit outside 1–50 declared bounds at the type level, min_score not a number) or unexpected fields, with `{e}` naming the exact mismatch.
Source
Thrown at src/openhuman/memory/tools/search/vector_search.rs:100
"description": "Minimum cosine similarity threshold (default 0.3)."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"description": "Max results to return (default 10)."
},
"diverse": {
"type": "boolean",
"description": "Apply MMR diversity to reduce redundancy among results (default false)."
}
}
})
}
async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
let parsed: Args = serde_json::from_value(args)
.map_err(|e| anyhow::anyhow!("invalid arguments for memory_vector_search: {e}"))?;
if parsed.query.trim().is_empty() {
return Err(anyhow::anyhow!(
"memory_vector_search: query cannot be empty"
));
}
let limit = parsed.limit.clamp(1, 50);
let min_score = parsed.min_score.unwrap_or(0.3);
log::debug!(
"[tool][memory_vector_search] query_len={} source_kind={:?} window={:?} min_score={} limit={} diverse={}",
parsed.query.len(),
parsed.source_kind,
parsed.time_window_days,
min_score,
limit,
parsed.diverse,View on GitHub (pinned to 7491200858)
Solutions
- Match every argument's type to the schema: query as string, limit as integer 1–50, min_score as number, diverse as boolean
- Read the serde error `{e}` — it names the field and the expected type
- Drop unknown fields not present in the schema
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/memory/tools/search/vector_search.rs:100 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/8cca5ca84060517b.
Report an issue: GitHub.