Skip to main content
Glama
MCP Filesystem Server

MCP Filesystem Server

by pocho23

write_file

Write content to a file at a specified path in allowed directories (Documents or Downloads) to save generated or updated text while respecting filesystem restrictions.

Instructions

Write content to a file in allowed directories (Documents, Downloads)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the file to write
contentYesContent to write to the file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and it does not disclose whether an existing file is overwritten or appended, whether parent directories are created, what encoding is used, or what happens on failure. For a mutation tool with zero annotation coverage, these omissions are significant.

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?

A single front-loaded sentence with no wasted words. Its brevity is efficient, though it borders on under-specification for a write operation.

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

Completeness2/5

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

For a two-parameter mutation tool with no annotations and no output schema, the description should cover overwrite/create semantics and failure behavior. It covers only the directory constraint, leaving an agent unable to predict the effect of calling it on an existing file.

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 coverage is 100%, so both parameters are fully documented in the schema and the baseline is 3. The description adds one useful piece of meaning by constraining the path to allowed directories, but adds nothing about content handling or path format.

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 (write content to a file) plus a scope constraint on where it applies. It is clearly distinguishable from siblings like read_file and delete_file by the verb alone, though it does not explicitly name an alternative.

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 allowed-directories note (Documents, Downloads) gives a real usage constraint that tells the agent where the tool is valid. However, it offers no guidance on when to use this versus create/save-related siblings, and no prerequisites or exclusions are stated.

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