Maket
v2.3.2Compose branded visual documents with live preview, data collections, validation, and PDF export.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
maket_mermaid
When to use: add a diagram to a page. Works for flowcharts, sequence, class, ER, state, and XY chart diagrams. Pick this over manual SVG or nested divs when the thing you want is conceptually a graph. Renders Mermaid syntax to durable inline SVG and injects it into the page HTML. The answer gives the document's reading path in Maket and the rendered diagram as an inline image (at most 1600 px and 1 MB of base64; beyond a 2:1 ratio, its top or left part). The source and semantic rendering choices stay on the wrapper so charte changes can rerender the diagram. The diagram scales with its wrappe…
| Parameter | Type | Description |
|---|---|---|
code * | string | Mermaid diagram syntax. Header on its own line, then statements. E.g. "graph TD\n A-->B\n B-->C". |
doc * | string | Document name |
page * | number | Page number (1-based) |
accent | string | Safe arrow/accent colour. Overrides charte, profile, or tokenRefs. |
bg | string | Safe background colour. Overrides charte, profile, or tokenRefs. |
border | string | Node and group border colour. Overrides charte, profile, or tokenRefs. |
dataId | string | data-id for the wrapper element. Default: auto-generated (mermaid-1, mermaid-2...) |
fg | string | Safe foreground colour. Overrides charte, profile, or tokenRefs. |
font | string | Safe primary font family. A fallback stack is normalized to its first family. Overrides charte, profile, or tokenRefs. |
height | string | CSS height for the wrapper (e.g. "120mm"). Default: auto. |
layerSpacing | number | Flowchart/state vertical spacing between diagram layers in px. |
line | string | Safe connector colour. Overrides charte, profile, or tokenRefs. |
muted | string | Secondary text colour. Overrides charte, profile, or tokenRefs. |
nodeSpacing | number | Flowchart/state horizontal spacing between sibling nodes in px. |
padding | number | Flowchart/state canvas padding in px. |
position | string | Where to insert relative to target. Default: beforeend. |
surface | string | Node surface colour. Overrides charte, profile, or tokenRefs. |
targetId | string | data-id of parent element to insert into. Default: page root. |
theme | string | Optional built-in diagram profile. Overrides automatic charte defaults; tokenRefs and direct values override it. |
tokenRefs | object | Explicit references to tokens on the document charte, keyed by diagram role. Example: {"bg":"color.paper","accent":"color.primary","font":"font.body"}. |
transparent | boolean | Render without an SVG background. Default: false. |
width | string | CSS width for the wrapper (e.g. "180mm", "100%"). Default: auto. |
maket_image
When to use: manage the asset library (images). `view` → `meta` is a required two-step: meta refuses any write without the context_token from the latest view call — proof the image was read before metadata is attributed. Images live on disk under the assets dir; metadata lives in the store; both move together. list — list assets grouped by category; flags items missing metadata. view — load an asset inline (text + binary image) and return its context_token. MUST be called before meta. meta — write/update metadata; rejects without a current context_token. import — cop…
| Parameter | Type | Description |
|---|---|---|
action * | string | Operation to run. See the tool description for the action table. |
category | string | For list: filter to this category. For meta/import: category tag. |
context_token | string | For meta (REQUIRED): token returned by the matching view call. Proves the image was read before its metadata is written. |
credit | string | For meta/import: attribution / photographer credit. |
description | string | For meta/import: long prose. |
filename | string | Asset filename. Required for view/meta/delete. For import: destination filename (required in register-mode, derived from url/path otherwise). |
orientation | string | For meta/import: orientation hint (landscape/portrait/square). |
overwrite | boolean | For import: overwrite an existing file with the same name. |
path | string | For import: local filesystem path to copy from. |
tags | array | For meta/import: searchable tags. |
title | string | For meta/import: human title. |
url | string | For import: HTTP(S) URL to download from. |
maket_charte
When to use: manage brand style guides (chartes). `view` is a prerequisite for any charte-aware HTML edit — it returns the context_token required by maket_html set/patch. Design tokens become CSS variables (--charte-color-primary, etc.) injected into every page. Voice and rules guide content composition. maket_mermaid automatically consumes canonical diagram tokens and documented fallbacks from color/font groups; its tokenRefs option can target any existing safe token explicitly. list — list all chartes with a short colour-palette preview. view — read one charte; returns tokens,…
| Parameter | Type | Description |
|---|---|---|
action * | string | Operation to run. See the tool description for the action table. |
description | string | For set: one-line human description. |
name | string | Required for view/set/delete. Unique charte name. |
rules | object | For set: composition rules (titles, photos, layout). Extra keys allowed. |
tokens | object | For set: design tokens grouped by category. Become CSS variables --charte-<group>-<key>. Diagram roles can use a canonical "diagram" group (bg, fg, line, accent, muted, surface, border, font, padding,… |
voice | object | For set: voice guidelines (personality, formality, do/dont, vocabulary, examples). |
maket_collection
When to use: manage data collections used by page placeholders. Collections are typed by JSON Schema and contain ordered members. A page can be bound to one collection; rendering then produces one page per member. list — list collections. view — read one collection with fields and members. create — create an empty collection from a JSON Schema. validate_schema — check a schema against existing members without saving. change_schema — apply a schema only when existing members validate. add_row / update_row / delete_row — edit collection members. delete — remove a…
| Parameter | Type | Description |
|---|---|---|
action * | string | |
data | object | |
description | string | |
doc | string | |
mode | string | |
name | string | |
page | integer | |
row | string | |
schema | object |
maket_state
When to use: attach durable data and immutable snapshot history to one living document. Document state is separate from collections and mail merge. A state-backed document renders Mustache variables, sections, inverted sections, and loops from its latest revision. Every mutation stores a complete validated schema + data snapshot. History is unbounded unless the document has a revision retention. The page interface is HTML/CSS, a JSON Forms template, or HTML embedding the current form at <!--maket-json-form-->. Configure the form with maket_page set_form. HTML uses display-only Mustache plus e…
| Parameter | Type | Description |
|---|---|---|
action * | string | Document-state operation to perform. |
doc * | string | Target document name. |
data | object | Complete state object required by init/update; optional compatible data for schema validation/change. |
expected_revision | integer | Current revision required by update, patch, change_schema, and restore; not used by init. |
patch | array | RFC 6902 operations required by action=patch. |
retention | For set_retention: number of previous revisions kept besides the current one (0 keeps only the current state); null keeps the full history again. | |
revision | integer | Historical revision required by revision and restore. |
schema | object | JSON Schema required by init, validate_schema, and change_schema. |
maket_structured_workspace
HTTP read increment: create/update_definition accept data_source={kind:'http',baseUrl,collectionId,bindingId,auth?:'env:NAME',list:{path,params:{cursor,limit,sort,text?,filters?},itemsPointer,nextPointer,totalPointer?,revisionPointer?},get:{path:'items/{id}',dataPointer?,revisionPointer?}}. One collection/binding, declared identity and sortBy required; grouping unavailable. Query parameters carry text/cursor/limit verbatim, sort/filters as JSON. Item data is each list object; detail is the whole response or dataPointer. nextPointer gives a server token or null; no total unless declared. Bearer…
| Parameter | Type | Description |
|---|---|---|
action * | string | |
allow_incomplete | boolean | |
batch | integer | |
binding | string | |
collection | string | |
cursor | string | |
data | object | |
data_schema | object | |
data_source | ||
description | string | |
document_name | string | |
expected_revision | integer | |
expected_workspace_revision | integer | |
filters | array | |
item | string | |
new_name | string | |
representation_schema | object | |
sort | object | |
text | string | |
workspace | string |
maket_learn
When to use: first call for any agent entering Maket; source of operational guidance for using Maket MCP tools correctly. Returns structured Markdown inside MCP text content. It teaches agents how to operate Maket: workflow, HTML composition, chartes, diagram styling, collections, living document state, Structured Workspaces, review loop, and client installation. This is not the user-facing Help document opened from the Maket UI. Actions: overview — short operating model. topics — list available topics. topic — read one topic with topic=<name>.
| Parameter | Type | Description |
|---|---|---|
action | string | Default: overview. |
audience | string | Default: agent. |
topic | string | Required for action=topic. |
maket_page
When to use: manage page structure within a document — add, remove, rename, reorder, list. For page content, use maket_html instead. Manage pages within a document. HTML can embed the current JSON Forms template at <!--maket-json-form-->. add — append a page with html, json_forms, or both with one form slot; sets it active. remove — delete a page by 1-based index or name; refused if it's the last page. rename — rename a page by index or current name. reorder — move a page from one 1-based position to another; activePage adjusts. list — list pages with their te…
| Parameter | Type | Description |
|---|---|---|
action * | string | Operation to run. See the tool description for the action table. |
doc * | string | Document name (always required). |
from | number | For reorder: source 1-based position. |
html | string | For add: HTML body for the new page. Relative image src values are normalized to /assets/... |
json_forms | object | For add/set_form: JSON Forms template. Omit uischema to generate the form from the document-state JSON Schema. |
name | string | For add/rename: page name (new page name, or rename target). |
page | string | number | For remove/rename: target page — either 1-based index or page name. |
to | number | For reorder: target 1-based position. |
maket_doc
When to use: every persistent document-lifecycle operation — create, clone, rename, delete, list, update metadata, or move bundles in/out. For session-level actions (open a doc/page in the preview, inspect state, lock), use maket_workspace. For per-page edits use maket_page and for content use maket_html. `doc` is the doc in scope for every action except list. `name` only appears when you need a NEW name (duplicate, rename). Manage design documents (the workspace unit: canvas + pages + meta). new — create a blank document at `doc`; sets it active. Previous unsaved work is lost.…
| Parameter | Type | Description |
|---|---|---|
action * | string | Operation to run. See the tool description for the action table. |
background | string | For new: canvas background colour (CSS). Default #ffffff. |
category | string | For new/meta: category path separated by / (for example clients/acme). Flat values remain valid roots; default general. |
charte | string | For new/meta: name of an existing charte to associate with this document. The charte itself is applied later via maket_charte view. |
designNotes | string | For meta: designer-facing notes (visible in the UI). |
doc | string | The doc in scope. Required for every action except list. For lookup: the exact name to read. For new: the new doc's name (must be unique). For delete/meta/pin/unpin: the doc to act on. For duplicate/r… |
docs | array | For export: list of doc names to include in the bundle. Omit to export all documents. Ignored by other actions. |
format | string | For new: paper/screen format, or AUTO with width in mm and automatic page height. Default A3. Paper sizes are mm; DESKTOP/TABLET/MOBILE are screen aspect ratios scaled to mm. |
include_assets | boolean | For export: embed referenced asset binaries (images, SVGs) in the bundle. Default true — produces a portable .maket that survives transfer to another machine or datadir. Set false for a structure-on… |
input | string | For import: absolute or EXPORTS_DIR-relative path to a .maket file to load. |
margins | object | For new: per-side safe-zone insets in mm {top, right, bottom, left}. Optional. |
name | string | The new name. Only used by duplicate (clone's name) and rename (new name). |
orientation | string | For new: page orientation. Default portrait. |
output | string | For export: output filename (defaults to <doc>.maket or maket-bundle.maket). Absolute paths are honoured; bare names land in EXPORTS_DIR. |
rating | number | For meta: 0–5 star rating (clamped). |
responsive | boolean | For new/meta: opt this entire document into fluid browser reading at its available pane width. Default false; canvas authoring and PDF keep their physical dimensions. On a Workspace template only this… |
teamNotes | string | For meta: team-facing notes (visible in the UI). |
width | number | Width in millimetres for AUTO format; required on creation. Height follows each page content. |
maket_canvas
When to use: set or update the canvas (physical frame) of a document — format, orientation, background, margins. Call this before adding content to a fresh doc, or when switching a doc between formats. Coordinates are in mm. Paper sizes — A2=420×594, A3=297×420, A4=210×297, A5=148×210, A6=105×148, A7=74×105, A8=52×74. Screen sizes — DESKTOP=288×205 (1440×1024), TABLET=167×239 (834×1194), MOBILE=79×170 (393×852). AUTO — width in mm is required; each page height follows its content. Orientation is ignored. Use normal HTML flow rather than a fixed-height wrapper. Unspe…
| Parameter | Type | Description |
|---|---|---|
doc * | string | Document name. |
background | string | CSS background colour. Unspecified keeps the current value. Prefer var(--charte-color-bg) when a charte is loaded. |
format | string | Paper (A2–A8, mm) or screen (DESKTOP/TABLET/MOBILE, mm-equivalent). Unspecified keeps the current value. |
margins | object | Per-side safe-zone insets in mm: {top, right, bottom, left}. The layout verdict reports `tight` when blocks cross into any band, and the client draws dashed guides at these insets. Unspecified keeps t… |
orientation | string | Page orientation. Unspecified keeps the current value. |
width | number | Width in millimetres for AUTO format; required on creation. Height follows each page content. |
maket_html
When to use: read and write page HTML. Pick set for the initial skeleton, patch for iterative edits, get to read, check to measure overflow without writing. Every visible element MUST have a data-id. Use flex/grid with mm units. When a charte is loaded, prefer var(--charte-*) tokens. The compliance check is narrow: it rejects (1) hardcoded colour literals that duplicate an existing charte token value (e.g. #2563EB when primary=#2563EB), (2) any hardcoded font-family when the charte defines fonts, (3) any hardcoded box-shadow when the charte defines shadows. Fresh colours that don't duplicate…
| Parameter | Type | Description |
|---|---|---|
action * | string | Operation to run. See the tool description for the action table. |
doc * | string | Document name (always required). |
page * | number | Page number, 1-based (always required). |
context_token | string | For set: charte context token from maket_charte view. REQUIRED when the document has a charte — proof the brand guidelines were read first. |
format | string | For get: 'html' (default, full markup) or 'text' (tags stripped). |
html | string | For set: full page HTML. Every visible element MUST carry a data-id. Use flex/grid with mm units; images use relative filenames (src="photo.jpg"); colours/fonts come from var(--charte-*). Example: <di… |
id | string | For get: data-id of a single element to return; omit to fetch the whole page. |
ops | array | For patch: list of surgical ops by data-id. Each op has `id` plus one of: style (object), content (string), attr (object), insert (html) + optional position, replace (outerHTML), remove (true), clone… |
maket_workspace
When to use: every session-level interaction with the live workspace — open a doc/page in the preview, inspect a doc's current state, toggle its lock, and process the user-message queue. For persistent CRUD on documents (create, rename, delete, duplicate, meta, import/export) use maket_doc. focus — open `doc` at page `page` in the live preview (sets active doc + active page). state — summarise `doc`'s current state: canvas, pages with element counts and data-source cursors (collection · mode · row), charte, pending messages. lock — lock or unlock `doc`…
| Parameter | Type | Description |
|---|---|---|
action * | string | Operation to run. See the tool description for the action table. |
doc | string | The document in scope. Required for focus/state/lock. For list_messages, pass an exact document name to read only its annotations; omit to read all document and workspace messages. |
ids | array | For ack_messages: message ids to mark processed. |
locked | boolean | For lock: true to lock the document, false to unlock. Omit to toggle. |
page | integer | For focus: 1-based page number to make active. |
maket_preview
When to use: view documents outside the agent. `open` flips the live preview URL into the user's browser; `snapshot` rasterises a single page to PNG at its true mm size; `show` puts pages in front of the user inside the conversation. open — launch the live preview URL (localhost) in the default browser. No params. snapshot — render a page via headless Chromium. Returns the full-size PNG as a file path on disk, the page's reading path in Maket, and the image inline (at most 1600 px on its longest side and 1 MB of base64, downscaled when larger; beyond a 2:1 ratio, the top or left p…
| Parameter | Type | Description |
|---|---|---|
action * | string | Operation to run. See the tool description for the action table. |
doc | string | Document name. Required for snapshot and show. |
layout | string | For show: scroll (default) shows the pages one after another; page shows one at a time with previous and next. |
page | number | 1-based page number. Required for snapshot. |
pages | For show: "all" (default), a page number, a range such as "3-5", or a list of page numbers. | |
path | string | For snapshot: output PNG path. Defaults to EXPORTS_DIR/<doc>.png. |
start | integer | For show: the page number to open at, one of the shown pages (default: the first). |
zoom | string | For show: fit-width (default) or actual size. |
maket_reader
Calls of the Maket reader view (ui://maket/page): page returns one rendered page without image data, image returns one of its images downscaled to the displayed width, write sets one value of a state document as the Maket form does. Not for agents.
| Parameter | Type | Description |
|---|---|---|
action * | string | page, image or write. |
doc * | string | Document name. |
expectedRevision | integer | For write: the state revision the value was edited from. |
file | string | For image: the asset file, one of the page's images. |
op | string | For write: patch op. |
page | integer | For page and image: 1-based page number. |
path | string | For write: JSON Pointer of the value. |
value | string | number | boolean | null | For write: the new value. |
width | number | For image: displayed width in device pixels. |
maket_pdf
When to use: export a document to PDF for sharing or print. One call renders every page in order. For a single-page raster (PNG), use maket_preview snapshot instead. Renders every page via headless Chromium at the canvas's true mm size, then writes to EXPORTS_DIR/<doc>.pdf. Charte CSS is inlined so fonts and tokens render identically to the live preview. The result lists, by number and name, every page whose PDF rendering differs from its preview (element boxes, fonts, colours). quality — screen (96 DPI, smallest), print (150 DPI, default), hd (300 DPI). rows — collection-bound pag…
| Parameter | Type | Description |
|---|---|---|
doc * | string | Document name. |
quality | string | DPI preset: screen=96, print=150 (default), hd=300. |
rows | string | For pages bound to a collection: preview (default) follows each page's cursor — what the live canvas shows; current = the cursor's row only; all = one page per row (mail merge); template = raw place… |
maket_gmail
When to use: connect Gmail, search/read mail, download an attachment, or create a draft from a Maket document. All actions except connect require an active OAuth session — call connect first. connect — restore the refresh token if present, otherwise open the browser for OAuth consent. Pass with_read=true to also request inbox access (drafts are always granted). search — list subject/from/date for messages matching a Gmail query. Capped at 50. Requires with_read=true at connect time. read — fetch one message by id: headers, body (3000-char truncated…
| Parameter | Type | Description |
|---|---|---|
action * | string | Operation to run. See the tool description for the action table. |
attachmentId | string | For fetch_attachment: Gmail attachment id from a previous action=read call. |
attachments | array | For draft: names of other Maket docs to attach as PDFs. Falls back to doc.meta.emailAttachments. |
bcc | string | For draft: bcc. Falls back to doc.meta.emailBcc. |
category | string | For fetch_attachment (image branch only): category tag saved with the asset row. Default email-attachment. |
cc | string | For draft: cc. Falls back to doc.meta.emailCc. |
doc | string | For draft: Maket document to use as the email body. |
filename | string | For fetch_attachment: override the saved filename. Defaults to the name reported by Gmail. |
id | string | For read: Gmail message id (from search results). |
maxResults | number | For search: cap on results. Default 10, max 50. |
overwrite | boolean | For fetch_attachment: replace an existing file (asset or non-image drop) when set. Default false. |
page | number | For draft: 1-based page number within the document. |
quality | string | For draft: PDF quality preset for attachments. Default screen (smaller). |
query | string | For search: Gmail query (same syntax as the UI: from:, subject:, after:, etc.). |
subject | string | For draft: subject. Falls back to doc.meta.emailSubject. |
to | string | For draft: recipient. Falls back to doc.meta.emailTo when omitted. |
with_read | boolean | For connect: also request read access (inbox search + message read). Default false — Maket only creates drafts. |