Skip to main content
Glama
isina-nej
by isina-nej

Write host file

write_file
Idempotent

Write text content to a file within the designated writable directory, optionally overwriting existing files.

Instructions

Write a text file inside an allowed writable host root.

Existing files are not replaced unless overwrite=true. Default writable root is the user's home directory. Configure HOST_MCP_WRITE_ROOTS to change it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
overwriteNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations, the description adds meaningful behavioral detail: existing files are not replaced unless overwrite=true, the default root is the user's home directory, and the writable roots can be configured via HOST_MCP_WRITE_ROOTS. This helps the agent reason about safety and side effects without contradicting the annotations.

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 sentences, each adding distinct value: the core action, the overwrite safety behavior, and the configuration mechanism. It is front-loaded and concise with no redundant wording.

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 relatively simple write tool with an output schema and supporting annotations, the description covers the essential behavior: allowed roots, overwrite semantics, and configuration. It does not cover edge cases like directory creation or error behavior, but the core information needed to invoke the tool correctly is present.

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 must compensate. It does explain the overwrite parameter's effect and gives path context via the writable root, but it does not clarify path format, content encoding, or what happens if the parent directory is missing. Parameter meaning is only partially enhanced.

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 tool writes a text file to an allowed writable host root, which is a specific verb and resource. It does not explicitly contrast itself with siblings like edit_file or apply_patch, but 'write' plus the root restriction makes the purpose clear 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 description gives useful context about writable roots and the overwrite flag, so an agent knows when this tool is applicable. However, it does not provide guidance about when to prefer edit_file or apply_patch instead, nor any explicit when-not-to-use conditions.

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

Deploy Server

Other Tools