Skip to content

Reference

MCP tools

Every tool, prompt and resource the Artiwright MCP server provides, with their parameters.

MCP tools.md

The Artiwright MCP server gives an agent twelve tools, two prompts and the skill guides as resources. Agents learn the tools from the server itself; this page is for you, to know what they do.

To Use Changes the document
Start from an existing file or template artiwright_open Creates it in the session
Load a CSV or table export into a workbook artiwright_import Yes, one undo step
Build or change a deck or workbook artiwright_run Yes, one undo step
Change a deck without writing code artiwright_apply Yes, one undo step
Read what’s on the slides or sheets artiwright_inspect No
See slides or sheets as images artiwright_render No
Find problems to fix artiwright_lint No
Check and save the finished file artiwright_finalize No (writes a new file)
See what’s in the session artiwright_status No
Step back or forward artiwright_undo, artiwright_redo Yes
Look up the API artiwright_help No

The usual loop is run → render → lint → run (fix) → finalize. The server sends this loop to the agent as its instructions.

Every tool but artiwright_help takes these two:

Parameter Type Default Description
session string "default" One per conversation or task. Documents in a session persist between calls.
document string "deck" The document inside the session. "workbook" when the session only has a workbook.

artiwright_status takes only session. Slide numbers in these tools count from 1.

Opens an existing .pptx or .xlsx, or a .potx / .xltx template, into the session, to edit it or build on it. Edits keep everything the agent doesn’t change, and finalize writes a new file, never the original.

Parameter Type Required Description
path string one of path, content Absolute path of the file. Allowed over stdio; off over HTTP.
content string one of path, content The file’s bytes in base64.
template boolean no Decks: start without the file’s slides, keeping its theme, masters and layouts. New slides use the template’s own layouts.

Files are limited to 300 MB. With template: true, the result lists the sample slides that were dropped and the layouts available.

Loads a data export into a sheet of a workbook in the session: CSV, TSV, a Markdown table or an HTML table. Numbers, percentages, currency and dates become typed values in the format they were written in, and the rows become an Excel table the agent can use in formulas. Creates the workbook if needed; one call per file, each on its own sheet. Use it instead of reading a file and typing its rows into code.

Parameter Type Required Description
path string one of path, content Absolute path of the .csv, .tsv, .txt, .md or .html file. Allowed over stdio; off over HTTP.
content string one of path, content The file’s text.
sheet string no Sheet to write into, created if missing. Default: the file’s name.
at string no Top-left cell. Default "A1".
table boolean | string no Make the rows an Excel table: true (named after the file, the default), a name, or false.
dates "mdy" | "dmy" no How to read dates like 03/04/2026. ISO dates always work.
theme string no Preset when the call creates the workbook.

Files are limited to 50 MB.

Runs JavaScript against a document and saves it. A call that throws changes nothing.

Parameter Type Required Description
code string yes The body of an async function. return a value to see it.
kind "presentation" | "workbook" no What a new document is. An existing document keeps its kind. Default "presentation".
size "16:9" | "4:3" no Slide size, when the call creates the deck.
theme string no Preset for a new document: classic, spruce, ledger, studio, coast. Ignored if the app set a theme or the document exists.

In scope for a deck: deck, compose, h, createRef, the layout recipes (TitleSlide, SectionDivider, TitleBullets, TwoColumns, KpiCards, BigNumber, Quote, ImageText, ChartTakeaway, TwoCharts, ComparisonTable, Agenda, Timeline, ProcessSteps, TeamGrid, ProsCons, Matrix2x2, BeforeAfter, PricingTiers, Faq, Closing), artiwright (the whole library; pw, its older name, still works) and help.

In scope for a workbook: workbook and xl (the spreadsheet library). Formulas calculate as the code runs.

Returns: the returned value, the anchors added and removed, the slide count, and lint counts, plus a note when the run read an option under its right name (fontSize on a table as textStyle.size) or the theme changed after slides were built.

// code
const s = deck.slides.add();
compose(s, h(KpiCards, { title: "Q3", kpis: [{ label: "Revenue", value: "$87M" }] }));
return s.id;

The code runs in a sandbox: no network, no other files, and a 60-second limit.

The same changes as artiwright_run, as a list of JSON operations instead of code, for clients that can’t run code.

Parameter Type Required Description
ops object[] yes Operations in order, each { target, op, args }.
  • target: "deck", an anchor ("sl_…", "sh_…") or a dotted path ("sl_….shapes").
  • op: a method (add, update, replaceText, remove, connect, …) or "=name" to set a property.
  • { "$result": n } in args or as the target stands for what operation n returned.
[
{ "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" }] }
]

Returns the document as NDJSON records with anchors: deck, slide, text, shape, image, table, chart, notes, thread. Text records carry the box, the wrapped line count, the font size and an overflow flag.

Parameter Type Required Description
kind string no Comma-separated record kinds, e.g. "slide,text".
slide string | number no A slide anchor or number.
search string no A case-insensitive regex over the records.
target string no An anchor: the records around it.
maxChars number no Output budget. Default 12000.
sheet string no Workbooks: one sheet by name.
range string no Workbooks: cells and formulas in a range, e.g. "A1:F20".

Draws slides or sheets as PNG images, so the agent can see them.

Parameter Type Required Description
slides number[] no Slide numbers (at most 6). Without it: one contact sheet of the whole deck.
sheets string[] no Workbooks: sheet names. Default: every sheet.
range string no Workbooks: the cells to draw, e.g. "A1:H30". Default: everything used.

Checks the document on its rendered layout. Each finding has the slide, the anchor to fix and a suggested fix.

Parameter Type Required Description
rules string no Rule ids or prefixes, e.g. "text/,a11y/contrast". Default: every rule.
severity "error" | "warn" no Only findings of this severity.
slide string | number no One slide.

Decks are checked for text overflow, elements off the slide or overlapping, small text, contrast, placeholder text, distorted or blurry images, substituted fonts, too many fonts, empty chart titles and loose connectors. Workbooks are checked for formula errors and other workbook rules. The full list is in check and finalize.

Checks the real file and publishes it: into the folder the user works in, for an app’s local server started without --root, else into the session’s outputs/ folder. Never overwrites; if the name is taken, the answer suggests a free one.

Parameter Type Required Description
file string no File name, e.g. "q3-review.pptx". Default <document>-v<version>.pptx (or .xlsx). Saving into the user’s folder, it can also be a path where the user asked for the file: relative to that folder, absolute, or starting with ~/.
requirements object no What the file must contain (below).

Requirements for decks: slideCount (exact number of slides), nativeCharts and nativeTables (slides or anchors that must hold them), tableTotals (total rows that must add up), fonts (allowed families), lint (which severities block, and findings to waive).

Requirements for workbooks: sheets and tables that must exist, charts (at least this many), values (key cells and what they must equal, e.g. [{ "cell": "Checks!B2", "equals": 0 }]).

Checks: Office file validation, package integrity, your requirements, chart data, lint errors (unless waived), and a re-read of the written file. Returns: the path, its SHA-256, and what blocked publication, if anything.

Numbers from the workbook: when the session also holds a workbook, a deck’s numbers are checked against it. A table or text box made largely of figures that are not in any workbook blocks publication: they were typed, not read from the model. A few scattered numbers it can’t find (often figures the deck works out, like a difference) come back as warnings to check. Rounding, k/M/B, models kept in thousands, percentages and column or row totals all count as found; IDs, dates and years are not checked. Waive the check with "lint": { "waive": ["numbers/untraced"] }.

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

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

Redoes the last undone change to a document.

Looks up the API from a generated catalog.

Parameter Type Required Description
query string no A path ("slide.charts.add", "KpiCards"), a value list ("layouts", "colors", "lintRules"), "guides", "guide charts", or "skill presentations" / "skill spreadsheets" for the full guide. Several at once, comma-separated. Empty for an overview.
search string no A regex over the whole catalog.
maxChars number no Output budget.
Prompt What it gives the agent
presentations The presentations guide: how to plan, build, check and publish a deck.
spreadsheets The spreadsheets guide: how to plan, build, check and publish a workbook.

The same guides, with their reference pages (charts, tables, diagrams, code and math, editing, storytelling, writing, review, themes and more), as resources under artiwright://skills/…. Agents can also reach them through artiwright_help ("skill presentations", "guides", "guide charts").