Skip to main content
Glama

Write several files

files_writeMany
Destructive

Create or overwrite SEVERAL files in ONE call. Use this when creating a project: index.html, style.css and package.json go in a single call instead of one files.write each, which costs a round trip per file. Files are written in the order given; if one fails the call stops and the reply says exactly which ones landed, so you never write the same file twice.

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": {
      "id": "<id>",
      "files": "<files>"
    },
    "name": "files_writeMany"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
filesYesWritten in order. All the content together is capped at 5 MB: split a bigger batch across calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructive, non-idempotent, closed-world behavior, and the description adds genuinely new execution semantics: sequential ordering, fail-fast abort, and a partial-success reply that names which files landed. That is precisely the failure-mode information an agent needs for a mutating batch. Auth/permission requirements and whether parent directories are auto-created are not covered, keeping it below top marks.

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?

Three sentences, front-loaded with the create/overwrite-and-batch claim, followed by the use case and the failure semantics. Little waste; the 'never write the same file twice' clause slightly restates the partial-report guarantee but reinforces the ordering contract.

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

Completeness4/5

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

With no output schema, the description correctly takes on the job of describing what comes back on success and on partial failure. For a destructive two-parameter batch write it is nearly sufficient, missing only what 'id' identifies and whether directories are created implicitly.

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

Parameters3/5

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

Schema coverage is 50%, and the nested properties (path, content, mode) carry their own descriptions, so the baseline is a 3. The description reinforces ordering and the project-file example but never explains the required top-level 'id' parameter, which is the least self-evident input — that half of the coverage gap is not compensated for.

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 with explicit batch scope: 'Create or overwrite SEVERAL files in ONE call.' It contrasts directly with the single-file sibling ('instead of one files.write each'), so an agent can pick between files_writeMany, files_write and files_editMany 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 Guidelines4/5

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

Gives a concrete when-to-use trigger ('Use this when creating a project: index.html, style.css and package.json') and names the alternative it replaces, files.write, with the cost rationale of one round trip per file. It stops short of an explicit exclusion for a single-file write or a pointer to the edit-style batch sibling, so it is strong but not fully symmetric 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.

Resources