Skip to main content
Glama

maket_state

Manage a document's live state with schema-validated data and immutable snapshot history. Init, update, patch, or restore revisions.

Instructions

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. The target interface is document-owned standard HTML/CSS: Mustache interpolation is display-only. Editable terminal values must be declared explicitly with data-maket-bind on (boolean), (string), (string enum), or (single-value editor). Use state.foo at the root and relative foo inside {{#state.items}} sections. Maket resolves transient JSON Pointers and synchronizes the store; it does not generate or style controls. init — attach a schema and initial data to a static document (revision 1; no expected_revision). get — read the schema and current revision. update — append a complete state snapshot; expected_revision is required. patch — apply RFC 6902 JSON Patch operations; expected_revision is required. validate_schema — validate a proposed schema against current or supplied data without saving. change_schema — atomically replace the schema and append compatible data; expected_revision is required. history — list immutable revisions newest first. revision — read one revision. restore — append a new revision containing an older schema + data snapshot; expected_revision is required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docYesTarget document name.
dataNoComplete state object required by init/update; optional compatible data for schema validation/change.
patchNoRFC 6902 operations required by action=patch.
actionYesDocument-state operation to perform.
schemaNoJSON Schema required by init, validate_schema, and change_schema.
revisionNoHistorical revision required by revision and restore.
expected_revisionNoCurrent revision required by update, patch, change_schema, and restore; not used by init.
Behavior5/5

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

With no annotations provided, the description fully carries disclosure. It reveals key behaviors: every mutation stores a complete validated schema + data snapshot, revisions are immutable, Mustache rendering is display-only, and editable values need explicit data-maket-bind declarations. It also details the expected_revision requirement and init behavior (revision 1).

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?

The description is long but well-structured, starting with 'When to use' and then a bulleted action list. The middle paragraph about Mustache binding is detailed and necessary for understanding the tool's interaction model. While not ultra-concise, it is appropriately sized for a multi-action tool with 7 parameters.

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?

Without an output schema, the description explains the result of each action in words (e.g., 'read the schema and current revision', 'list immutable revisions newest first'). It also covers the data-binding model, required bindings, and the distinction between display-only Mustache and editable values. This is comprehensive for the tool's complexity.

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

Parameters5/5

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

Although the schema covers 100% of parameters, the description adds significant action-specific semantics. It explains which parameters are required for which action (e.g., patch requires patch array, revision requires revision number, update requires complete data), and clarifies that init does not use expected_revision. This goes well beyond the schema's one-line descriptions.

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 opens with a specific verb and resource: 'attach durable data and immutable snapshot history to one living document.' It clearly distinguishes from siblings by stating 'Document state is separate from collections and mail merge,' and the list of nine actions (init, get, update, patch, etc.) further specifies the tool's scope.

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?

Explicit 'When to use:' heading sets context. It explains when the tool is appropriate (durable data, immutable history) and when not ('separate from collections and mail merge'), and clarifies that it does not generate or style controls. Each action's description also indicates when it is required (e.g., expected_revision for mutations).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ng-galien/maket'

If you have feedback or need assistance with the MCP directory API, please join our Discord server