Skip to main content
Glama

Write many code files at once

sync_files
Destructive

Write many code files to a workspace in one all-or-nothing request, with SHA-256 integrity checks, optional local folder upload, and safe deletion of missing files.

Instructions

Writes MANY code files in ONE request — a whole site, from a list or straight from a folder on this machine (localDir; fonts and images are read as base64, hidden and build folders skipped). Use it instead of a write_file per file: one save, all or nothing, and every file carries a sha256 computed here that the server checks before storing anything, so a corrupted transfer stores none. Byte-identical files are reported unchanged and not rewritten. prefix puts local files under a workspace folder ("public" → public/index.html). deleteMissing removes workspace files the batch does not contain — only under prefix when one is given — and needs confirm:true.

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": {
      "workspaceId": "<workspaceId>"
    },
    "name": "sync_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoFiles to write. Omit when using localDir.
prefixNoWorkspace folder the local files go under, e.g. "public" — also the only place deleteMissing may delete.
confirmNoMust be true when deleteMissing is true. Omit/false previews.
localDirNoA folder on THIS machine to upload as-is (fonts and images are read as base64). Omit when sending files.
workspaceIdYes
deleteMissingNoDelete workspace files the batch does not contain (under prefix, if given). Needs confirm:true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.53.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, it discloses transactional behavior ('all or nothing'), server-side sha256 verification that rejects a corrupted batch, that byte-identical files come back as `unchanged` rather than rewritten, and how far deleteMissing can reach. These are exactly the consequences an agent needs before a destructive bulk write.

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?

The core claim and the sibling comparison come first, and every sentence carries content, but the paragraph is heavy with parenthetical asides and stacked clauses that slow scanning. It is efficient yet not maximally front-loaded or scannable.

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 six-parameter bulk writer with no output schema, it covers atomicity, integrity checking, no-op reporting, deletion scope, and preview-by-default. An agent has enough to call it safely and interpret the result without further documentation.

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 already 83%, so the schema carries most parameter documentation; the description still adds the concrete mapping example ('public' → public/index.html) and the undocumented behaviors of skipping hidden/build folders and base64-encoding fonts and images. It repeats a fair amount of what the schema already says about prefix/confirm, keeping it below 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?

The opening 'Writes MANY code files in ONE request' gives a specific verb, resource, and batching scope, and immediately contrasts it with a per-file write, so it is distinguishable from the write_file sibling without reading the 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?

It explicitly says 'Use it instead of a write_file per file' and names the selection condition (whole site / list / local folder). It also states when each input mode applies ('Omit when using localDir' vs 'Omit when sending files') and that deleteMissing needs confirm:true, leaving little to infer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.