tinyhumansai/openhuman · error

Missing 'data' parameter

Error message

Missing 'data' parameter

What it means

Required-parameter guard in CsvExportTool's execute_in_context: the `data` argument (the records to export, passed as a string) is absent or not a string. Fires before filename handling and CSV serialization, so no file was written; supply the data payload to export.

Source

Thrown at src/openhuman/tools/impl/filesystem/csv_export.rs:150

        &self,
        args: serde_json::Value,
        _options: ToolCallOptions,
        context: Option<&ToolExecutionContext>,
    ) -> anyhow::Result<ToolResult> {
        self.execute_in_context(args, context).await
    }
}

impl CsvExportTool {
    async fn execute_in_context(
        &self,
        args: serde_json::Value,
        context: Option<&ToolExecutionContext>,
    ) -> anyhow::Result<ToolResult> {
        let data_str = args
            .get("data")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("Missing 'data' parameter"))?;

        let filename = args
            .get("filename")
            .and_then(|v| v.as_str())
            .ok_or_else(|| anyhow::anyhow!("Missing 'filename' parameter"))?;

        let columns: Option<Vec<String>> = args.get("columns").and_then(|v| {
            v.as_array().map(|arr| {
                arr.iter()
                    .filter_map(|item| item.as_str().map(String::from))
                    .collect()
            })
        });

        // Security: check write permission
        if !self.security.can_act() {
            return Ok(ToolResult::error(
                "[policy-blocked] Action blocked: autonomy is read-only",

View on GitHub (pinned to 7491200858)

Solutions

  1. Include `data` as a string containing the CSV rows
  2. Pass properly escaped CSV text if values contain commas/quotes
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/filesystem/csv_export.rs:150 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/a42e54244e7be9a6. Report an issue: GitHub.