Artiwright

v0.13.20
io.github.bvenu17/artiwright Checked 17 hours ago Published 17 hours ago

Create PowerPoint decks and Excel workbooks with live charts, tables and formulas.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

artiwright_run Run deck or workbook code

Runs JavaScript against a document in the session and saves it. For a workbook (kind "workbook") the code has `workbook` (a Workbook: workbook.sheets.add("Model"), sheet.range("A1").values = [[…]], range.formulas = "=B2*1.1", format, tables, conditionalFormats, validations, charts) and `xl` (the spreadsheet library) in scope; formulas compute as you go. For a deck the code is the body of an async function with `deck` (a Presentation), `h`, `compose`, `createRef`, the layout recipes (TitleSlide, SectionDivider, TitleBullets, TwoColumns, KpiCards, BigNumber, Quote, ImageText, ChartTakeaway, Co…

ParameterTypeDescription
code *stringBody of an async function. `return` a value to see it.
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
kindstringWhat a new document is: "presentation" (default) or "workbook". An existing document keeps its kind.
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".
sizestringSlide size when the call creates the deck.
themestringTheme preset when the call creates the document: classic, spruce, ledger, studio, coast. Ignored when the app set a theme (artiwright_status shows it) or the document exists.

artiwright_apply Apply JSON ops

Changes a deck with JSON ops instead of code, as one undo step. Each op is { target, op, args }: target is "deck", an anchor ("sl_…", "sh_…") or a dotted path ("sl_….shapes"); op is a method (add, update, replaceText, remove, connect …) or "=name" to set a property. { "$result": n } in args or as the target stands for what op n returned. Example: [{ "target": "deck.slides", "op": "add", "args": [{ "layout": "title-only", "title": "Q3" }] }, { "target": [{ "$result": 0 }, "shapes"], "op": "add", "args": [{ "frame": { "x": 80, "y": 200, "w": 400, "h": 80 }, "text": "Hi" }] }].

ParameterTypeDescription
ops *arrayThe ops, in order.
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".

artiwright_inspect Inspect a deck

Returns the deck as NDJSON records with anchors: deck, slide, text, shape, image, table, chart, notes, thread. Text records carry the box, wrapped line count, font size and an overflow flag. Filter with kind, slide, search or target (records around an anchor).

ParameterTypeDescription
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
kindstringComma-separated kinds, e.g. "slide,text".
maxCharsnumberOutput budget (default 12000).
rangestringWorkbooks: only cells and formulas in this range, e.g. "A1:F20".
searchstringCase-insensitive regex over the records.
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".
sheetstringWorkbooks: one sheet by name.
slidestring | numberSlide anchor or 1-based number.
targetstringAn anchor: return the records around it.

artiwright_render Render slides

Renders slides as PNG images so you can see them. Without `slides` it returns one contact sheet of the whole deck; with slide numbers it returns those slides (at most 6).

ParameterTypeDescription
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
rangestringWorkbooks: the cells to draw, e.g. "A1:H30" (default: everything used).
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".
sheetsarrayWorkbooks: sheet names (default every sheet).
slidesarray1-based slide numbers.

artiwright_lint Lint a deck

Checks the deck on the rendered layout: text overflow, off-slide or overlapping elements, small text, contrast, placeholder text, distorted or blurry images, fonts, chart titles, connectors. Each finding has the slide, the anchor to fix and a suggested fix.

ParameterTypeDescription
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
rulesstringRule ids or prefixes, e.g. "text/,a11y/contrast".
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".
severitystring
slidestring | number

artiwright_help API help

Looks up the Artiwright API: a path ("slide.charts.add", "ShapeOptions.textBox", "KpiCards"), a value list ("layouts", "geometries", "colors", "lintRules"), or a search. "skill presentations" (or "skill spreadsheets") returns the full working guide: read it before your first document. "guides" lists the skill's guides and "guide charts" returns one (charts, tables, diagrams, code-and-math, editing, storytelling, review, …). Ask for several topics at once, comma-separated ("KpiCards, ChartTakeaway, guide charts"). Call it with no query for an overview.

ParameterTypeDescription
maxCharsnumber
querystring
searchstringRegex over the whole catalog.

artiwright_finalize Finalize and publish

Checks the real .pptx (or .xlsx) and saves it into the user's folder (/tmp): Open XML validation, package integrity, your requirements, chart data, lint errors (unless waived) and a re-read of the written file. Never overwrites. Returns the path, sha256 and what blocked publication, if anything.

ParameterTypeDescription
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
filestringFile name that says what it is, e.g. "q3-review.pptx" or "model.xlsx", or a path where the user asked for it (relative to their folder, or absolute). Default "<document>-v<version>.pptx" (or .xlsx).
requirementsobject
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".

artiwright_import Import a CSV or table file into a workbook

Loads a data export (CSV, TSV, a Markdown or HTML table) into a sheet of a workbook in the session, as typed values: numbers, percentages, currency and dates become real values in the format they were written in, and the rows become an Excel table you can use in formulas (SUMIFS(Sales[Amount], …)). Use it instead of reading a file and typing its rows into code. Creates the workbook if it doesn't exist; call it once per file. Give an absolute `path`, or `content` as text.

ParameterTypeDescription
atstringTop-left cell. Default "A1".
contentstringThe file's text, instead of a path.
datesstringHow to read dates like 03/04/2026: month first ("mdy", default) or day first ("dmy"). ISO dates (2026-03-04) always work; "iso" means the default.
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
pathstringAbsolute path of the .csv, .tsv, .txt, .md or .html file.
replacebooleanEmpty the sheet first, to load a newer version of the same data over the old one. Default false.
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".
sheetstringSheet to write into (created if missing). Default: the file's name.
tableboolean | stringMake the rows an Excel table: true (named after the file, the default), a name, or false.
themestringTheme preset when the call creates the workbook: classic, spruce, ledger, studio, coast.

artiwright_open Open an existing deck, workbook or template

Opens an existing .pptx or .xlsx (or a .potx / .xltx template) into the session as a document, to edit it or to build on it. Give an absolute `path`, or the file's `content` in base64. A deck is the `deck` variable in artiwright_run, a workbook the `workbook` variable. With template: true a deck starts without the file's slides; slides.add({ layout }) then uses the template's own layouts (by key such as "title-and-content" or by the name PowerPoint shows). Edits keep everything you do not change; artiwright_finalize writes a new file, never the original.

ParameterTypeDescription
contentstringThe file's bytes in base64, instead of a path.
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
pathstringAbsolute path of the .pptx, .potx, .xlsx or .xltx to open.
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".
templatebooleanDecks: start without the file's slides, keeping its theme, masters and layouts.

artiwright_status Session status

Lists the session's documents with slide counts, versions, undo state, themes and published files, and the theme the app set for new documents.

ParameterTypeDescription
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".

artiwright_undo Undo

Undoes the last change to a document (one artiwright_run or artiwright_apply call is one step).

ParameterTypeDescription
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".

artiwright_redo Redo

Redoes the last undone change to a document (one artiwright_run or artiwright_apply call is one step).

ParameterTypeDescription
documentstringDocument name inside the session. Default "deck" (or "workbook" when the session only has a workbook).
sessionstringSession id (one per chat or task). Default "2026-12-02-0658-217e".