Skip to main content
Glama

write_file

Write or update a file at a specified path, automatically creating a backup of any existing file to prevent data loss.

Instructions

Write or update a file. Automatically creates backup of existing files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path to write
contentYesContent to write
create_backupNoCreate backup of existing file (default: true)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of disclosing side effects. It does disclose the important behavior 'Automatically creates backup of existing files', which adds value beyond just naming the operation. However, it does not mention overwrite semantics, whether directories are created, or failure behavior.

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 two short sentences that immediately state the primary purpose and then the key side effect. Every sentence earns its place, and there is no redundant or filler text.

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 simple file-writing tool with full schema coverage, the description is largely sufficient. It communicates the operation and the backup side effect, though it omits the return value and fails to specify behavior on overwrite—both useful but not blocking for a basic invocation.

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 already provides 100% coverage for all three parameters, including descriptions for path, content, and create_backup. The description does not add parameter-specific meaning beyond what the schema provides, so the baseline score of 3 applies.

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 update') and the resource ('a file'), so an agent can tell this is the modification tool among siblings like read_file and delete_file. It does not explicitly contrast with those siblings, but the verb is unambiguous and specific enough.

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 intended usage is implied by the tool name and the description's verb ('write' or 'update'), but there is no explicit guidance on when to choose this over an alternative, nor any mention of prerequisites or edge cases. An agent would infer its use, but it isn't explicitly told.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/For-Sunny/darkside-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server