Skip to main content
Glama

Write content

patch_nodes
Destructive

Apply many node-level patches to a site in ONE call, batched into one new draft version. The primary patch primitive — there is no single-node tool. Each patch entry provides the node_id plus one or more shorthand fields: 'text' for copy (auto-routes to data.text for heading/button/link/nav-link/banner-bar, data.content for text/rich-text/blockquote), 'href' for link destinations, 'src'/'alt' for images, 'slot' to set or correct a node's semantic role. For props not covered by shorthands (level on heading, variant on button, items on accordion), use 'data_patch' — its keys are validated against the primitive schema (prevents silent failures where the renderer ignores your key). Patches are independent: valid ones are saved even if others fail, and each failure comes back in 'rejected' with the reason, so send a small follow-up call for those rather than resending everything. Typical post-create flow: read the manifest, build an array of {node_id, text} entries for every placeholder copy string, send ONE call. Order doesn't matter — patches merge independently. Repeat entries for one node_id are merged; only two different values for the same field are rejected. Node ids are searched in pages, then header/footer/pageLayout, then COLLECTION DETAIL TEMPLATES — so the labels and CTAs around a detail page's {{placeholders}} (get_page (with view: "content")'s collections[].template_nodes) are patchable like anything else; the response names those under collection_templates_touched, because one such patch changes every item page in that collection at once. Returns dead_links when the site is left with an internal link whose target route does not exist — check it before reporting the work done, because a card whose text is right and whose href is stale looks finished and 404s on click. A patch that changes a text colour, a background or a variant is followed by a contrast check of the rendered pages it touched (a few seconds), and text it left unreadable comes back in unreadable_text — fix it before you reply.

Input Schema

NameRequiredDescriptionDefault
patchesYesArray of patches, each targeting a node by id. All valid patches are applied as ONE new draft version. Patches are independent: one that names a missing node or an invalid key is skipped and itemized in `rejected` while the rest still land, so a single bad entry no longer discards the batch. Check `patches_rejected` on the response and send a follow-up call for those only. A node_id may appear more than once — the entries are merged for you, and only a genuine disagreement (the same field set to two different values) is rejected.
site_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint/idempotentHint/openWorld) by disclosing partial-success semantics, duplicate-node_id merge rules, search order across pages/header/footer/collection templates, the collection_templates_touched side effect that changes every item page at once, plus post-write dead_links and unreadable_text/contrast-check side effects. These are exactly the behaviors an agent must anticipate before invoking a destructive batch write.

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?

Purpose and the 'primary patch primitive' claim are front-loaded, and nearly every sentence carries operational value (rejected handling, merge rules, template side effects). It is, however, a single dense paragraph with some overlap against the nested schema descriptions and would read better chunked.

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?

There is no output schema, yet the description documents the notable return fields — rejected/patches_rejected, dead_links, unreadable_text, collection_templates_touched — and warns to check dead_links before reporting completion. Nothing material is missing for a 200-item batch mutation tool.

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?

Adds real routing meaning beyond the schema: which node types each shorthand lands on, that data_patch keys are camelCase and validated against the primitive schema, and that unknown keys reject the patch with allowed keys listed. Slightly reduces confidence because the routing summary omits 'callout' and says nav-link routes to data.text while the schema says data.label for nav-link's label.

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?

States a specific verb and resource (node-level patches applied in one call, batched into one new draft version) and explicitly positions itself as the primary primitive — 'there is no single-node tool' — separating it from insert_nodes, update_page and move_nodes. An agent can identify the tool's role 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?

Gives concrete when-to-use guidance via the 'typical post-create flow' (read manifest, build {node_id, text} entries, send ONE call) and explicit failure routing (send a small follow-up for entries in 'rejected' rather than resending everything). It also names the alternative (get_primitive_schema) for cases the shorthands don't cover.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources