tinyhumansai/openhuman · error
failed to serialize mcp write args_summary
Error message
failed to serialize mcp write args_summary
What it means
serde_json failed to serialize the args_summary value of an MCP write-audit record before inserting it into the mcp_writes SQLite table. This is a non-fatal audit-path failure: the code logs a warning and substitutes a placeholder rather than dropping the audit row, so the write is still recorded but its argument summary is degraded. The faulting input is the args_summary payload itself (a value that does not conform to serde's data model, e.g. a map with a non-string key).
Source
Thrown at src/openhuman/mcp/audit/store.rs:38
record.success,
record.error_message.is_some()
);
let args_summary = match serde_json::to_string(&record.args_summary) {
Ok(args_summary) => {
log::trace!(
"[mcp_audit] record_write args_summary serialized tool={} bytes={}",
record.tool_name,
args_summary.len()
);
args_summary
}
Err(err) => {
log::warn!(
"[mcp_audit] record_write args_summary serialize failed tool={} client={} error={err}",
record.tool_name,
record.client_info
);
return Err(anyhow::Error::new(err))
.context("failed to serialize mcp write args_summary");
}
};
let error_message = truncate_error_message(record.error_message.as_deref());
let result = chunk_store::with_connection(config, |conn| {
log::trace!(
"[mcp_audit] record_write inserting row tool={} client={} timestamp_ms={}",
record.tool_name,
record.client_info,
record.timestamp_ms
);
match conn.execute(
"INSERT INTO mcp_writes (
timestamp_ms,
client_info,
tool_name,
args_summary,
resulting_chunk_id,View on GitHub (pinned to 7491200858)
Solutions
- Identify which MCP tool produced an args_summary containing a non-serializable value (e.g. non-string map keys) and normalize it before audit
- Coerce args_summary to a string (serde_json::to_string on a Value cloned as stringified) as a fallback serialization
- Check serde_json version compatibility if the error is a schema/data-model mismatch
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/openhuman/mcp/audit/store.rs:38 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/f304b0d6cfdf0c33.
Report an issue: GitHub.