Maket

v2.3.2
io.github.ng-galien/maket Checked 12 hours ago Published 21 days ago

Compose 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…

ParameterTypeDescription
code *stringMermaid diagram syntax. Header on its own line, then statements. E.g. "graph TD\n A-->B\n B-->C".
doc *stringDocument name
page *numberPage number (1-based)
accentstringSafe arrow/accent colour. Overrides charte, profile, or tokenRefs.
bgstringSafe background colour. Overrides charte, profile, or tokenRefs.
borderstringNode and group border colour. Overrides charte, profile, or tokenRefs.
dataIdstringdata-id for the wrapper element. Default: auto-generated (mermaid-1, mermaid-2...)
fgstringSafe foreground colour. Overrides charte, profile, or tokenRefs.
fontstringSafe primary font family. A fallback stack is normalized to its first family. Overrides charte, profile, or tokenRefs.
heightstringCSS height for the wrapper (e.g. "120mm"). Default: auto.
layerSpacingnumberFlowchart/state vertical spacing between diagram layers in px.
linestringSafe connector colour. Overrides charte, profile, or tokenRefs.
mutedstringSecondary text colour. Overrides charte, profile, or tokenRefs.
nodeSpacingnumberFlowchart/state horizontal spacing between sibling nodes in px.
paddingnumberFlowchart/state canvas padding in px.
positionstringWhere to insert relative to target. Default: beforeend.
surfacestringNode surface colour. Overrides charte, profile, or tokenRefs.
targetIdstringdata-id of parent element to insert into. Default: page root.
themestringOptional built-in diagram profile. Overrides automatic charte defaults; tokenRefs and direct values override it.
tokenRefsobjectExplicit references to tokens on the document charte, keyed by diagram role. Example: {"bg":"color.paper","accent":"color.primary","font":"font.body"}.
transparentbooleanRender without an SVG background. Default: false.
widthstringCSS 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…

ParameterTypeDescription
action *stringOperation to run. See the tool description for the action table.
categorystringFor list: filter to this category. For meta/import: category tag.
context_tokenstringFor meta (REQUIRED): token returned by the matching view call. Proves the image was read before its metadata is written.
creditstringFor meta/import: attribution / photographer credit.
descriptionstringFor meta/import: long prose.
filenamestringAsset filename. Required for view/meta/delete. For import: destination filename (required in register-mode, derived from url/path otherwise).
orientationstringFor meta/import: orientation hint (landscape/portrait/square).
overwritebooleanFor import: overwrite an existing file with the same name.
pathstringFor import: local filesystem path to copy from.
tagsarrayFor meta/import: searchable tags.
titlestringFor meta/import: human title.
urlstringFor 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,…

ParameterTypeDescription
action *stringOperation to run. See the tool description for the action table.
descriptionstringFor set: one-line human description.
namestringRequired for view/set/delete. Unique charte name.
rulesobjectFor set: composition rules (titles, photos, layout). Extra keys allowed.
tokensobjectFor 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,…
voiceobjectFor 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…

ParameterTypeDescription
action *string
dataobject
descriptionstring
docstring
modestring
namestring
pageinteger
rowstring
schemaobject

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…

ParameterTypeDescription
action *stringDocument-state operation to perform.
doc *stringTarget document name.
dataobjectComplete state object required by init/update; optional compatible data for schema validation/change.
expected_revisionintegerCurrent revision required by update, patch, change_schema, and restore; not used by init.
patcharrayRFC 6902 operations required by action=patch.
retentionFor set_retention: number of previous revisions kept besides the current one (0 keeps only the current state); null keeps the full history again.
revisionintegerHistorical revision required by revision and restore.
schemaobjectJSON 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…

ParameterTypeDescription
action *string
allow_incompleteboolean
batchinteger
bindingstring
collectionstring
cursorstring
dataobject
data_schemaobject
data_source
descriptionstring
document_namestring
expected_revisioninteger
expected_workspace_revisioninteger
filtersarray
itemstring
new_namestring
representation_schemaobject
sortobject
textstring
workspacestring

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>.

ParameterTypeDescription
actionstringDefault: overview.
audiencestringDefault: agent.
topicstringRequired 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…

ParameterTypeDescription
action *stringOperation to run. See the tool description for the action table.
doc *stringDocument name (always required).
fromnumberFor reorder: source 1-based position.
htmlstringFor add: HTML body for the new page. Relative image src values are normalized to /assets/...
json_formsobjectFor add/set_form: JSON Forms template. Omit uischema to generate the form from the document-state JSON Schema.
namestringFor add/rename: page name (new page name, or rename target).
pagestring | numberFor remove/rename: target page — either 1-based index or page name.
tonumberFor 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.…

ParameterTypeDescription
action *stringOperation to run. See the tool description for the action table.
backgroundstringFor new: canvas background colour (CSS). Default #ffffff.
categorystringFor new/meta: category path separated by / (for example clients/acme). Flat values remain valid roots; default general.
chartestringFor new/meta: name of an existing charte to associate with this document. The charte itself is applied later via maket_charte view.
designNotesstringFor meta: designer-facing notes (visible in the UI).
docstringThe 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…
docsarrayFor export: list of doc names to include in the bundle. Omit to export all documents. Ignored by other actions.
formatstringFor 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_assetsbooleanFor 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…
inputstringFor import: absolute or EXPORTS_DIR-relative path to a .maket file to load.
marginsobjectFor new: per-side safe-zone insets in mm {top, right, bottom, left}. Optional.
namestringThe new name. Only used by duplicate (clone's name) and rename (new name).
orientationstringFor new: page orientation. Default portrait.
outputstringFor export: output filename (defaults to <doc>.maket or maket-bundle.maket). Absolute paths are honoured; bare names land in EXPORTS_DIR.
ratingnumberFor meta: 0–5 star rating (clamped).
responsivebooleanFor 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…
teamNotesstringFor meta: team-facing notes (visible in the UI).
widthnumberWidth 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…

ParameterTypeDescription
doc *stringDocument name.
backgroundstringCSS background colour. Unspecified keeps the current value. Prefer var(--charte-color-bg) when a charte is loaded.
formatstringPaper (A2–A8, mm) or screen (DESKTOP/TABLET/MOBILE, mm-equivalent). Unspecified keeps the current value.
marginsobjectPer-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…
orientationstringPage orientation. Unspecified keeps the current value.
widthnumberWidth 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…

ParameterTypeDescription
action *stringOperation to run. See the tool description for the action table.
doc *stringDocument name (always required).
page *numberPage number, 1-based (always required).
context_tokenstringFor set: charte context token from maket_charte view. REQUIRED when the document has a charte — proof the brand guidelines were read first.
formatstringFor get: 'html' (default, full markup) or 'text' (tags stripped).
htmlstringFor 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…
idstringFor get: data-id of a single element to return; omit to fetch the whole page.
opsarrayFor 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`…

ParameterTypeDescription
action *stringOperation to run. See the tool description for the action table.
docstringThe 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.
idsarrayFor ack_messages: message ids to mark processed.
lockedbooleanFor lock: true to lock the document, false to unlock. Omit to toggle.
pageintegerFor 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…

ParameterTypeDescription
action *stringOperation to run. See the tool description for the action table.
docstringDocument name. Required for snapshot and show.
layoutstringFor show: scroll (default) shows the pages one after another; page shows one at a time with previous and next.
pagenumber1-based page number. Required for snapshot.
pagesFor show: "all" (default), a page number, a range such as "3-5", or a list of page numbers.
pathstringFor snapshot: output PNG path. Defaults to EXPORTS_DIR/<doc>.png.
startintegerFor show: the page number to open at, one of the shown pages (default: the first).
zoomstringFor 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.

ParameterTypeDescription
action *stringpage, image or write.
doc *stringDocument name.
expectedRevisionintegerFor write: the state revision the value was edited from.
filestringFor image: the asset file, one of the page's images.
opstringFor write: patch op.
pageintegerFor page and image: 1-based page number.
pathstringFor write: JSON Pointer of the value.
valuestring | number | boolean | nullFor write: the new value.
widthnumberFor 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…

ParameterTypeDescription
doc *stringDocument name.
qualitystringDPI preset: screen=96, print=150 (default), hd=300.
rowsstringFor 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…

ParameterTypeDescription
action *stringOperation to run. See the tool description for the action table.
attachmentIdstringFor fetch_attachment: Gmail attachment id from a previous action=read call.
attachmentsarrayFor draft: names of other Maket docs to attach as PDFs. Falls back to doc.meta.emailAttachments.
bccstringFor draft: bcc. Falls back to doc.meta.emailBcc.
categorystringFor fetch_attachment (image branch only): category tag saved with the asset row. Default email-attachment.
ccstringFor draft: cc. Falls back to doc.meta.emailCc.
docstringFor draft: Maket document to use as the email body.
filenamestringFor fetch_attachment: override the saved filename. Defaults to the name reported by Gmail.
idstringFor read: Gmail message id (from search results).
maxResultsnumberFor search: cap on results. Default 10, max 50.
overwritebooleanFor fetch_attachment: replace an existing file (asset or non-image drop) when set. Default false.
pagenumberFor draft: 1-based page number within the document.
qualitystringFor draft: PDF quality preset for attachments. Default screen (smaller).
querystringFor search: Gmail query (same syntax as the UI: from:, subject:, after:, etc.).
subjectstringFor draft: subject. Falls back to doc.meta.emailSubject.
tostringFor draft: recipient. Falls back to doc.meta.emailTo when omitted.
with_readbooleanFor connect: also request read access (inbox search + message read). Default false — Maket only creates drafts.