Skip to main content
Glama

maket_doc

Manage design document lifecycle: create, clone, rename, delete, list, update metadata, pin/unpin, export, and import .maket bundles.

Instructions

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. list — enumerate saved documents: pinned documents first (most recently pinned first, marked 📌, with their category), then the other documents as a hierarchy of category paths. lookup — read-only identity of doc by exact name, Workspace documents included: JSON {name, id, revision (monotonic modification token), pageCount, dataModel, stateRevision (null without state)}. It never opens the preview nor changes the active document. When absent, the error lists near matches. link — return a reading path for doc, using its stable document id and configured browser base path. Prefix it with the reachable gateway origin. delete — remove doc permanently; refused if it's the only document left. duplicate — clone doc → name (format variants, A/B copies). rename — rename doc → name. meta — update doc's metadata: designNotes, teamNotes, rating, category, charte, responsive. The responsive flag applies to every browser-reader page while canvas/PDF keep authored dimensions. Owned Workspace templates accept responsive alone; sync_template propagates it. pin — pin doc at the top of the document lists (desktop library, Reader navigation, list). The most recently pinned document comes first; pinning an already pinned doc keeps its place. Allowed on locked documents. Workspace item pins appear under their collection in the Workspace sidebar; indexes and templates cannot be pinned. unpin — remove doc's pin; free documents return to their category and Workspace items disappear from the pinned shortcuts. export — write a portable .maket bundle to EXPORTS_DIR. By default the bundle embeds referenced asset binaries (images, SVGs) so it survives transfer to another machine or a fresh datadir. Pass include_assets=false for a lighter structure-only snapshot. Include doc for a single document, docs for a list, or omit both to export every document. Referenced chartes, collections, and current document-state snapshots (with their revision retention) are embedded automatically; revision history stays local. Override the filename with output. import — load a .maket bundle from input (absolute path or EXPORTS_DIR-relative). Documents land with conflict-renamed names; chartes and collections skip names that already exist. Current document-state snapshots initialize revision 1, and assets are restored to ASSETS_DIR with the existing collision rule.

Input Schema

NameRequiredDescriptionDefault
docNoThe 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/rename: the source doc.
docsNoFor export: list of doc names to include in the bundle. Omit to export all documents. Ignored by other actions.
nameNoThe new name. Only used by duplicate (clone's name) and rename (new name).
inputNoFor import: absolute or EXPORTS_DIR-relative path to a .maket file to load.
widthNoWidth in millimetres for AUTO format; required on creation. Height follows each page content.
actionYesOperation to run. See the tool description for the action table.
charteNoFor new/meta: name of an existing charte to associate with this document. The charte itself is applied later via maket_charte view.
formatNoFor 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.
outputNoFor export: output filename (defaults to <doc>.maket or maket-bundle.maket). Absolute paths are honoured; bare names land in EXPORTS_DIR.
ratingNoFor meta: 0–5 star rating (clamped).
marginsNoFor new: per-side safe-zone insets in mm {top, right, bottom, left}. Optional.
categoryNoFor new/meta: category path separated by / (for example clients/acme). Flat values remain valid roots; default general.
teamNotesNoFor meta: team-facing notes (visible in the UI).
backgroundNoFor new: canvas background colour (CSS). Default #ffffff.
responsiveNoFor 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 field may be changed through meta; then sync_template propagates it to projections.
designNotesNoFor meta: designer-facing notes (visible in the UI).
orientationNoFor new: page orientation. Default portrait.
include_assetsNoFor 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-only snapshot (smaller, git-friendly).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.2.0
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "new",
      -  "list",
      -  "delete",
      -  "duplicate",
      -  "rename",
      -  "meta",
      -  "export",
      -  "import"
      -]New value: +[
      +  "new",
      +  "list",
      +  "lookup",
      +  "link",
      +  "delete",
      +  "duplicate",
      +  "rename",
      +  "meta",
      +  "pin",
      +  "unpin",
      +  "export",
      +  "import"
      +]
    • changedInput schema / properties / doc / description
      Previous value: -"The doc in scope. Required for every action except list. For new: the new doc's name (must be unique). For delete/meta: the doc to act on. For duplicate/rename: the source doc."New value: +"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/rename: the source doc."
    • changedInput schema / properties / format / description
      Previous value: -"For new: paper/screen format. Default A3. Paper sizes are mm; DESKTOP/TABLET/MOBILE are screen aspect ratios scaled to mm."New value: +"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."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "A2",
      -  "A3",
      -  "A4",
      -  "A5",
      -  "A6",
      -  "A7",
      -  "A8",
      -  "DESKTOP",
      -  "TABLET",
      -  "MOBILE"
      -]New value: +[
      +  "A2",
      +  "A3",
      +  "A4",
      +  "A5",
      +  "A6",
      +  "A7",
      +  "A8",
      +  "DESKTOP",
      +  "TABLET",
      +  "MOBILE",
      +  "AUTO"
      +]
    • addedInput schema / properties / responsive
      Added value: +{
      +  "description": "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 field may be changed through meta; then sync_template propagates it to projections.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / width
      Added value: +{
      +  "description": "Width in millimetres for AUTO format; required on creation. Height follows each page content.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
  2. Changed2 schema fields changedv1.7.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / category / description
      Previous value: -"For new/meta: category tag used for grouping in list (default general)."New value: +"For new/meta: category path separated by / (for example clients/acme). Flat values remain valid roots; default general."
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden, and it does: 'new' warns that previous unsaved work is lost, delete is 'refused if it's the only document left', lookup is read-only and never opens preview or changes the active document, pin is allowed on locked documents while indexes/templates cannot be pinned, and export/import disclose asset embedding defaults, conflict-renaming, and revision-retention behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads when-to-use, then parameter scoping, then a punctuation-prefixed action table. Given 12 actions and a rich export/import surface, the length is largely justified, though a few entries (pin/unpin) carry more UI-context detail than an agent strictly needs to invoke the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter, 12-action dispatcher with no output schema and no annotations, the description covers action semantics, destructive side effects, per-action return shape for lookup, and bundle-format rules for export/import. Nothing material an agent needs before invoking is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds the cross-action scoping rule ('`doc` is the doc in scope for every action except list; `name` only appears when you need a NEW name'), which the per-parameter schema blurbs spread out rather than frame globally. It stops short of adding format/syntax detail beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb set and resource (persistent document-lifecycle operations on design documents), and enumerates all 12 actions with concrete semantics. It explicitly distinguishes itself from siblings: maket_workspace for session-level actions, maket_page for per-page edits, maket_html for content. An agent can route correctly without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Opens with an explicit when-to-use statement ('every persistent document-lifecycle operation') followed by when-not and which alternative to use instead ('For session-level actions... use maket_workspace', 'for per-page edits use maket_page and for content use maket_html'). Also adds intra-tool guidance such as '`name` only appears when you need a NEW name'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.