Skip to main content
Glama

Update an existing site

update_site
DestructiveIdempotent

Change files on an existing site. Default mode 'patch' writes only the listed files and keeps the rest; delete: [paths] removes files. mode:'replace' deletes every file not listed. Preview with dryRun:true. Use deploy_site instead to create a new site. A 100-250 KB text file fits in one call with encoding:'gzip+base64' (gzip locally, then base64); prefer that over begin_deploy plus add_file_chunk. Fails with SITE_NOT_FOUND when the site does not exist.

Input Schema

NameRequiredDescriptionDefault
modeNopatch (default): write only the listed files; everything else stays. replace: delete every existing file and write only the listed ones.
nameNoSite name as shown by list_sites, e.g. my-portfolio. Provide name or siteId.
filesNoFiles to write: `[{path, content, encoding?}]` (preferred) or a `{path: content}` map. <= 500 MB total. May be omitted for a delete-only call in patch mode.
deleteNoPatch mode only: site-relative paths to remove; other files stay. Combine with `files` to rename in one call. Rejected in replace mode.
dryRunNoValidate and preview without writing; deletedFiles lists what would be removed. Use it before replace mode or a patch with `delete`.
siteIdNoSite id from list_sites or get_site. Use instead of name.

Output Schema

NameRequiredDescriptionDefault
urlYes
modeYesThe mode that was actually applied.
dryRunNoTrue on a dry run: nothing was written or deleted.
siteIdYes
warningsNoNon-blocking findings (e.g. DOTFILE_PUBLIC, leaked-secret patterns).
manageUrlNoDashboard page where the user manages this site (domains, versions, settings). Omitted on dry runs.
deletedFilesYesFiles removed by this call: the `delete` entries that existed (patch), or every file not in `files` (replace).
customHeadersNoResult of syncing the _headers file in the site root (site-wide /* response headers).
filesDeployedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / delete / description
      Previous value: -"Patch-mode only: site-relative paths to remove from the pod. Files not in this list are kept. Reported back in `deletedFiles` listing only entries that actually existed. Combine with `files` to atomically rename in one call (write new path + delete old path). Rejected in mode:'replace' since replace already removes anything not in `files`."New value: +"Patch mode only: site-relative paths to remove; other files stay. Combine with `files` to rename in one call. Rejected in replace mode."
    • changedInput schema / properties / dryRun / description
      Previous value: -"If true, validate input + introspect what would change but don't write or delete. Returns the same shape with `dryRun: true` and `deletedFiles` showing what *would* be removed. Use this before any destructive call (replace mode, or patch with `delete`) to verify the diff."New value: +"Validate and preview without writing; deletedFiles lists what would be removed. Use it before replace mode or a patch with `delete`."
    • changedInput schema / properties / files / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "properties": {
      -        "content": {
      -          "type": "string"
      -        },
      -        "encoding": {
      -          "description": "utf8 (default) treats content as a UTF-8 string written verbatim. base64 decodes content from base64 — required for binary files (images, fonts, PDFs); without it the literal base64 string lands on disk and the file is broken. gzip+base64 ships ~3–5× more raw text per tool call: gzip the bytes locally first, then base64-encode the gzip output. Server gunzips before writing.",
      -          "enum": [
      -            "utf8",
      -            "base64",
      -            "gzip+base64"
      -          ],
      -          "type": "string"
      -        },
      -        "path": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "path",
      -        "content"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "additionalProperties": {
      -      "type": "string"
      -    },
      -    "propertyNames": {
      -      "type": "string"
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "Array form; needed for binary files.",
      +    "items": {
      +      "properties": {
      +        "content": {
      +          "description": "File content: text, or base64 as set by encoding.",
      +          "type": "string"
      +        },
      +        "encoding": {
      +          "description": "utf8 (default): text written as is. base64: required for binary files (images, fonts, PDFs), otherwise the file is stored as broken text. gzip+base64: gzip locally, then base64; fits 3-5x more text per call.",
      +          "enum": [
      +            "utf8",
      +            "base64",
      +            "gzip+base64"
      +          ],
      +          "type": "string"
      +        },
      +        "path": {
      +          "description": "Path relative to the site root, e.g. index.html or assets/app.js. Plain ASCII, no leading slash.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "path",
      +        "content"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": {
      +      "type": "string"
      +    },
      +    "description": "Map form: path to UTF-8 text.",
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / files / description
      Previous value: -"Files to write. Array form `[{path, content, encoding?}]` (preferred) supports binary via encoding:'base64'; map form `{path: content}` is utf8-only. <= 500 MB total. Optional when `delete` is provided in patch mode for delete-only deploys."New value: +"Files to write: `[{path, content, encoding?}]` (preferred) or a `{path: content}` map. <= 500 MB total. May be omitted for a delete-only call in patch mode."
    • changedInput schema / properties / mode / description
      Previous value: -"patch (default): write only the listed files; everything else stays. replace: delete all existing files and write only the listed ones. Use replace only when you genuinely want to throw away the rest of the site."New value: +"patch (default): write only the listed files; everything else stays. replace: delete every existing file and write only the listed ones."
    • changedInput schema / properties / name / description
      Previous value: -"Site name (preferred)."New value: +"Site name as shown by list_sites, e.g. my-portfolio. Provide name or siteId."
    • changedInput schema / properties / siteId / description
      Previous value: -"Site id (alternative to name)."New value: +"Site id from list_sites or get_site. Use instead of name."
    • changedOutput schema / properties / customHeaders / description
      Previous value: -"Result of the Netlify-style _headers sync: ship a _headers file in the site root to override default response headers (e.g. Permissions-Policy). Site-wide (/*) rules only."New value: +"Result of syncing the _headers file in the site root (site-wide /* response headers)."
    • changedOutput schema / properties / deletedFiles / description
      Previous value: -"Files removed by this call. For patch mode this is the entries from `delete` that actually existed; for replace mode it's every pre-existing file not in `files`."New value: +"Files removed by this call: the `delete` entries that existed (patch), or every file not in `files` (replace)."
    • changedOutput schema / properties / dryRun / description
      Previous value: -"True if this was a dry-run; nothing was written or deleted."New value: +"True on a dry run: nothing was written or deleted."
    • addedOutput schema / properties / manageUrl
      Added value: +{
      +  "description": "Dashboard page where the user manages this site (domains, versions, settings). Omitted on dry runs.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / warnings / description
      Previous value: -"Surfaced issues that did not block the deploy (e.g. DOTFILE_PUBLIC, leaked-secret patterns)."New value: +"Non-blocking findings (e.g. DOTFILE_PUBLIC, leaked-secret patterns)."
  2. Changed1 schema field changed
    • removedOutput schema / properties / request_id
      Removed value: -{
      -  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • addedOutput schema / properties / customHeaders
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "applied": {
      +          "type": "number"
      +        },
      +        "changed": {
      +          "type": "boolean"
      +        },
      +        "warnings": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "applied",
      +        "changed",
      +        "warnings"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Result of the Netlify-style _headers sync: ship a _headers file in the site root to override default response headers (e.g. Permissions-Policy). Site-wide (/*) rules only."
      +}
  4. Changed1 schema field changed
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint/idempotentHint, but the description goes further: it explains exactly what gets destroyed in each mode (replace deletes every unlisted file), how delete interacts with patch, and the SITE_NOT_FOUND failure mode. This is real behavioral context beyond the annotation flags.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then mode semantics, then preview and sibling routing, then the size/encoding tip and failure mode. Every sentence carries information; nothing is padding.

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?

With a rich schema, full annotations, and an output schema, the remaining burden is usage routing, destruction semantics, failure modes, and payload sizing — all present. Nothing an agent needs to invoke this safely and correctly is missing.

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 100%, so the baseline is 3. The description adds value by tying parameters to concrete guidance not in the schema — the 100-250 KB single-call threshold for encoding:'gzip+base64', the preview discipline for dryRun, and the delete+files rename combination — rather than merely restating field meanings.

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 and resource ('Change files on an existing site') and immediately names the sibling it is not ('Use deploy_site instead to create a new site'). An agent can distinguish this from deploy_site, add_files, and update_file_content 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?

Gives explicit when-to-use routes: deploy_site for creating sites, dryRun:true before replace mode or deletes, and gzip+base64 preferred over begin_deploy plus add_file_chunk for 100-250 KB payloads. Alternatives and the conditions selecting them are spelled out.

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.