Skip to main content
Glama

Update an existing site

update_site
DestructiveIdempotent

Patch or replace files on an existing site. Defaults to patch mode: only the listed files change; everything else stays. Pass mode:'replace' to wipe-and-replace the whole site (the legacy behaviour, surfaced explicitly so it can't happen by accident). Use delete: [paths] in patch mode to remove specific files without wiping the rest. Use dryRun: true to preview the diff before committing. LARGE FILES: a 100-250 KB text file fits in one call with encoding:'gzip+base64' (gzip locally, base64 the result) — prefer that over begin_deploy + add_file_chunk streaming. Errors if the site does not exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNopatch (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.
nameNoSite name (preferred).
filesNoFiles 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.
deleteNoPatch-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`.
dryRunNoIf 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.
siteIdNoSite id (alternative to name).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
modeYesThe mode that was actually applied.
dryRunNoTrue if this was a dry-run; nothing was written or deleted.
siteIdYes
warningsNoSurfaced issues that did not block the deploy (e.g. DOTFILE_PUBLIC, leaked-secret patterns).
request_idNoServer-assigned request correlation id. Quote it when contacting support.
deletedFilesYesFiles 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`.
customHeadersNoResult 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.
filesDeployedYes

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint and readOnlyHint, but the description goes much further: it warns about the destructive wipe-and-replace legacy behavior, explains that only listed files change in patch mode, details the encoding trade-offs with gzip+base64, and notes that delete is rejected in replace mode. There is no contradiction between annotations and the text; both align that this is a write-capable, destructive-capable tool.

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?

The description is dense but well-organized: mode breakdown, deletion, dry-run, large-file strategy, and error behavior are each mentioned in a single focused sentence. Every clause adds value; there is no repetition or filler. The front-loading of 'Patch or replace files' allows the agent to quickly understand the core action even before reading the details.

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?

Given the tool has six parameters and a rich output schema, the description fills the most important usage gaps that raw schema cannot provide: when to choose replace over patch, how to preview changes with dryRun, how to handle large files efficiently, how to perform atomic renames, and the side-effect of deletion. It gives the agent complete operational context for a powerful and destructive operation.

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?

The schema already provides 100% coverage with detailed inline descriptions for parameters. The description adds meaningful context beyond that, such as large file recommendations (100-250 KB text files with gzip+base64), the delete-only deploy flow, and atomic rename semantics. This extra guidance helps the agent choose encodings and batch operations more effectively.

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?

The description begins with a clear verb and resource: 'Patch or replace files on an existing site.' It then specifies the operational modes (patch vs replace), making it immediately distinct from siblings like update_file_content, write_source_files, or begin_deploy. The scope is unambiguous and the tool's purpose is not just stated but fully operationalized.

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?

The description explicitly tells the agent when to use each mode ('Defaults to patch mode', 'Pass mode:v replace'), how to target deletions, and when to use 'dryRun: true' to avoid destructive mistakes. It even names an alternative approach for large files and recommends preferring this tool over begin_deploy + add_file_chunk, which is excellent alternative guidance.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose, from deployment and file management to domain configuration and analytics. Even similar-sounding tools like add_files and add_file_chunk are well-differentiated by context and use case.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case (e.g., add_custom_domain, list_sites, delete_source_file). The naming is predictable and easy to understand.

Tool Count4/5

39 tools is higher than the typical 3-15 range, but each tool serves a necessary function for a comprehensive deployment platform. The count is justified by the broad feature set, though slightly heavy.

Completeness5/5

The tool set covers the full lifecycle of site deployment, management, backup, custom domains, form handling, analytics, and source editing. There are no obvious gaps for the intended functionality.