Skip to main content
Glama

Write file

write_file
DestructiveIdempotent

Write/overwrite a file

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
pathYes
contentYes
project_idNoProject id (or use session from use_project)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.6/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is known. The word "overwrite" nudges toward the destructive meaning but adds nothing about encoding, whether parent directories are created, what happens to the prior content, or how failures are surfaced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence with zero waste and the operation front-loaded, which is structurally fine. The brevity crosses into under-specification given that two required parameters carry no explanatory text.

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 destructive mutation with no output schema and two undocumented required parameters, the definition says far too little. An agent cannot tell the content encoding, overwrite/create semantics for missing directories, or the scope resolution for project_id without opening the schema.

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

Parameters2/5

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

Schema coverage is only 33%: project_id has a description pointing to use_project, but path and content are bare. The description does not compensate by clarifying whether path is absolute or relative, whether content is raw text or binary/base64, or whether omitting project_id falls back to session scope.

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?

"Write/overwrite a file" names a specific verb (write/overwrite) and resource (file), so the operation is unambiguous. It does not, however, distinguish itself from siblings such as edit_file or upload_file, leaving an agent to guess which write path to pick.

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 when-to-use guidance, no exclusions, and no mention of alternatives like edit_file (for in-place edits) or upload_file. The agent must infer that this is a full-content replacement rather than a patch.

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