Skip to main content
Glama

Change some files of a site

patch_site
Destructive

Changes some files of a live site and keeps the rest: files are added or replace the live file at the same path, deletePaths are removed, and every other live file stays exactly as it is. The result is published atomically as a new version, under the same rules as any deploy: the whole site afterwards needs a root index.html and must fit 200 files and the plan's site size (4 MB on Hobby, 25 MB on a paid plan); one call carries at most 4 MB. It starts from the live version, never from an unpublished draft. A deletePath that is not a live file is refused, naming it. When the monthly deployment allowance is used up, the result is saved as a draft and published is false.

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": {
      "siteId": "<siteId>"
    },
    "name": "patch_site"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoFiles to add, or to replace the live file at the same path.
siteIdYes
messageNoShown in deployment history. e.g. "Updated opening hours"
deletePathsNoPaths of live files to remove, e.g. "old-offer.html".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / files / items / properties / content / description
      Added value: +"Required unless fromUpload is given."
    • addedInput schema / properties / files / items / properties / fromUpload
      Added value: +{
      +  "description": "An imageId from list_uploads, in place of content: that photo as it was processed. The path needs its format's extension: .jpg or .jpeg for a JPEG, .png for a PNG, .webp for a WebP image.",
      +  "type": "string"
      +}
    • changedInput schema / properties / files / items / required
      Previous value: -[
      -  "path",
      -  "content"
      -]New value: +[
      +  "path"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the annotations (destructiveHint=true, idempotentHint=false) by disclosing atomic publication as a new version, the 200-file / 4 MB-per-call / plan-size limits, the root index.html requirement, validation that refuses an unknown deletePath by name, and the draft fallback with published=false when the monthly allowance is gone.

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?

Front-loads the core patch semantics before the constraints, and the limit and error details follow in a sensible order. The sentences are long and dense (three clauses about size limits in one), leaving a little trimming on the table.

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 everything an agent needs: preconditions, size limits, atomicity, failure modes, and even the meaning of the published=false result. Nothing material is left to guess.

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 75%, so the baseline is 3, but the description adds real meaning: 'files' add or replace at the same path, 'deletePaths' remove live files and are refused if not live. 'message' and 'siteId' get no mention, so it does not fully compensate for the remaining coverage gap.

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 ('Changes some files of a live site and keeps the rest') and immediately spells out the three patch semantics (add, replace, delete) that separate it from a full deploy. It never names deploy_site or update_site, but the 'keeps the rest' framing makes the distinction inferable 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 Guidelines4/5

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

Gives clear operating context: the patch always starts from the live version and never an unpublished draft, so an agent knows a draft-editing task belongs elsewhere. It also flags the allowance-exhausted path. It stops short of naming an explicit alternative tool or a when-not-to-use rule, which keeps it out of 5 territory.

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