Skip to main content
Glama
Local Development MCP Server

Local Development MCP Server

by lreb

write-file

Writes content to a specified file and creates any missing parent directories, so file output works without manual folder setup.

Instructions

Write content to a file, creating directories if needed

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
contentYesContent to write to the file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations at all, the description carries the full burden for a mutating file operation. It does not say whether existing files are overwritten or truncated, what encoding is used, whether paths are sandboxed, or what the response contains—all critical for a write tool an agent may invoke destructively.

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?

A single front-loaded sentence with no redundant wording; the most important scope detail (directory creation) is included without padding.

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 mutation tool with zero annotations and no output schema, the description omits the behaviors an agent most needs: overwrite semantics, error conditions, and path constraints. Its brevity is efficient but leaves real gaps given the tool's risk profile.

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% with only two required parameters (path, content), so the schema already documents them fully. The description adds only the directory-creation behavior, which maps loosely to path handling, so the baseline of 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?

The description names a specific verb (write) and resource (a file), and adds the notable side effect of creating missing directories. It is easily distinguished from the read-file sibling, though it does not name alternatives explicitly.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus anything else, and no mention of the key decision an agent faces: whether writing to an existing path is appropriate. The only guidance is the implicit 'creates directories if needed' hint, which does not address usage conditions or exclusions.

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