Skip to main content
Glama

draw

Builds a dashboard on the user's screen from read-only SQL, datasets, charts, tables, and notes in one call.

Instructions

Draw a board on the user's screen in one call. items, in reading order:

  • a part: sql (one read-only SELECT), dataset or source, with an optional title. The chart is picked from its rows: dates with numbers → line, labels with numbers → bars, one row → headline numbers, else a table; rows like (date, name, value) get a line per name. Choose yourself with show, x, y, series and formats, or draw it with any component and props (its dataset is filled in).

  • {note, title?, tone?}: your text. Quote only figures you have read.

  • {row: [parts]} side by side; {section, subtitle?, items} a titled group. The database computes every number: aggregate, rebase and round in SQL. Put values the user may change in params (:name in the SQL) and add save_as to keep the board as a recipe, so the same board for other values is one recipe call. Returns the rows of each part (the first and last of long ones) to check. Components: Grid {columns?}: Places its children side by side in equal columns, wrapping to new rows. Section {title, subtitle?}: A titled group of children, stacked. Metric {label, dataset, field, row?, format?, caption?}: One headline number read from a dataset cell (row 0 unless row is set). LineChart {dataset, x, y, title?, format?}: Lines over x (dates or ordered labels), one line per y column. BarChart {dataset, x, y, title?, format?, horizontal?}: Bars per x category, one bar per y column. horizontal suits long labels. PieChart {dataset, label, value, title?, format?}: Donut of value by label; beyond 7 slices the rest are grouped as Other. Table {dataset, columns?, limit?, title?}: Rows of a dataset. columns picks and orders them (all when omitted): column names, or { field, label?, format? }. Note {text, title?, tone?}: Your explanation in plain text. Lines starting with '- ' become bullets; bold works. tone colours it. ActionButton {label, action, input?}: A button that runs one of the app's actions (see get_screen) with the given input. The app can add its own components; get_screen lists them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoReplace this board instead of adding one
itemsYes
titleYesMay use {param} to show a value
paramsNoValues for :name placeholders in the SQL; lists as arrays
save_asNoKeep as a recipe; params become its inputs
preview_rowsNoRows of each part returned to you (default: all of a small result, else the first 3 and the last)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and mostly delivers: it constrains SQL to a single read-only SELECT, states that every number is computed by the database, discloses the return behavior ('returns the rows of each part, the first and last of long ones'), and explains that save_as persists a reusable recipe. It does not address side effects like what happens to existing boards or any permission/rate constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action, then a bulleted item grammar and a component glossary, which is the right structure for a deeply nested schema. It is longer than ideal and the component glossary largely restates what the schema already documents (e.g. Note text/bullets/bold, tone), which is redundant weight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter tool with deep nesting and no output schema, the description covers the essentials: item shapes, chart auto-selection rules, SQL/params discipline, recipe reuse, return-value behavior, and an escape hatch via get_screen for custom components. Nothing an agent needs to construct a valid call is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 83%, so the baseline is 3; the description earns an extra point by explaining how params (:name placeholders) tie to SQL, how save_as turns params into recipe inputs, and how show/x/y/series/formats interact to pick a chart versus providing component+props. It adds genuine semantics beyond the field-level text, though it doesn't clarify id or preview_rows.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a precise verb+resource+scope: 'Draw a board on the user's screen in one call.' It then enumerates the item grammar concretely (part / note / row / section), so an agent knows exactly what the tool produces versus a read-only sibling like query_data or describe_data. It also points at get_screen for app-specific extensions, which sharpens its boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives actionable routing guidance: use recipe when the same board must be re-rendered for other param values, use get_screen to discover app actions/components, and 'aggregate, rebase and round in SQL' rather than post-processing. What's missing is an explicit statement of when to call draw versus show_board/list_boards, so the create-vs-view boundary is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.