SpecifyDocs

convert_csv_to_chart

tools/call

Draw a CSV table as a bar, line or donut chart in Specify's styling, as PNG or SVG, and save it in Files. The first text column labels the chart and every numeric column is a series. Each run uses credits: call without maxCredits to see the price and your balance, then call again with maxCredits to run it. Returns the saved file's Files id when the job finishes, or a jobId to read with convert_job.

Scopes

execute:convert

Each run spends credits. The key's owner must still hold Run processing when it is used. A job the person or another key started also needs read:files to read. A Convert request or output is never a Design file, so the Files rule for Design files (read:design) does not apply. A file the key cannot open itself still opens read only when it is attached to an item the key can read, with read:files; the item's read scopes apply: a task needs read:projects; a memory needs read:memory, and read:agent_sessions when it was recorded from an agent session; a document follows its owner's document scopes; a skill is the key owner's own personal skill and needs read:skills; briefings and written briefings are attached by their author in Specify.

Inputs

csvstringRequired
CSV table with a header row, as text. At most 900 KB.
kind"bar" | "line" | "donut"
Chart type. A donut charts the first value column.
titlestring
The chart title and file name. Defaults to Chart.
theme"light" | "dark"
Light or dark styling.
format"png" | "svg"
File type.
legendboolean
Show the series key.
valuesboolean
Write the values on the chart.
smoothboolean
Draw a line chart's lines as curves.
backgroundboolean
Fill the theme's background. Off leaves it transparent.
maxCreditsinteger
The most credits this job may use. Without it the tool only says what the job costs and spends nothing.
idempotencyKeystring
Send the same key when you retry, and the first job is returned instead of a second.

Returns

Without maxCredits: the price in credits, your balance and whether it is enough; nothing is spent. With maxCredits: the job's state, the credits it used and the saved file's Files id, or the jobId while it still runs. A call returns content[0].text with the JSON result and structuredContent.result with the same value.

Listed when

The key holds execute:convert. Each job's tool is listed once the job is set up.