Skip to main content
Glama

Write files into the editable source tree

write_source_files
DestructiveIdempotent

Stage edits to a site's editable source tree (not the live dist). Use list_source_files first to discover what's there. The dist is unchanged until you re-deploy via update_site or run build_and_deploy. Sites have source storage enabled by default; if a legacy site doesn't, the call fails with SOURCE_STORAGE_NOT_ENABLED and the user should contact VibeDeploy support to enable it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
filesYesFiles to write into the source tree. Same wire shape as add_files. Re-writing a path overwrites the previous source. Per-file cap 5 MB; per-call cap 50 MB; max 200 files per call.
siteIdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
siteIdYes
writtenYes
warningsNoSecret-scanner findings in the written files that did not block the write. Malicious content blocks the whole call with MALICIOUS_CONTENT; dotfiles other than .well-known/ and build config (.npmrc, .nvmrc, .env.example, ...) are rejected with INVALID_PATH.
totalBytesYes
totalFilesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / properties / request_id
      Removed value: -{
      -  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      -  "type": "string"
      -}
  2. Changed1 schema field changed
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "description": "Secret-scanner findings in the written files that did not block the write. Malicious content blocks the whole call with MALICIOUS_CONTENT; dotfiles other than .well-known/ and build config (.npmrc, .nvmrc, .env.example, ...) are rejected with INVALID_PATH.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "file": {
      +        "type": "string"
      +      },
      +      "line": {
      +        "type": "number"
      +      },
      +      "match": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "file",
      +      "line",
      +      "type",
      +      "match"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate readOnly=false, destructiveHint=true, and idempotentHint=true. The description adds meaningful context beyond annotations: writes are staged, live dist is not affected until redeploy, and there is a specific failure mode for legacy sites. No contradiction with annotations.

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?

Every sentence earns its place: the first defines the operation, the second gives a prerequisite, and the third explains an important failure behavior. It is compact, front-loaded, and free of filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the staging workflow, redeploy requirement, and a failure mode, and an output schema exists so return values need not be explained. However, it leaves a significant gap around site identification (name vs siteId), which an agent needs to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33%, yet the description adds no parameter-specific meaning. The files array is well documented in the schema, but name and siteId have no explanation anywhere, and the description does not clarify how the site is selected or which identifier is preferred.

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 states a specific verb ('Stage edits') and resource ('a site's editable source tree') and immediately distinguishes it from the live dist. This clearly differentiates it from sibling write tools like add_files or update_file_content.

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

Usage Guidelines4/5

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

The description gives clear usage context: use list_source_files first, understand that the dist is unchanged until redeploy, and know that legacy sites may fail with SOURCE_STORAGE_NOT_ENABLED. It does not explicitly enumerate alternatives or contrast with add_files, but the guidance is strong enough for an agent to decide when to use 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.