Skip to main content
Glama

batch_write_files

Write multiple files in a single operation, reducing permission prompts from one per file to one total.

Instructions

Creates or updates multiple files in a single tool call. Reduces permission prompts from N to 1. Parameters: files: Dictionary of {"relative/or/abs/filepath": "file_content"} base_dir: Optional root directory (defaults to server CWD)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
sourceNo
base_dirNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

The description states it 'creates or updates' files, which is informative, but it does not mention whether it overwrites existing content without confirmation, whether it creates parent directories, or whether the operation is atomic. Given no annotations, lacks critical behavioral details that affect how an agent might use it.

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?

The description is exceptionally concise, consisting of two short sentences. It avoids unnecessary detail and gets straight to the point, making it easy to parse and remember.

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 gives a basic overview but omits important context such as return value structure, error handling behavior, and the purpose of the 'source' parameter. While it is sufficient for a simple batch write, the lack of these details may leave an agent uncertain about edge cases.

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?

The description explains the 'files' parameter as a dictionary mapping paths to content, and 'base_dir' as an optional root directory with a default. However, the 'source' parameter is not described at all, leaving its meaning ambiguous. Since only two of three parameters are covered, coverage is incomplete.

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 clearly states the tool's function: it creates or updates multiple files in one call. It also implies a distinction from single-file operations, aligning with the sibling tools like write_file and edit_file, so the purpose is unambiguous.

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?

It provides a concrete usage scenario by noting it reduces permission prompts from N to 1, implying preference for batched writes when multiple files are involved. However, it does not explicitly contrast with alternatives like a loop of write_file calls or when to avoid using it (e.g., when you need individual error handling).

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