Skip to Content
Vatson Office

Tools reference

The eleven tools, their inputs and what they return. Generated from the schemas the MCP server sends to the model.

The same eleven tools run in every host: the MCP server, the AI SDK and eve. Their names have no prefix; a host may add one (eve shows office__create_workbook, Claude Code shows mcp__office__create_workbook).

The descriptions below are the text the model reads. The inputs are the JSON Schema of each tool, flattened into tables. A field with ? is optional.

create_workbook

Create workbook. Writes a file. Create tool.

Create an Excel workbook (.xlsx) from a WorkbookSpec: sheets with cells, live formulas, tables, named ranges, number formats, conditional formats, validation and native charts. Returns the path of the saved file, the computed values to check, and findings to fix (spec issues, formula errors). Load the office-files skill before the first call. Never build a Excel file with bash, zip or code: call this tool; do not answer with the text in the chat when a file was asked for. Put only facts the person gave in the file: no years, periods, names, reasons, judgements or chart values they did not give. Missing figures, names or dates: ask once, or mark each: a label such as [[Cost line 1]] and an empty input cell, never a typed guess; never invent plausible data. The result gives today's date; fix its findings before you deliver the file.

Input

FieldTypeDescription
filename?string (max 120 chars)File name without folders, e.g. 'Cash plan 2027'. The .xlsx extension is added.
template?string (max 1,024 chars)Path of a .xlsx to copy the look of (theme, default font, header style, cell and table styles). Its writing style is checked too; call extract_style first
specobjectSee Workbook spec.

Result

The path of the saved .xlsx, a one-line summary (sheets, charts, formulas and how they were recalculated), the sheets as text with their computed values, today's date, the number of [[placeholders]] left, and findings to fix. A spec that fails its checks makes no file: the result is an error that lists what to fix.

create_deck

Create deck. Writes a file. Create tool.

Create a PowerPoint deck (.pptx) from a DeckSpec: slide kinds such as title, agenda, bullets, two columns, image, chart, table, comparison, KPIs, stat, timeline, cards (risks, next steps, a summary), decision, quote and closing, with a theme. Image src may be a file path. Returns the path of the saved file and findings to fix (spec issues, text that does not fit). Load the office-files skill before the first call. Never build a PowerPoint file with bash, zip or code: call this tool; do not answer with the text in the chat when a file was asked for. Put only facts the person gave in the file: no years, periods, names, reasons, judgements or chart values they did not give. Missing figures, names or dates: ask once, or write each as a marked placeholder such as [[Revenue, EUR]]; never invent plausible data. The result gives today's date; fix its findings before you deliver the file.

Input

FieldTypeDescription
filename?string (max 120 chars)File name without folders, e.g. 'Q3 review'. The .pptx extension is added.
template?string (max 1,024 chars)Path of a .pptx to copy the look of (theme, master, layouts and slide size). Its writing style is checked too; call extract_style first
specobjectSee Deck spec.

Result

The path of the saved .pptx, a summary (slide count, size and kinds), today's date, the number of placeholders, and findings such as text that does not fit. With a template, writing-style findings too.

create_document

Create document. Writes a file. Create tool.

Create a Word document (.docx) from a DocumentSpec: title, headings (three levels, real heading styles), paragraphs, bullet, numbered and clause (1.1.1) lists, definitions, tables, images with numbered captions, a table of contents, footnotes and endnotes, comments with replies, tracked changes, sections (landscape pages, own header and footer), page breaks. Image src: a data: URI or a file path (PNG, JPEG, SVG). Returns the path of the saved file and findings to fix. Load the office-files skill before the first call. Never build a Word file with bash, zip or code: call this tool; do not answer with the text in the chat when a file was asked for. Put only facts the person gave in the file: no years, periods, names, reasons, judgements or sections they did not give. Missing figures, names or dates: ask once, or write each as a marked placeholder such as [[Revenue, EUR]]; never invent plausible data. The result gives today's date; fix its findings before you deliver the file.

Input

FieldTypeDescription
filename?string (max 120 chars)File name without folders, e.g. 'Supplier review'. The .docx extension is added.
template?string (max 1,024 chars)Path of a .docx to copy the look of (styles, numbering, page setup, header and footer). Its writing style is checked too; call extract_style first
specobjectSee Document spec.

Result

The path of the saved .docx, a summary (pages, headings, tables), today's date, the number of placeholders, and findings. With a template, writing-style findings too.

write_csv

Write CSV. Writes a file. Create tool.

Write rows to a CSV file (UTF-8, RFC 4180 quoting). Text that a spreadsheet would run as a formula is written as text. Returns the path of the saved file. Use create_workbook instead when the person needs formulas, formats or charts. Write only rows and values the person gave. Column names the person gave go into header verbatim (same case and spelling; never capitalise them). No data given: ask once, or write the header and one row of marked placeholders such as [[Invoice number]]; never invent rows. The result gives today's date.

Input

FieldTypeDescription
filename?string (max 120 chars)File name without folders, e.g. 'Open invoices'. The .csv extension is added.
header?string[] (at most 500)Column names, written as the first row exactly as given. When the person named the columns, copy their names character for character: same case (lower case stays lower case), accents, spelling and order
rows((string | number | boolean | null)[])[] (at most 100,000)Data rows; each row is a list of cells. A number loses trailing zeros (1200.50 becomes 1200.5): send an amount whose decimals must stay as a string, or set decimals
delimiter?"," | ";" | "\t"Default ','. Use ';' when the reader's locale writes decimals with a comma
bom?booleanStart with a UTF-8 byte order mark so Excel reads accents correctly. Default: only when the text has non-ASCII characters
locale?string (min 2 chars, max 35 chars)BCP 47 tag; when set, numbers use that locale's decimal separator
decimals?"column" | (integer | null)[]Decimals of number cells: one count per column (null leaves a column as is), e.g. [null, 2] writes 1200.5 as 1200.50; or 'column' for each column's most decimals

Result

The path of the saved .csv and a summary (rows, columns, delimiter, byte order mark).

edit_workbook

Edit workbook. Writes a file. Edit tool.

Change an existing .xlsx in place of rebuilding it: set cells by ref or by column header and row label, insert or delete rows (formulas, ranges, tables and charts follow), add a sheet from a WorkbookSpec sheet, rename a sheet, point a chart at other data (update_chart: series by column header or range, categories, title). Formulas are recalculated. Everything you do not touch stays as it was. On a missing anchor it lists the closest matches and the sheet outline. Only for a file the person gave you (a file a create tool made is changed by calling that tool again with the fixed spec). Read the file with read_text or dryRun first, and anchor on text you saw there.

Input

FieldTypeDescription
pathstring (max 1,024 chars)Path of the .xlsx to change: an attachment path or a path a tool returned
planobjectThe edits, applied in order; the first that fails stops the plan and nothing is written
filename?string (max 120 chars)Name for the edited copy, saved where the create tools save files. Default: the original name
inPlace?booleanOverwrite the file at path; the original is kept once as <name>.bak.<ext>
dryRun?booleanCheck the plan and report the changes without writing a file

plan

The edits, applied in order; the first that fails stops the plan and nothing is written

FieldTypeDescription
opsobject[] (at least 1, at most 500)
recalc?"auto" | "never"auto: refresh formula results with LibreOffice when installed

plan.ops[] op: "set_cell"

FieldTypeDescription
op"set_cell"
sheetstring (max 31 chars)
ref?stringA1 ref, e.g. B4
column?string (max 255 chars)Header text of the column, instead of ref
row?string | integerRow label text (or row number), with column
value?string | number | boolean | nullNumber, text, true/false, or null to clear. YYYY-MM-DD text becomes a date
formula?string (max 8,192 chars)Formula with or without =, English names, commas
style?object

plan.ops[] op: "insert_rows"

FieldTypeDescription
op"insert_rows"
sheetstring (max 31 chars)
before?integer | stringRow number or row label the new rows go above
after?integer | stringRow number or row label the new rows go below
count?integer (min 1, max 1,000)Default: the number of rows in values, or 1
values?((string | number | boolean | null | object)[])[] (at most 1,000)Cells of each new row, from column A (or startColumn)
startColumn?string
copyStyle?booleanNew rows take the formats and formulas of the row above

plan.ops[] op: "delete_rows"

FieldTypeDescription
op"delete_rows"
sheetstring (max 31 chars)
rowinteger | stringFirst row to delete: number or row label
count?integer (min 1, max 10,000)

plan.ops[] op: "add_sheet"

FieldTypeDescription
op"add_sheet"
sheetobjectA sheet from WorkbookSpec
position?integer (min 1)1-based tab position; default last

plan.ops[] op: "rename_sheet"

FieldTypeDescription
op"rename_sheet"
sheetstring (max 31 chars)
tostring (max 31 chars)

plan.ops[] op: "update_chart"

FieldTypeDescription
op"update_chart"
sheetstring (max 31 chars)Sheet that holds the chart
chart?integer | string1-based chart on the sheet, or its title
title?string (max 200 chars)New chart title
categories?string (max 300 chars)Category labels: an A1 range ("A4:A9", "Data!A4:A9") or a column header
series?object[] (at least 1, at most 20)New series in order, replacing the chart's; series left over are removed. Colours and axes stay

Result

The edited .xlsx (a new file, or the same file with inPlace and a .bak copy), the list of changes, the parts that changed, and recalculated values. Everything the plan does not touch stays byte-identical. An anchor that is not found comes back with the closest matches.

edit_document

Edit document. Writes a file. Edit tool.

Change an existing .docx without rebuilding it: replace text keeping its formatting, fill {{placeholders}}, insert DocumentSpec blocks before or after a heading or paragraph, delete a section or paragraph. Set track to record the edits as tracked changes. Everything you do not touch stays as it was. On a missing anchor it lists the closest headings. Only for a file the person gave you (a file a create tool made is changed by calling that tool again with the fixed spec). Read the file with read_text or dryRun first, and anchor on text you saw there.

Input

FieldTypeDescription
pathstring (max 1,024 chars)Path of the .docx to change: an attachment path or a path a tool returned
planobjectThe edits, applied in order; the first that fails stops the plan and nothing is written
filename?string (max 120 chars)Name for the edited copy, saved where the create tools save files. Default: the original name
inPlace?booleanOverwrite the file at path; the original is kept once as <name>.bak.<ext>
dryRun?booleanCheck the plan and report the changes without writing a file

plan

The edits, applied in order; the first that fails stops the plan and nothing is written

FieldTypeDescription
opsobject[] (at least 1, at most 500)
track?objectRecord the edits as tracked changes by this author

plan.ops[] op: "replace_text"

FieldTypeDescription
op"replace_text"
findstring (max 2,000 chars)
replacestring (max 4,000 chars)
all?boolean
matchCase?boolean
within?string (max 500 chars)Only inside the section under this heading

plan.ops[] op: "fill_placeholders"

FieldTypeDescription
op"fill_placeholders"
valuesrecordName -> text, fills {{Name}} and [[Name]]

plan.ops[] op: "insert_blocks"

FieldTypeDescription
op"insert_blocks"
anchor?objectDefault: the end of the document
position?"before" | "after" | "section_end"section_end: after the last block of the anchor heading's section
blocksobject[] (at least 1, at most 200)DocumentSpec blocks

plan.ops[] op: "delete_section"

FieldTypeDescription
op"delete_section"
headingstring (max 500 chars)
occurrence?integer (min 1)

plan.ops[] op: "delete_paragraph"

FieldTypeDescription
op"delete_paragraph"
anchorobjectDefault: the end of the document

plan.ops[] op: "replace_paragraph"

FieldTypeDescription
op"replace_paragraph"
anchorobjectDefault: the end of the document
textstring | (string | object)[]New text; keeps the paragraph's style and its first run's formatting

plan.track

Record the edits as tracked changes by this author

FieldTypeDescription
authorstring (max 100 chars)
date?stringISO date-time; default now

Result

The edited .docx and the list of changes; with track, the changes are Word tracked changes.

edit_deck

Edit deck. Writes a file. Edit tool.

Change an existing .pptx without rebuilding it: replace text, set the text of a placeholder or shape keeping its formatting, add a slide from a DeckSpec slide on the deck's own layouts, delete or move slides, update a chart's categories and series. Everything you do not touch stays as it was. On a missing anchor it lists the slides and shapes. Only for a file the person gave you (a file a create tool made is changed by calling that tool again with the fixed spec). Read the file with read_text or dryRun first, and anchor on text you saw there.

Input

FieldTypeDescription
pathstring (max 1,024 chars)Path of the .pptx to change: an attachment path or a path a tool returned
planobjectThe edits, applied in order; the first that fails stops the plan and nothing is written
filename?string (max 120 chars)Name for the edited copy, saved where the create tools save files. Default: the original name
inPlace?booleanOverwrite the file at path; the original is kept once as <name>.bak.<ext>
dryRun?booleanCheck the plan and report the changes without writing a file

plan

The edits, applied in order; the first that fails stops the plan and nothing is written

FieldTypeDescription
opsobject[] (at least 1, at most 500)

plan.ops[] op: "replace_text"

FieldTypeDescription
op"replace_text"
findstring (max 2,000 chars)
replacestring (max 4,000 chars)
slide?integer | stringDefault: every slide
matchCase?boolean
notes?booleanAlso replace in speaker notes

plan.ops[] op: "set_text"

FieldTypeDescription
op"set_text"
slideinteger | stringDefault: every slide
shapeobject
textstring | (string | object)[]New text; an array gives one paragraph each

plan.ops[] op: "add_slide"

FieldTypeDescription
op"add_slide"
slideobjectA DeckSpec slide
position?integer (min 1)1-based position of the new slide; default last
layout?string (max 200 chars)Layout name from the outline; default: matched to the slide kind

plan.ops[] op: "delete_slide"

FieldTypeDescription
op"delete_slide"
slideinteger | stringDefault: every slide

plan.ops[] op: "move_slide"

FieldTypeDescription
op"move_slide"
slideinteger | stringDefault: every slide
tointeger (min 1)

plan.ops[] op: "update_chart"

FieldTypeDescription
op"update_chart"
slideinteger | stringDefault: every slide
chart?integer | string1-based chart on the slide, or its title
categoriesstring[] (at least 1, at most 24)
seriesobject[] (at least 1, at most 6)

Result

The edited .pptx and the list of changes. New slides use the deck's own layouts and theme colours.

read_text

Read file as text. Reads only. Inspect tool.

Read the text of a .docx, .xlsx, .pptx or .csv file, such as a file the person attached. Sheets come back as rows of cells, decks slide by slide with speaker notes. Hidden sheets, rows, slides, text and comments are marked as hidden. Give either a path (inside the folders this server may read: the working directory, ./office-output) or the file content as base64.

Input

FieldTypeDescription
path?string (max 4,096 chars)Path of the file; relative paths start at the server's working directory
base64?stringThe file content as base64, when there is no path
kind?"docx" | "xlsx" | "pptx" | "csv"A hint; the file's bytes decide when they clearly say otherwise

Result

One line that names the file, its kind and length, whether the text was cut and which hidden content it has, then the text. Workbooks come back sheet by sheet as rows of cells, decks slide by slide with speaker notes, documents in reading order.

preview_file

Preview file. Reads only. Inspect tool.

Check the layout of a .pptx, .xlsx or .docx you created before you give it to the person: text that does not fit its box, cut-off cells, empty or off-centre slides, empty charts, formula errors, a lonely last page. Returns an outline of each slide, sheet or page and findings with a fix for each. Set images: true to also see PNGs of the pages (vision models only).

Input

FieldTypeDescription
pathstring (max 1,024 chars)Path of the .pptx, .xlsx or .docx, as a create tool returned it
pages?string (max 40 chars)Slides or pages to return images of, e.g. '1-3' or '2,5'. Default: the first six
images?booleanAlso return PNG images of the slides or pages, for a model that reads images. Default false

Result

An outline per slide, sheet or page and layout findings, each with the spec change that fixes it. The result says which level ran (1, 1.5 or 2). With images, PNG images of up to six pages.

extract_style

Read the style of a file. Reads only. Inspect tool.

Read the style of an example .docx, .pptx or .xlsx: fonts, colours, headings, page or slide layouts, and how its text is written. Returns rules to follow. Then pass the same file as template to the create tool of that kind.

Input

FieldTypeDescription
pathstring (max 1,024 chars)Path of a .docx, .pptx or .xlsx whose style to copy, e.g. a file the person attached

Result

Up to 25 plain rules for the file's look and writing, and the full style profile. Pass the same file as template to a create tool.

export_pdf

Export to PDF. Writes a file. Inspect tool.

Export a .pptx, .xlsx or .docx to a PDF saved next to the made files. Needs LibreOffice for documents and workbooks; decks are drawn as images without it.

Input

FieldTypeDescription
pathstring (max 1,024 chars)Path of the .pptx, .xlsx or .docx
pages?string (max 80 chars)Pages or slides to export, e.g. '1-3,5'. Default: all
pdfA?booleanPDF/A-2b for archiving. Default false

Result

The path of a .pdf next to the made files. LibreOffice renders it (PDF/A-2b with pdfA); without LibreOffice, a deck is drawn as images and other kinds return an error.

On this page