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 requires confirm=true (the first call returns a preview instead); append=true adds to the end and never needs confirm. Missing parent folders are created.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the file to write
appendNoAppend to the end instead of overwriting (default false)
confirmNoRequired (true) to OVERWRITE an existing file. Not needed to create a new file or to append.
contentYesText content to write

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=true): it discloses the confirm=true preview-then-write workflow, that append never needs confirm, that missing parent folders are auto-created, and the hard no-write zones (shell startup files, LaunchAgents, git hooks, AI-client configs, credential locations). This is exactly the mutation-side context annotations cannot carry.

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?

Front-loads purpose, then formats, alternatives, security boundaries, and write semantics in a tight sequence of short clauses. Despite covering a lot, no sentence is redundant and every clause carries actionable information.

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 write tool with four params and an output schema, the description covers safety boundaries, the confirm/append decision, and path-creation behavior. Since an output schema exists, return values need no explanation, and nothing an agent needs to invoke it correctly is missing.

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, but the description adds real meaning: it explains that confirm triggers a preview on first call and is unnecessary for new files or appends, and that append adds to the end. This clarifies the interaction between the two boolean flags beyond their individual schema descriptions.

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') and immediately enumerates the three modes (create, overwrite, append). It also names the sibling tools it is not (word_create, excel_create, ppt_create), so an agent can distinguish it from adjacent document tools without inspection.

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 context: the supported file types (.txt/.md/.csv/.json/.log and plain-text/code) and explicit routing to word_create/excel_create/ppt_create for office formats. It does not, however, address when to prefer local file_write over cloud siblings like gdrive_write_file or onedrive_write_file, so the when-not guidance is incomplete.

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