Skip to main content
Glama

write_file

Writes or overwrites a file at a path inside the home dir or a configured repo, with each call blocked on in-app approval. Use it to save content to the device.

Instructions

Writes a file on the device, scoped to the home dir or a repo from list_repos. Disabled unless the user turned on Settings → Agents → "MCP: Allow exec/write", and every call still blocks on an in-app approval tap.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path under the home dir or a configured repo
contentYesFile content to write (overwrites the existing file)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantive work: it discloses the feature-flag gate, the human-in-the-loop approval block on every call, and the writable roots. It doesn't mention what is returned, whether missing parent directories are created, or that calling while disabled fails rather than no-ops.

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?

Two sentences, no filler. The gate and the approval requirement are front-loaded in the second sentence where an agent will see them before composing a call.

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 2-parameter write tool with full schema coverage and no output schema, the description covers the critical unknowns: permission gate, approval step, and path scope. Only return/failure semantics and directory-creation behavior are left implicit.

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%, so both path and content are already documented, including that content overwrites. The description adds one useful pointer beyond the schema — that repo paths come from list_repos — but otherwise relies on the schema. Baseline 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?

States a specific verb and resource (writes a file) plus the scope boundary: only the home dir or a repo obtained from list_repos. That scope is concrete and actionable, though it never contrasts itself with run_command, which is the sibling most likely to be confused with a write-capable tool.

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

Usage Guidelines4/5

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

Gives clear preconditions for use: the user must enable Settings → Agents → "MCP: Allow exec/write", and each call blocks on an approval tap. It also implicitly routes the agent to list_repos to obtain a valid repo path, but it doesn't state exclusions or say why an agent would pick this over run_command.

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