tinyhumansai/openhuman · error · anyhow::Error

invalid arguments for memory_store_raw_chunks: {e}

Error message

invalid arguments for memory_store_raw_chunks: {e}

What it means

Argument-deserialization wrapper in the memory_store_raw_chunks tool's execute: args failed to deserialize into the tool's Args struct (bad types for source_kind/source_id/owner/since_ms/until_ms/tags_all_of/limit). Generic sentinel with the serde detail in `{e}`; fires before the SourceKind parse and driver query.

Source

Thrown at src/openhuman/memory/tools/raw_store/raw_chunks.rs:70

            "properties": {
                "source_kind": { "type": "string", "enum": ["chat", "email", "document"] },
                "source_id":   { "type": "string", "description": "Exact source id." },
                "owner":       { "type": "string", "description": "Owner / account filter." },
                "since_ms":    { "type": "integer", "description": "Inclusive lower bound on timestamp_ms." },
                "until_ms":    { "type": "integer", "description": "Inclusive upper bound on timestamp_ms." },
                "tags_all_of": {
                    "type": "array",
                    "items": { "type": "string" },
                    "description": "Post-filter: chunk.metadata.tags must contain every tag listed."
                },
                "limit":       { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Default 100." }
            }
        })
    }

    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_store_raw_chunks: {e}"))?;
        log::debug!(
            "[tool][memory_store] raw_chunks source_kind={:?} owner={:?} tags={:?} limit={:?}",
            parsed.source_kind,
            parsed.owner,
            parsed.tags_all_of,
            parsed.limit
        );
        let source_kind = match parsed.source_kind.as_deref() {
            Some(s) => Some(
                SourceKind::parse(s)
                    .map_err(|e| anyhow::anyhow!("memory_store_raw_chunks: {e}"))?,
            ),
            None => None,
        };
        if let Some(limit) = parsed.limit {
            if !(1..=1000).contains(&limit) {
                return Err(anyhow::anyhow!(
                    "memory_store_raw_chunks: limit must be between 1 and 1000"

View on GitHub (pinned to 7491200858)

Solutions

  1. Match field types to the schema (arrays for tags, integers for bounds)
  2. Use valid source_kind enum values where provided
  3. Fix malformed JSON in the tool call
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/memory/tools/raw_store/raw_chunks.rs:70 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/7fe2a8ebc2783825. Report an issue: GitHub.