Skip to main content
Glama

Update a site

update_site
DestructiveIdempotent

Replaces the files of a slug owned by the token, or, when merge is true, adds and overwrites only the paths sent. Inputs: slug, files, and optional spa, merge, expected_version, via, and token. Returns url, path_url, slug, and a new version. When expected_version does not match the live version, the result is version_conflict and nothing is written. Two racing updates return version_conflict even without expected_version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spaNoServe index.html for unknown paths.
viaNoOptional label stored with the publish. At most 80 characters. An IP address, a URL, or an email address is not stored. A non-empty value replaces the X-Via header.
slugYesSlug you own. Must match ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$. Not rewritten. Reserved slugs are rejected.
filesYesPath map, or an array of {path, content} or {path, base64}. Paths are stored exactly as given (a single top-level directory is not removed). Text as a string, binary as {"base64":"..."}. Example: {"index.html":"<!doctype html><h1>Hi</h1>","img/logo.png":{"base64":"iVBOR..."}}. Any other array is rejected.
mergeNoKeep every path you do not send, and add or overwrite only these exact paths.
tokenNoBearer token returned by your first publish (deed_tok_...). Optional if the MCP client sends Authorization: Bearer.
expected_versionNoLive version this update is based on, such as "v3". If the site has moved on, the call returns version_conflict with no write. Omit it and a concurrent update still returns version_conflict rather than dropping files.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / via
      Added value: +{
      +  "description": "Optional label stored with the publish. At most 80 characters. An IP address, a URL, or an email address is not stored. A non-empty value replaces the X-Via header.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / files / description
      Previous value: -"Map of relative path to file contents. Paths are stored exactly as given (a single top-level directory is not removed). Text as a string, binary as {\"base64\":\"...\"}. Example: {\"index.html\":\"<!doctype html><h1>Hi</h1>\",\"img/logo.png\":{\"base64\":\"iVBOR...\"}}"New value: +"Path map, or an array of {path, content} or {path, base64}. Paths are stored exactly as given (a single top-level directory is not removed). Text as a string, binary as {\"base64\":\"...\"}. Example: {\"index.html\":\"<!doctype html><h1>Hi</h1>\",\"img/logo.png\":{\"base64\":\"iVBOR...\"}}. Any other array is rejected."
  3. Changed1 schema field changed
    • addedInput schema / properties / expected_version
      Added value: +{
      +  "description": "Live version this update is based on, such as \"v3\". If the site has moved on, the call returns version_conflict with no write. Omit it and a concurrent update still returns version_conflict rather than dropping files.",
      +  "type": "string"
      +}
  4. Changed3 schema fields changed
    • changedInput schema / properties / files / description
      Previous value: -"Map of relative path to file contents. Text as a string, binary as {\"base64\":\"...\"}. Example: {\"index.html\":\"<!doctype html><h1>Hi</h1>\",\"img/logo.png\":{\"base64\":\"iVBOR...\"}}"New value: +"Map of relative path to file contents. Paths are stored exactly as given (a single top-level directory is not removed). Text as a string, binary as {\"base64\":\"...\"}. Example: {\"index.html\":\"<!doctype html><h1>Hi</h1>\",\"img/logo.png\":{\"base64\":\"iVBOR...\"}}"
    • changedInput schema / properties / merge / description
      Previous value: -"Keep existing files and add/overwrite only these paths."New value: +"Keep every path you do not send, and add or overwrite only these exact paths."
    • changedInput schema / properties / slug / description
      Previous value: -"Slug you own."New value: +"Slug you own. Must match ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$. Not rewritten. Reserved slugs are rejected."
  5. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint, idempotentHint) by disclosing optimistic-concurrency behavior: a mismatched expected_version yields version_conflict and nothing is written, and two racing updates also return version_conflict rather than silently dropping files. That atomicity/conflict contract is exactly the kind of behavior an agent cannot infer from structured fields.

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 replace/merge distinction, then conflict semantics; no filler. The 'Inputs: slug, files, and optional ...' enumeration is mildly redundant given the schema but is short and scannable.

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?

With no output schema, the description usefully names the return payload (url, path_url, slug, new version) and the primary failure mode, which is what an agent needs. It is silent on other failure modes (invalid slug, reserved slug) and on overwrite/destroy scope beyond the merge wording, so it is strong but not exhaustive for a 7-param destructive tool.

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%, so every parameter (spa, via, slug, files, merge, token, expected_version) is already documented in the schema. The description's input list and merge/conflict notes largely restate that, so the baseline 3 applies.

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: replaces the files of a slug owned by the token, and spells out the two write modes (full replace vs merge). An agent can tell what it does without opening the schema, though it never names a sibling (e.g. publish_site) to disambiguate the write path.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is only implied through the merge flag semantics; there is no explicit when-to-use-this-vs-publish_site/restore_version guidance and no stated preconditions beyond token ownership. Adequate but leaves tool selection 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.

Resources