tinyhumansai/openhuman · error
{tool}: invalid arguments: {e}
Error message
{tool}: invalid arguments: {e} What it means
Shared helper parse_req: serde_json failed to deserialize tool arguments into the typed request struct. The {tool} prefix names which thread tool called it; {e} names the offending field. Fires before any thread operation runs.
Source
Thrown at src/openhuman/threads/tools.rs:48
use crate::openhuman::threads::ops;
use crate::openhuman::threads::turn_state::{ClearTurnStateRequest, GetTurnStateRequest};
use crate::openhuman::tools::traits::{PermissionLevel, Tool, ToolResult};
fn read_required_str(args: &serde_json::Value, key: &str) -> anyhow::Result<String> {
args.get(key)
.and_then(serde_json::Value::as_str)
.map(str::trim)
.filter(|s| !s.is_empty())
.map(str::to_string)
.ok_or_else(|| anyhow::anyhow!("missing required string argument `{key}`"))
}
/// Deserialize tool args into a request struct with a uniform error.
fn parse_req<T: serde::de::DeserializeOwned>(
args: serde_json::Value,
tool: &str,
) -> anyhow::Result<T> {
serde_json::from_value(args).map_err(|e| anyhow::anyhow!("{tool}: invalid arguments: {e}"))
}
/// Emit a thread ops `RpcOutcome` envelope as a JSON tool result.
macro_rules! emit {
($outcome:expr, $name:literal) => {{
let outcome = $outcome.map_err(|e| anyhow::anyhow!(concat!($name, ": {}"), e))?;
Ok(ToolResult::success(serde_json::to_string(&outcome.value)?))
}};
}
/// List conversation threads.
pub struct ThreadListTool;
#[async_trait]
impl Tool for ThreadListTool {
fn name(&self) -> &str {
"thread_list"
}View on GitHub (pinned to 7491200858)
Solutions
- Read {e} for the field name and expected type
- Match the tool's parameters_schema exactly (types and required fields)
- Send message records as objects, not strings
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/threads/tools.rs:48 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/69c2292782e458f9.
Report an issue: GitHub.