Skip to main content
Glama

Write site files

write_site_files
Destructive

Writes (creates or replaces) up to 25 web files in a customer's SHARED hosting site's web root and publishes them immediately — this is how an assistant puts an edit on the live site. Full file contents only (no patches): read_site_file first, apply the customer's change, send the whole file back. Web file types only (HTML, CSS, JS, JSON, text, SVG, images, fonts); never PHP, .htaccess or hidden files. The previous version of every replaced file is kept in a restore point outside the served tree. Two-step: (1) confirm:false previews the paths and sizes and says which site; read it to the customer and get an explicit yes. (2) ONLY after an explicit yes in their most recent message, call with confirm:true. 2 MB per call, 1 MB per file; a whole site goes through "Move a site here" in the dashboard, not this.

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": {
      "domain": "<domain>",
      "files": "<files>"
    },
    "name": "write_site_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesThe files to write, each with its full content.
domainYesThe hosted site's domain.
confirmNofalse (default) returns the preview; true writes and publishes. Pass true ONLY after explicit user confirmation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive/non-idempotent, but the description adds substantial context beyond them: replaced files are preserved in a restore point outside the served tree, writes publish immediately to the live site, and there are hard limits of 2 MB per call and 1 MB per file. It also discloses a prohibited-content rule (no PHP, .htaccess or hidden files) that an agent could not infer from annotations.

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 verb, scope and publish effect, then constraints and the numbered two-step protocol. Dense but nearly every sentence carries an operational rule; slight redundancy with the schema's confirm description keeps it from a 5.

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, high-stakes write tool with no output schema, the description covers limits, file-type restrictions, reversibility via restore point, and the confirmation gate. An agent has everything needed to call it safely and correctly.

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, but the description adds real meaning: files must carry full contents rather than patches, only certain file types are permitted, and confirm encodes a gated two-step protocol rather than a simple toggle. It stops short of explaining path edge cases or what the preview returns in detail, so not a 5.

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 ("Writes (creates or replaces) up to 25 web files") plus the exact location and effect ("in a customer's SHARED hosting site's web root and publishes them immediately"). It also differentiates from siblings by naming read_site_file as the prerequisite and pointing site-wide transfers to the dashboard instead.

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 an explicit ordered workflow: read_site_file first, apply the change, send the whole file, then preview with confirm:false, get an explicit yes in the customer's most recent message, then call with confirm:true. It also states a clear when-not: a whole site goes through "Move a site here" in the dashboard, not this tool.

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