Skip to main content
Glama

maket_html

Read and write page HTML with surgical data-id edits. Validate layout against canvas and enforce brand charte tokens.

Instructions

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 a token pass untouched. set — REPLACE the full page HTML. Rejects the whole payload on any violation. Requires context_token when the doc has a charte. patch — apply ops by data-id: style/content/attr/insert/replace/remove/clone/moveTo. Violating ops roll back individually, the rest still apply. get — return current HTML; pass id= for a single element, format=text to strip tags. check — measure layout against the canvas + declared canvas.margins; no side effects. Status: ✓ OK, ⚠ tight (block crosses a declared margin band — tighten or move into the safe zone before shipping), ⛔ overflow (block escapes the canvas, not shippable; pairwise overlaps between [data-id] blocks are reported under this same status). On tight/overflow, the next: block points to a snapshot + targeted patch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoFor get: data-id of a single element to return; omit to fetch the whole page.
docYesDocument name (always required).
opsNoFor 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 (newId), moveTo (targetId) + optional position.
htmlNoFor 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: <div data-id="page" style="width:210mm;height:297mm;display:flex;flex-direction:column;padding:15mm"><h1 data-id="title">Hello</h1></div>.
pageYesPage number, 1-based (always required).
actionYesOperation to run. See the tool description for the action table.
formatNoFor get: 'html' (default, full markup) or 'text' (tags stripped).
context_tokenNoFor set: charte context token from maket_charte view. REQUIRED when the document has a charte — proof the brand guidelines were read first.
Behavior5/5

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

With no annotations, the description fully discloses behavior: set rejects whole payload on violation, patch rolls back individual ops, check has no side effects, and it details compliance checks (color, font, shadow). It also explains the check statuses and the context_token requirement for set.

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

Conciseness5/5

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

The description is front-loaded with purpose and usage. It is well-structured with a header, general rules, and action-specific bullet points. Every sentence provides essential information, and there is no wasted text given the complexity of 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?

The description covers all aspects: when to use, action selection, compliance rules, error handling, return values (including check statuses and get output format), and prerequisites (context_token). Despite no output schema, the description sufficiently explains outputs and side effects.

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 coverage is 100% with detailed descriptions. The description adds value by providing the action table and explaining when each action is used, but individual parameter semantics are already well-covered in the schema. The action parameter description explicitly references the tool description, integrating them well.

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 clearly states the tool's purpose: 'read and write page HTML'. It distinguishes the four actions (set, patch, get, check) with specific use cases, making the function unambiguous. While it doesn't explicitly differentiate from sibling tools, the focus on HTML manipulation is evident.

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

Usage Guidelines4/5

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

The description starts with 'When to use: read and write page HTML' and provides guidance on which action to pick (set for skeleton, patch for edits, etc.). It does not explicitly compare to sibling tools, but the context implies its role. Adding explicit exclusions for other tools would improve it.

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