Skip to main content
Glama
QuantumFabricIndustries

phantom-snare

write_file

Write or overwrite file contents at any specified path using provided content, enabling direct file creation and updates.

Instructions

Write or overwrite the contents of a file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath of the file to write.
contentYesContent to write to the file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'overwrite' which implies a destructive write, but it does not clarify whether the tool creates the file if it does not exist, whether it appends or truncates, or what happens on error. The behavior is only partially disclosed.

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 description is a single, front-loaded sentence with no wasted words. It is appropriately concise, though it could include a bit more context without becoming verbose. The brevity is a strength, but it sacrifices necessary detail.

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

Completeness2/5

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

Given the absence of annotations and output schema, and the ambiguity with the sibling create_file, the description is incomplete. It does not explain the tool's role relative to create_file, nor does it disclose edge-case behavior. An agent cannot fully determine correct usage from this description alone.

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 input schema fully describes both parameters (path and content) with 100% coverage, so the baseline is 3. The description adds no extra meaning about path formats, content encoding, or special characters, but since the schema already covers the essentials, the description does not need to compensate.

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?

The description clearly states the action: 'Write or overwrite the contents of a file.' This identifies the verb and resource, and it is distinct from read_file and delete_file. However, it does not differentiate from the sibling create_file, so it is not fully distinguishing.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use write_file versus create_file or other alternatives. It does not mention conditions such as 'use when the file already exists' or 'use when you need to replace content.' The agent is left to infer usage from the tool name alone.

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