Tools
Everything an agent can do, as this server describes it to agents (MCP tools/list, or GET /api). 45 tools. Arguments are JSON; ids, refs and copy keys are strings.
whoami
Who this token acts for, and the documents they can open.
guide
How Word Made works, for agents: topics overview (start here), layout (elements and their properties, hiccup, custom elements), files (the document's files), copy, assets (images, fonts, renditions), versions (branches, snapshots, restore, merge, fork), recipes.
| Argument | Type | What it is |
|---|---|---|
topic | overview | layout | files | copy | assets | versions | recipes |
list_docs
Documents you can open, newest first.
create_doc
A new document with one starter page, owned by you. Any page size: {w h unit} with unit mm, px, pt, cm or in (A4 portrait: 210 x 297 mm; a 16:9 deck: 1920 x 1080 px). The design is entirely the document's: change tokens.edn, fonts.edn, lib/ and pages/ freely.
| Argument | Type | What it is |
|---|---|---|
title required | string | |
langs | array | Language codes, e.g. ["en", "it"] (default ["en"]). |
page | object |
get_doc
A document's overview: title, languages, page size, pages in order (with their files), branches, snapshots, links to its PDFs.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
list_files
The document's files (doc.edn, tokens.edn, fonts.edn, assets.edn, framing.edn, copy/<lang>/*.edn, lib/**/*.clj, pages/*.clj, notes/*).
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
read_file
One file's text (at a version).
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
path required | string | |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
write_file
Creates or replaces a file (one new version). EDN and Clojure must parse. To add a page use add_page (it also lists it in doc.edn).
| Argument | Type | What it is |
|---|---|---|
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
message | string | What changed, for the history (optional). |
doc required | string | Document id, or its link (https://.../d/<id>). |
path required | string | |
text required | string |
edit_file
Replaces text in a file: old must occur exactly once (or set all). The best way to change one thing in a page, a style or a component.
| Argument | Type | What it is |
|---|---|---|
message | string | |
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
path required | string | |
new required | string | |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
old required | string | |
all | boolean | |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
doc required | string | Document id, or its link (https://.../d/<id>). |
delete_file
Removes a file.
| Argument | Type | What it is |
|---|---|---|
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
message | string | What changed, for the history (optional). |
doc required | string | Document id, or its link (https://.../d/<id>). |
path required | string |
apply_ops
Several changes as one version, all or nothing. ops_edn is an EDN vector of ops: [:put path text] [:edit path old new] [:delete path] [:move from to] [:set path [k ...] value] [:unset path [k ...]] [:copy :en :key "text"] [:copy-unset :en :key] [:link :key :en] [:unlink :key :en] [:flag-clear :key :en] [:asset :img/x {:blob sha :file name}] [:asset :img/x {...} :it] [:asset-unset :img/x] [:frame :img/x {:scale 1.2 :center [0.5 0.4]}] [:page-add :p21 source index] [:page-move :p21 3] [:page-delete :p21] [:settings :title "..."].
| Argument | Type | What it is |
|---|---|---|
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
message | string | |
doc required | string | Document id, or its link (https://.../d/<id>). |
ops_edn required | string |
get_copy
The words: copy keys and values per language (all languages, or one), optionally only keys starting with a prefix such as p08/. Also linked (key -> the languages that share one value) and flags (key -> language -> the language it is older than), when there are any.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
lang | string | |
prefix | string | |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
set_copy
Sets copy in one language: entries {"p08/headline": "And those who *saw them pass.*"}. Markup: **strong**, *em*, newline for a line break. null means this language leaves the element out. Keys go to the file that holds them, new keys to copy/<lang>/<key namespace>.edn. Use entries_edn for structured values (lists, maps). A language linked to a key's shared value changes it for every linked language. A change flags the other languages that have their own text as stale (copy_status); updating one clears its flag.
| Argument | Type | What it is |
|---|---|---|
message | string | |
lang required | string | |
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
remove | array | |
entries_edn | string | |
entries | object | |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
doc required | string | Document id, or its link (https://.../d/<id>). |
link_copy
Links copy keys across languages: linked languages share one value (a name, a brand, a number), so a change in one is a change in all. A language with no shared value yet gives its own (link en first, then the others follow it). unlink true gives a language its own copy of the shared text, to translate separately. Partial links are fine (en and it share, hy has its own).
| Argument | Type | What it is |
|---|---|---|
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
message | string | |
doc required | string | Document id, or its link (https://.../d/<id>). |
key required | string | |
langs required | array | |
unlink | boolean |
keep_copy
Clears stale flags: the languages keep their own text for a key as it is ("seen it, mine stays"). To update instead, set_copy the language: that clears its flag too.
| Argument | Type | What it is |
|---|---|---|
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
message | string | |
doc required | string | Document id, or its link (https://.../d/<id>). |
key required | string | |
langs required | array |
copy_status
What needs translating: per language, the copy keys whose text is older than another language's (key, changed-in), and how many keys are linked.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
add_page
Adds a page: its Clojure source (a namespace defining (page c a)), placed at index (0-based; default last).
| Argument | Type | What it is |
|---|---|---|
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
message | string | What changed, for the history (optional). |
doc required | string | Document id, or its link (https://.../d/<id>). |
id required | string | e.g. p21 or cover |
source required | string | |
index | integer |
move_page
Moves a page to index (0-based). Page numbers follow the order.
| Argument | Type | What it is |
|---|---|---|
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
message | string | What changed, for the history (optional). |
doc required | string | Document id, or its link (https://.../d/<id>). |
id required | string | |
index required | integer |
delete_page
Removes a page (its file and its place in doc.edn). History keeps it.
| Argument | Type | What it is |
|---|---|---|
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
base | string | Optional: the version you read (genesis.38). The change fails if the branch has moved on since (otherwise it applies to the latest version). |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
message | string | What changed, for the history (optional). |
doc required | string | Document id, or its link (https://.../d/<id>). |
id required | string |
list_assets
Images, fonts and other raw files the document uses: id, original name, format, size in px, bytes, and a link to the exact raw file.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
font_info
What is inside a font the document has: format (ttf, otf, collection, woff, woff2), outlines (truetype, cff), and per face its family, style, weight, italic, variation axes with ranges, named instances, characters per script (latin, cyrillic, greek, arabic, cjk, ...), license, and a fonts.edn line that uses it. For a collection, pick a face with {:font :font/x :face n}.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
asset | string | Asset id, e.g. font/display. |
blob | string | Or the blob sha. |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
upload_asset
Adds a raw file (photo, camera raw, TIFF, PSD, HEIC, SVG, PDF, font, anything) and points an asset id at it. Give url (the server downloads it) or data_base64 (small files); with neither you get an upload link for curl (any size; the raw is kept exactly as uploaded, delivery renditions are made by rule).
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
asset | string | Asset id, e.g. img/cover or font/display. |
filename | string | |
lang | string | Optional: only for this language. |
url | string | |
data_base64 | string | |
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
add_font
Adds a font to a family (fonts.edn) in one version: the font file (url, data_base64, or an asset already uploaded with upload_asset) and the family's entry. Any format: TTF, OTF, collections (face), WOFF, WOFF2. A variable font covers every weight; for static fonts add each weight. Refused, with the reason: not a font, a face the collection lacks, a slot the family already has (unless replace).
| Argument | Type | What it is |
|---|---|---|
url | string | |
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
asset | string | Asset id (default font/<family>); an existing one when no file is given. |
face | integer | For collections (TTC/OTC): which face, from 0. |
replace | boolean | Change a slot the family already has. |
style | upright | italic | Default upright. |
family required | string | Family name styles use, e.g. sans, display. |
data_base64 | string | |
filename | string | |
at | string | Optional: the version you are changing ("genesis.12"). If it is the latest of a branch the change goes there; if it is older, a new branch with a generated name (eden, babel, ...) is made from it and the change goes there, so history is never rewritten. The result names the branch (branch, branched-from). |
doc required | string | Document id, or its link (https://.../d/<id>). |
weight | integer | For static fonts: the weight this file is (400, 700, ...). |
render_page
Draws one page as a picture to look at (a PNG, width px, default 1200). Also says which copy keys and assets the page used, or the error with its file and line.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
page required | string | Page id (p08) or number (8). |
lang | string | |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
width | integer |
check
Checks every page in every language: code errors (with file and line), missing copy or assets, copy keys one language has and another lacks. draw true also draws every page (slower, catches layout errors Typst reports).
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
draw | boolean |
build_pdf
Builds the PDF of a language and edition (print: raw images; email: images sized to their frames) and returns a download link (valid 7 days). Built once per version.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
lang | string | |
edition | string | |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
history
Versions, newest first: who changed what, through which tool, on which branch. Filter by branch or file path.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
branch | string | |
path | string | |
limit | integer | |
before | integer |
diff
What changed between two versions (default: a version and the one before it), file by file with unified diffs.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
from | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
to required | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
restore
Rolls a branch back to any earlier version or snapshot, as a new version (nothing is lost; the rollback can itself be undone).
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
to required | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
branch | string | Branch to change (default the first branch, genesis; older documents: main). |
branch
Starts a branch at a version (default: the first branch's latest), to try something without touching it.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
name required | string | |
from | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
merge
Merges branch from into into (default the first branch): per file, and per key in EDN files. Conflicts are listed; strategy ours or theirs settles them.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
from required | string | |
into | string | |
strategy | ours | theirs |
archive_branch
Closes a branch (its history stays).
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
branch required | string |
snapshot
Names a version ("sent-to-client", "draft-1") so it can be found, restored, forked or built later.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
name required | string | |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
note | string |
fork
A new document (yours) starting from a version of this one, e.g. to rework it in another format. Its history links back to the source.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
title | string |
verify_history
Replays the document's event log and checks every version reproduces exactly.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
list_asks
Asks and notes on the document, newest first. An ask is a request from a person to an agent about a thing on the page (anchor: a copy key like :how/core, an asset, "page how"), made on a version; its state is waiting, working (an agent took it), made (finished with a version) or withdrawn. A note is a remark for people (open or resolved). Each has a number (ask), who made it (from), and a thread of replies. To work on one: take_ask, do the work, then finish_ask with the version you made (or reply_ask to ask back or decline).
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
state | open | all | open (default): waiting and working asks and open notes; all: everything. |
take_ask
Takes an ask: you are working on it (people see WORKING with your name). Refused when another agent has it. Act on it as the person who asked: within their role on the document.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ask required | integer | The ask's number. |
agent | string | Your name as people should see it (default "an agent"), e.g. Claude Code. |
reply_ask
Replies on an ask or note: ask back ("which language?"), say why you won't do it, or answer a note. People see it in the Notes tab, and the agent that took an ask hears replies on it.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ask required | integer | |
text required | string | |
agent | string | Your name, when you reply as an agent. |
finish_ask
Finishes an ask with the version you made for it (the version a change tool returned, e.g. genesis.39; default the latest of the first branch) and an optional line on what you did. People see MADE genesis.39 and can look at it.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ask required | integer | |
version | string | |
text | string | |
agent | string |
ask
Makes an ask for an agent (editors) or, with note: true, a note for people (anyone on the document), about a thing on the page. Agents use notes to leave people a question or a reminder ("page 3 needs a photo").
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
text required | string | |
anchor | string | What it is about: a copy key (:how/core), an asset id, "page how". |
page | string | |
lang | string | |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
note | boolean | |
to | string | An agent's name (default: any agent on the document). |
members
Who can open the document, with roles (owner, editor, viewer), and open invites.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
invite
Shares the document with someone by email (owners only): an existing user becomes a member at once; anyone else gets an invite link to send.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
email required | string | |
role | viewer | editor | owner |
set_role
Changes a member's role, or removes them with role none (owners only).
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
member required | string | Their email. |
role required | viewer | editor | owner | none |
export_doc
Everything about a document in one zip: its files, every raw asset ever uploaded (exact bytes), the full version history and snapshots. Returns a download link (7 days). import_doc reads it back.
| Argument | Type | What it is |
|---|---|---|
doc required | string | Document id, or its link (https://.../d/<id>). |
ref | string | Version to read: a branch (its latest; default the first branch, genesis), a version name (genesis.38), a document-wide number (v120) or a snapshot name. |
history | boolean | Include the history (default true). |
import_doc
A new document from an export zip at a URL (a download link from export_doc, from this or another server), with its history.
| Argument | Type | What it is |
|---|---|---|
url required | string | |
title | string |