Skip to main content
Glama
szoran53
by szoran53

Write File

write_file
Destructive

Write plain-text content to a file, creating or overwriting it to save or update text data on Ubuntu/Linux systems; binary files are not supported.

Instructions

Write text content to a file (creates or overwrites). Text only — binary files are not supported. Requires appropriate filesystem permissions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to file
contentYesFile content to write

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the safety profile is covered. The description nonetheless adds genuinely useful behavior beyond that: overwrite semantics (existing content is destroyed), a text-only limitation excluding binary files, and a permission requirement. It does not address atomicity, encoding, or parent-directory creation.

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 compact clauses with zero filler. The most important information — what is written and that it can overwrite — is front-loaded, and the constraints follow in order of relevance.

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?

For a two-parameter destructive write with no output schema, the description covers the key risks an agent must know: overwrite behavior, text-only scope, and permission requirements. It stops short of stating whether missing parent directories are created, which is a common source of failed invocations.

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 100% (both 'path' and 'content' are documented, including that path is absolute and content is the file body). The description adds no per-parameter meaning beyond the schema, so the baseline of 3 is appropriate.

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 precise verb and resource ('Write text content to a file') and immediately clarifies both modes of operation (creates or overwrites). Within a sibling set that includes read_file, delete_file, and make_directory, the write semantics are unambiguous without naming an alternative.

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?

Usage is implied by the verb and the create/overwrite note, but there is no explicit guidance on when to prefer this tool over alternatives (e.g. shell redirection via run_command) and no prerequisites such as whether the parent directory must already exist. The 'requires appropriate filesystem permissions' clause hints at preconditions without specifying them.

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