Skip to content

Variable: chartPlannerRequestSchema

const chartPlannerRequestSchema: ZodObject<{ data: ZodReadonly<ZodArray<ZodRecord<ZodString, ZodUnknown>>>; description: ZodOptional<ZodString>; title: ZodString; }, $strip>

Canonical planner input shape. Tools that source rows from an inline dataset (render_data) use it as their inputSchema verbatim; tools that resolve rows from a remote (prepare_chart over a Genie statement) omit({ data }) and extend with their own identifier field, so the field-level .describe() text stays a single source of truth. Server-only - the UI never sees a planner request, only the resolved Chart.

  • title: Concise title shown above the chart (e.g. “Top 10 SKUs by Revenue”).
  • description (optional): One-line intent the chart-planner uses when picking a chart type and axis encodings (e.g. “compare quarterly revenue across regions”, “highlight the steep drop after position 5”). Not shown to the user.
  • data: Tabular dataset to chart. One object per row, keyed by column name. Values may be strings, numbers, booleans, or null. The chart-planner decides which columns are categories vs. numeric series. Cap at a few hundred rows for legibility; sample / aggregate larger datasets first.