Skip to main content
Glama

Edit site

edit_site
Destructive

Change a live site at the same link with targeted edits. Call read_site first and pass its versionId as baseVersionId. Put every requested change in this one call: only the last 10 versions are kept. replacements swap an exact oldText from read_site (found once unless replaceAll) for newText; writes add or overwrite whole files; deletes remove files. All apply together or not at all, as a new version named versionName. Keep {{ vars.* }} and {{ attim.links.* }} placeholders. A temporary site needs its claimToken.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "slug": "<slug>",
      "baseVersionId": "<baseVersionId>"
    },
    "name": "edit_site"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesSlug or link.
writesNo
deletesNo
claimTokenNo
versionNameNoShort, like "Added Q3 numbers".
replacementsNo
baseVersionIdYes

Output Schema

NameRequiredDescriptionDefault
slugYes
changesNo
siteUrlYes
versionIdYes
versionNameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed28 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / baseVersionId / anyOf
      Removed value: -[
      -  {
      -    "pattern": "^[1-9][0-9]*$",
      -    "type": "string"
      -  },
      -  {
      -    "minimum": 1,
      -    "type": "integer"
      -  }
      -]
    • removedInput schema / properties / baseVersionId / description
      Removed value: -"The versionId read_site returned. If the site changed since, the edit is refused."
    • addedInput schema / properties / baseVersionId / type
      Added value: +"string"
    • removedInput schema / properties / claimToken / minLength
      Removed value: -8
    • removedInput schema / properties / deletes / items / minLength
      Removed value: -1
    • removedInput schema / properties / replacements / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / replacements / items / properties / newText / description
      Removed value: -"The text to put in its place; empty removes it."
    • removedInput schema / properties / replacements / items / properties / oldText / description
      Removed value: -"The exact current text, copied from read_site."
    • removedInput schema / properties / replacements / items / properties / oldText / minLength
      Removed value: -1
    • removedInput schema / properties / replacements / items / properties / path / minLength
      Removed value: -1
    • removedInput schema / properties / replacements / items / properties / replaceAll / default
      Removed value: -false
    • removedInput schema / properties / replacements / items / properties / replaceAll / description
      Removed value: -"Change every occurrence instead of requiring exactly one."
    • changedInput schema / properties / slug / description
      Previous value: -"The site slug, or its link."New value: +"Slug or link."
    • removedInput schema / properties / slug / minLength
      Removed value: -1
    • changedInput schema / properties / versionName / description
      Previous value: -"A short name for the new version, like \"Added Q3 numbers\"."New value: +"Short, like \"Added Q3 numbers\"."
    • removedInput schema / properties / versionName / minLength
      Removed value: -1
    • removedInput schema / properties / writes / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / writes / items / properties / contentType / minLength
      Removed value: -1
    • removedInput schema / properties / writes / items / properties / path / minLength
      Removed value: -1
    • removedOutput schema / properties / anonymous
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedOutput schema / properties / changes / items / properties / replacements
      Removed value: -{
      -  "type": "integer"
      -}
    • removedOutput schema / properties / changes / items / properties / sizeAfter
      Removed value: -{
      -  "type": "integer"
      -}
    • removedOutput schema / properties / changes / items / properties / sizeBefore
      Removed value: -{
      -  "type": "integer"
      -}
    • removedOutput schema / properties / changes / items / required
      Removed value: -[
      -  "path",
      -  "action"
      -]
    • removedOutput schema / properties / previousVersionId
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / status
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / title
      Removed value: -{
      -  "type": "string"
      -}
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already flag destructiveHint and openWorldHint, and the description adds substantial context beyond them: atomic all-or-nothing application, version retention ('only the last 10 versions are kept'), the resulting new version named versionName, and the placeholder preservation requirement. These are exactly the operational constraints an agent needs before invoking a destructive 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?

Dense and front-loaded: the core action comes first, then the read_site prerequisite, then the batching rule, then per-parameter semantics. No filler sentences, though the parameter enumeration runs together in a single block rather than being visually separated.

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

Completeness4/5

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

For a destructive mutation tool with an output schema (so return values need not be described), the description covers prerequisites, atomicity, retention limits, and version naming. The only gap is guidance on the content-encoding parameters and any indication of size or rate limits.

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?

With only 29% schema description coverage, the description does the compensating work: it explains baseVersionId's origin, that replacements match an exact oldText found once unless replaceAll, that writes add or overwrite whole files, that deletes remove files, and what versionName/claimToken are for. Only the file-content parameters (contentType, contentBase64) and slug are left unexplained.

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

Purpose4/5

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

States a specific verb and resource ('Change a live site at the same link with targeted edits') and clarifies the mode of change (targeted edits, new version, same link). It is distinguishable from read-only siblings like read_site, though it does not explicitly differentiate itself from the similarly named update_site.

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?

Gives concrete prerequisites ('Call read_site first and pass its versionId as baseVersionId') and directs the agent to batch everything into one call. It also notes the claimToken requirement for temporary sites. It stops short of explicitly saying when to prefer a different mutation tool, but the workflow context is clear.

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