← All tools

Prism Tools

Transform, analyze, and visualize data with natural language. Structured reasoning over payloads, charts, type bridging between systems, format export, and pagination. Self-healing code generation with deterministic caching.

Why this matters

Agents frequently need to reshape data between tools — group by customer, compute running totals, extract nested fields. Prism lets you describe the transformation in English. The generated code is sandboxed, verified, and cached. If a transformation fails, Prism automatically retries with corrected logic — your agent doesn't need to handle errors or retry manually.

Capabilities

  • prism.refract — "group invoices by customer and sum totals" — natural language refraction with self-healing retries
  • prism.analyzeStructured reasoning over data: deductive, causal, comparative, and exploratory modes with evidence and confidence
  • prism.chart — Generate PNG charts served via CDN, SVG, sparklines, and summary statistics from any dataset
  • prism.focusBridge types between incompatible systems automatically (e.g. CRM leads to billing customers)
  • prism.render — Generate markdown, HTML, or text reports from structured data
  • prism.export — Convert between PDF, CSV, JSON, HTML, and markdown
  • prism.paginate — Navigate large result sets page by page with server-side caching

Looking for code analysis tools? See Invariant — semantic code analysis with deterministic reasoning.

Self-healing execution

When a generated transform encounters an edge case or unexpected data shape, Prism automatically analyzes the failure, corrects the logic, and retries — without surfacing the error to your agent. The corrected version is what gets cached, so the same edge case never fails twice.

Example: natural language transform

{
  "name": "data-grout@1/prism.refract@1",
  "arguments": {
    "goal": "group invoices by customer, sum totals, sort descending",
    "payload": [
      { "customer": "Acme", "amount": 500 },
      { "customer": "Globex", "amount": 300 },
      { "customer": "Acme", "amount": 200 }
    ]
  }
}

The generated transform is cached — identical requests execute instantly on repeat.

Progressive efficiency

The first time you describe a transformation, Prism uses AI to generate verified executable code. That code is cached by content hash. Every subsequent call with the same intent skips AI entirely and runs the cached transform deterministically — same input, same output, every time. Your agent gets smarter and cheaper the more it runs.

Composes with

Integration tools that return large datasets can pass cache_ref directly into prism.refract for inline refraction — no need to route data through the LLM first. Pipe chart output into Flow for automated reporting workflows, or use Data tools for deterministic pre-filtering before a refraction. Use discovery.perform with inline refraction to transform results at the point of execution.