Skip to main content
Glama

File Write

file_write
Destructive

Writes text to a local file — create, overwrite, or append. For .txt/.md/.csv/.json/.log and any plain-text or code file. (For Word use word_create, Excel excel_create, PowerPoint ppt_create.) Writes anywhere on this Mac, with two exceptions: files your machine runs by itself (shell startup files, LaunchAgents, git hooks, AI-client configs) and credential locations are never written. Overwriting an existing file keeps its previous version first, in LMCP's own folder, and the answer says where (previous_version); append=true adds to the end. Missing parent folders are created.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to the file to write
appendNoAppend to the end instead of overwriting (default false)
confirmNoIgnored; kept for older clients.
contentYesText content to write

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / confirm / description
      Previous value: -"Required (true) to OVERWRITE an existing file. Not needed to create a new file or to append."New value: +"Ignored; kept for older clients."
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare destructiveHint=true; the description goes beyond that by disclosing the safety carve-outs (no shell startup files, LaunchAgents, git hooks, AI-client configs, credential paths) and the recovery guarantee that overwrites keep a prior version and report its location via `previous_version`. That is exactly the context a destructive write tool needs, though rate limits or failure modes are unaddressed.

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?

Front-loaded with the core verb and resource, then the format routing, then the security exclusions and overwrite semantics. Dense but every sentence carries information; the format enumeration and the sibling parenthetical overlap slightly, which keeps it from a 5.

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

Completeness5/5

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

For a destructive, open-world=false write with a full output schema and complete parameter documentation, the description supplies everything missing: allowed scope, forbidden targets, append vs overwrite semantics, and backup behavior. Return-value detail is already covered by the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns an increment by tying `append=true` to adding to the end and by explaining the consequence of the default overwrite path (prior version preserved, path returned as `previous_version`). It also implicitly reinforces that missing parent folders are auto-created rather than erroring.

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 specific verb and resource ('Writes text to a local file') plus the three modes (create, overwrite, append) and the supported file classes. It explicitly routes document formats to siblings (word_create, excel_create, ppt_create), so an agent can distinguish it without opening a schema.

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

Usage Guidelines5/5

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

Names the alternatives and the condition that selects them: plain text/code files here, Word/Excel/PowerPoint via word_create/excel_create/ppt_create. It also declares the write-scope policy up front (two exception categories), so the agent knows when this tool is not permitted.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources