Skip to main content
Glama

Keep a change

apply_edit
Destructive

Keeps changes. On a kept site it takes the proposal_id that propose_edit returned, or that site_status lists, and saves that staged set as the site's next numbered version, all at once or not at all. It does not publish: readers see the change after publish. A staged set is not kept if someone else changed the same pages in the meantime or if it is more than a day old, and the answer says which. A member whose role does not allow keeping leaves the change waiting for an editor. On a preview, given its draft_id, there is no staged set: it takes the operations themselves and saves them into the preview at once, and the preview's link shows them. rollback undoes a kept version.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "apply_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoWhich site: its name (like Acme Docs), its Documarium address (like acme.documarium.com) or the short name in that address (like acme); a custom domain is not accepted. Leave it out when this connection covers one site; when it covers several and site is left out, nothing is done and the answer names them. A preview is not one of these sites; draft_id names a preview.
draft_idNoWhich preview: the draft_id create_preview returned, a 43-character key of letters, digits, - and _ (stray quotes or punctuation around it are ignored). It is not the code in the preview's link. Leave it out for a kept site, which site names.
operationsNoOn a preview only: the changes to save, 1 to 500, in the same form propose_edit takes, saved all at once or not at all. Not used on a kept site, where proposal_id names the staged set.
proposal_idNoOn a kept site: the reference propose_edit returned, also listed by site_status. A reference can be kept once, within 24 hours of being proposed. Not used on a preview.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • changedInput schema / properties / draft_id / description
      Previous value: -"Which preview this is about: the draft_id create_preview returned, not the code in the preview's link. Leave it out for a kept site, which site names."New value: +"Which preview: the draft_id create_preview returned, a 43-character key of letters, digits, - and _ (stray quotes or punctuation around it are ignored). It is not the code in the preview's link. Leave it out for a kept site, which site names."
    • changedInput schema / properties / operations / description
      Previous value: -"On a preview only: the changes to save, in the same form propose_edit takes, saved all at once or not at all. Not used on a kept site, where proposal_id names the staged set."New value: +"On a preview only: the changes to save, 1 to 500, in the same form propose_edit takes, saved all at once or not at all. Not used on a kept site, where proposal_id names the staged set."
    • changedInput schema / properties / operations / items / properties / body / description
      Previous value: -"For a create or an update: the page's full markdown, which replaces all of its text."New value: +"For a create, and needed for one: the page's full markdown. For an update: markdown that replaces all of the page's text; leave it out to change only the title. Not used for a delete or a move."
    • changedInput schema / properties / operations / items / properties / op / description
      Previous value: -"What to do to one page: create a new page, update an existing one, delete one, or move one to a new address."New value: +"What to do to one page: create (a new page at path), update (change the page at path), delete (remove it) or move (give it the new address to_path)."
    • changedInput schema / properties / operations / items / properties / path / description
      Previous value: -"The page's address within the preview, like /pricing; for an update, a delete or a move, its current address. The front page's address is /."New value: +"The page's address within the preview, like /pricing or /guides/setup, up to 512 characters; it is stored lower-cased. For an update, a delete or a move, the page's current address. The front page's address is /."
    • changedInput schema / properties / operations / items / properties / title / description
      Previous value: -"For a create or an update: the page's title. A move keeps the title."New value: +"For a create or an update: the page's title, up to 200 characters. Left out of an update, the title stays as it is. A move keeps the title and refuses a new one."
    • changedInput schema / properties / operations / items / properties / to_path / description
      Previous value: -"For a move only: the new address, like /guides/pricing."New value: +"For a move only, and needed for one: the new address, in the same form as path, like /guides/pricing."
    • changedInput schema / properties / proposal_id / description
      Previous value: -"On a kept site: the reference propose_edit returned, also listed by site_status. Not used on a preview."New value: +"On a kept site: the reference propose_edit returned, also listed by site_status. A reference can be kept once, within 24 hours of being proposed. Not used on a preview."
    • changedInput schema / properties / site / description
      Previous value: -"Which site: its name, its Documarium address (like acme.documarium.com) or the short name in that address (like acme); a custom domain is not accepted here. Leave it out when this connection covers only one site. A preview is not one of these sites; draft_id names a preview."New value: +"Which site: its name (like Acme Docs), its Documarium address (like acme.documarium.com) or the short name in that address (like acme); a custom domain is not accepted. Leave it out when this connection covers one site; when it covers several and site is left out, nothing is done and the answer names them. A preview is not one of these sites; draft_id names a preview."
  2. Changed9 schema fields changed
    • changedInput schema / properties / draft_id / description
      Previous value: -"Which preview this is about: the draft_id create_preview gave, not the code in the preview's link. Leave it out for a site you keep."New value: +"Which preview this is about: the draft_id create_preview returned, not the code in the preview's link. Leave it out for a kept site, which site names."
    • changedInput schema / properties / operations / description
      Previous value: -"For a preview: the changes to keep, applied all at once or not at all."New value: +"On a preview only: the changes to save, in the same form propose_edit takes, saved all at once or not at all. Not used on a kept site, where proposal_id names the staged set."
    • changedInput schema / properties / operations / items / properties / body / description
      Previous value: -"The full markdown of the page."New value: +"For a create or an update: the page's full markdown, which replaces all of its text."
    • changedInput schema / properties / operations / items / properties / op / description
      Previous value: -"What to do: create a page, update one, delete one, or move it to a new address."New value: +"What to do to one page: create a new page, update an existing one, delete one, or move one to a new address."
    • changedInput schema / properties / operations / items / properties / path / description
      Previous value: -"The page's address within the preview, like /pricing. The front page's address is /."New value: +"The page's address within the preview, like /pricing; for an update, a delete or a move, its current address. The front page's address is /."
    • changedInput schema / properties / operations / items / properties / title / description
      Previous value: -"The page's title."New value: +"For a create or an update: the page's title. A move keeps the title."
    • changedInput schema / properties / operations / items / properties / to_path / description
      Previous value: -"For a move: the new address."New value: +"For a move only: the new address, like /guides/pricing."
    • changedInput schema / properties / proposal_id / description
      Previous value: -"The identifier of the staged change set, from propose_edit."New value: +"On a kept site: the reference propose_edit returned, also listed by site_status. Not used on a preview."
    • changedInput schema / properties / site / description
      Previous value: -"Which site: its name or its address. Leave it out if this connection only covers one."New value: +"Which site: its name, its Documarium address (like acme.documarium.com) or the short name in that address (like acme); a custom domain is not accepted here. Leave it out when this connection covers only one site. A preview is not one of these sites; draft_id names a preview."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds substantive behavior: atomic all-or-nothing application, the fact that nothing becomes reader-visible until publish, conflict conditions that void a staged set (concurrent edits to the same pages, a set older than a day), and that the response reports which. The one gap is that it is somewhat vague about the shape of that answer and about permanence of a kept version beyond rollback.

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?

Content is front-loaded on the core action, with exclusions ("It does not publish") and failure modes following in a logical order, and every sentence carries real information. Some sentences are dense and clause-heavy, notably the preview sentence, which costs readability against a topic this intricate.

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 a destructive, non-idempotent mutation with no output schema, the description covers what an agent needs before calling: atomicity, deferred visibility, staleness and conflict rejection, permission-dependent outcomes, and the two distinct input modes. Nothing material is left to inference.

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

Parameters3/5

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

Schema description coverage is 100% and the field docs already explain site-vs-draft_id exclusivity, proposal_id provenance and the operations array, so the baseline is 3. The description reinforces the mode split and adds that the operations form matches what propose_edit takes, but contributes little syntax or constraint detail the schema does not already carry.

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?

"Keeps changes" is immediately qualified with a precise verb+resource: it saves a staged set as the site's next numbered version. It also draws the boundary against the closest sibling by stating "It does not publish: readers see the change after publish," so the agent can separate apply_edit from publish and propose_edit without opening a 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?

The description names both operating modes and the parameter that selects each: proposal_id on a kept site (from propose_edit or site_status), or the raw operations on a preview named by draft_id. It names alternatives explicitly (propose_edit to stage, publish to release, rollback to undo a kept version), giving a complete routing picture.

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.