Skip to main content
Glama

update_site_file

Change one or a few files of an already-published site, leaving every other file untouched (a merge - unlike deploy, which replaces the whole site). Ideal for small edits: fix a typo in index.html, swap a stylesheet, add one page. Best practice: call get_site_files first, edit the returned content, then call this with the files you changed and the expected_version from that read - if the site changed in the meantime you get a clear conflict telling you to re-read. Requires site_id + edit_token. Cannot delete files (use deploy to drop a file) and cannot remove index.html.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesThe files to change. Only these are written; all other files on the site survive.
site_idYesThe site id returned at publish time.
edit_tokenYesThe edit token returned at publish time.
expected_versionNoOptional but recommended. The `version` you got from get_site_files. If the site has changed since, the update is rejected with a conflict so you can re-read and re-apply. Omit to force last-writer-wins.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe live URL of the site.
site_idYesThe site's slug / id.
versionYesThe site's new version after the merge.
files_totalYesTotal number of files on the site after the merge.
files_writtenYesPaths of the files written in this update. All other files were left untouched.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "files_total": {
      +      "description": "Total number of files on the site after the merge.",
      +      "type": "integer"
      +    },
      +    "files_written": {
      +      "description": "Paths of the files written in this update. All other files were left untouched.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "site_id": {
      +      "description": "The site's slug / id.",
      +      "type": "string"
      +    },
      +    "url": {
      +      "description": "The live URL of the site.",
      +      "type": "string"
      +    },
      +    "version": {
      +      "description": "The site's new version after the merge.",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "site_id",
      +    "url",
      +    "version",
      +    "files_written",
      +    "files_total"
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=false, readOnlyHint=false, openWorldHint=true. The description adds important behavioral context the annotations don't: it's a merge not a replace, describes conflict behavior with expected_version, states auth requirements (edit_token), and adds two sharp limitations (cannot delete files, cannot remove index.html). Only missing details around rate limits or partial failure semantics.

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-loaded with the core merge semantic, followed by use-case examples, workflow guidance, and exclusions in dense sentences. It's on the wordier end but each sentence earns its place; no obvious filler.

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?

Covers purpose, workflow, conflict handling, auth prerequisites, and hard limitations. With an output schema present, no need to describe return values. Complete for an agent to call it correctly.

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 coverage is 100%, so parameters are fully documented in the schema. The description adds workflow semantics for expected_version (conflict on version mismatch) and reiterates required params, but doesn't add much new about parameter syntax beyond what's in the schema.

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+resource (change files of an already-published site) and precisely distinguishes from sibling deploy by describing the merge semantics. Tells the agent exactly what this does vs. what deploy does.

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?

Explicitly says when to use it ('Ideal for small edits: fix a typo, swap a stylesheet, add one page'), outlines a best-practice workflow (get_site_files first, edit, then call), and names alternatives in the negative ('Cannot delete files - use deploy to drop a file'). Nothing is left to inference.

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.