Skip to main content
Glama

Write multiple files

write_files
Destructive

Use this when the user asks to create or replace the complete contents of two or more independent text files in one batch. For one path use write_file; for partial edits use edit_block, replace_lines, replace_in_files, or apply_patch instead of rewriting whole files.

Input Schema

NameRequiredDescriptionDefault
filesYesFiles to write, at most 200 per call.
deviceYesReMCP device id returned by list_devices. Required for every device operation.

Output Schema

NameRequiredDescriptionDefault
dataNoOptional structured result data for follow-up reasoning and tool calls.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, and the description adds meaningful context by clarifying that the operation replaces complete file contents rather than performing a partial mutation. It also emphasizes batching of independent files and contrasts with rewrite-avoiding alternatives, which is useful beyond the raw boolean hints.

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?

Two sentences, front-loaded with the primary use case, followed by precise routing to alternatives. Every sentence earns its place with no repetition of schema 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?

For a batch-write tool with full schema documentation and an output schema, the description fully covers selection criteria and alternative routing. Nothing needed for correct invocation is missing.

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. The description adds semantic value by constraining files to 'two or more' and 'independent' text files and by describing the operation as a single batch, which is not captured in the schema.

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 and resource: create or replace the complete contents of two or more independent text files in one batch. It also distinguishes this from write_file and partial-edit tools by naming them explicitly.

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?

Provides explicit when-to-use guidance ('two or more independent text files in one batch') and clear alternatives for other cases ('For one path use write_file; for partial edits use edit_block...'). This directly helps the agent route to the correct sibling 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