Skip to main content
Glama
redf0x1

MCP-Server-Filesystem

by redf0x1

write_file

Create a new file or fully overwrite an existing one with provided text content. Ensures proper encoding and restricts operations to allowed directories.

Instructions

Create a new file or completely overwrite an existing file with new content. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding. Only works within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It explicitly warns about destructive overwriting ('will overwrite existing files without warning'), mentions text encoding ('proper encoding'), and notes path constraints ('Only works within allowed directories'). This is strong transparency for a write tool.

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 three sentences, front-loaded with the primary action, and each sentence adds crucial information (overwrite semantics, caution, encoding, directory restriction). It is concise without being underspecified.

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 two-parameter write_file tool with no output schema and no annotations, the description provides essential context: the destructive nature, text handling, and directory restrictions. It does not mention return values or error behavior, but these are less critical for a straightforward write operation.

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 provides no descriptions (0% coverage), so the tool description must compensate. It indirectly explains that 'content' is the new text payload and that 'path' refers to a file location subject to allowed directories, but it does not elaborate on path formats, file type restrictions, or any content size limits. Some meaning is added but not comprehensive.

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?

The description opens with a specific verb plus resource: 'Create a new file or completely overwrite an existing file with new content.' This clearly distinguishes it from sibling render_file by emphasizing complete overwrite, and it is easy to understand exactly what the tool does.

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 implies when to use the tool—for creating or fully replacing files—but does not explicitly name alternatives like edit_file for partial modifications. The cautionary phrase 'Use with caution' gives some situational context, but there is no explicit when-to-use versus when-not-to-use guidance.

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

Install Server

Other Tools

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/redf0x1/MCP-Server-Filesystem'

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