Examples

Connect an MCP client and query your data

Discover an accessible dataset and run a bounded query with durable results.

Connect your Streamable HTTP client to https://api.redgold.ai/api/mcp with an account key as Authorization: Bearer. See MCP setup for initialization and client configuration.

Call data_catalog with {"kind":"dataset","limit":20}. Select a returned dataset reference, then call data_describe with {"kind":"dataset","name":"<reference>"} to inspect its schema. Submit a query using the exact dataset name and a stable task key:

{
  "jsonrpc": "2.0", "id": 3, "method": "tools/call",
  "params": {
    "name": "data_query",
    "arguments": {
      "dataset": "<reference from discovery>",
      "idempotency_key": "analysis-42-query",
      "limits": {"max_scan_rows": 1000, "max_scan_bytes": 1048576, "timeout_ms": 10000, "max_output_rows": 10, "max_charge_microusd": 100000}
    }
  }
}

Use tools/list for additional supported fields. A supported single-dataset SELECT may be supplied in sql; all relations must resolve to the named dataset.

The result's structuredContent contains a durable run_ref. Poll pipeline_status with that reference until execution completes, then call pipeline_results with {"run_ref":"<run>","limit":10}. Report completeness, truncation, exact revision, usage and actual charge. A small result page does not constrain the scan by itself.

Reuse the same task key after a lost query response. An idempotency_conflict means the key was already bound to different parameters. Bad input is rejected before effects; use data_describe to correct it. Denied access requires the right workspace or an authorized dataset. An uncertain supplier outcome needs its existing receipt reconciled instead of a new key.

© 2026 Redgold Labs