Skip to main content
Glama
duplonicus
by duplonicus

write_file

DestructiveIdempotent

Create a file or overwrite its entire contents in a WSL distribution, automatically creating any missing parent folders.

Instructions

Create a file or replace it whole. Missing parent folders are created.

path: the file to write. content: the complete new contents.

Input Schema

NameRequiredDescriptionDefault
pathYes
contentYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds real context beyond that: the whole-file replacement semantics (existing content is destroyed, not merged) and the automatic creation of missing parent folders, which no annotation states.

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?

Three short lines, zero waste, with the core action and the parent-folder side effect front-loaded before the parameter glosses. Every sentence earns its place.

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?

An output schema exists, so return values need not be explained, and annotations cover the destructive/idempotent profile. What remains is minor: no path format guidance and no explicit pointer to edit_file, but the definition is sufficient to invoke the tool correctly.

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 description coverage is 0%, so the description carries the burden for both parameters. "content: the complete new contents" usefully reinforces that the value must be the entire file rather than a patch, but "path: the file to write" is a near-tautology and no format, encoding, or relative-vs-absolute guidance is given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Create a file or replace it whole" is a specific verb+resource with a clear scope qualifier that separates it from the sibling edit_file, which implies partial modification. It stops short of naming that sibling explicitly, so it is clear but not fully differentiated.

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

Usage Guidelines3/5

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

The phrase "replace it whole" hints at when this is appropriate (full-file rewrites vs. incremental edits), but there is no explicit when-to-use/when-not guidance and the sibling edit_file is never named. Usage must be inferred from the contrast.

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