Skip to main content
Glama
Bridge Commander
by PaPasha215

write_file

Destructive

Creates or updates a file on a local or remote machine: rewrite replaces it atomically, append adds to the end, and parent directories are created automatically. Write large files in chunks.

Instructions

Write a file (mode=rewrite replaces it atomically, mode=append adds to the end). Creates parent directories. For big files write in chunks with append.

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
modeNo
pathYes
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is known. The description adds genuinely new behavior: rewrite is atomic, parent directories are auto-created, and appends are the chunking strategy — details an agent could not infer from the annotations alone.

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?

Three short sentences, each carrying distinct information: mode semantics, directory side effect, and large-file strategy. Nothing is repeated from the schema beyond necessary clarification, and the most important fact (mode behavior) is front-loaded.

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 three-parameter mutation tool with no output schema, the description covers the key risks: atomic replacement, implicit directory creation, and how to handle large payloads. It omits encoding or content-type assumptions and failure behavior, which are minor for this tool's scope.

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 description coverage is 0%, so the description must carry the load; it does explain the only non-obvious parameter, mode, defining both enum values and the atomicity of rewrite. The path and content parameters receive no added meaning, which is tolerable given their self-evident names but leaves the coverage gap only partly closed.

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 a file") and immediately clarifies the two write modes, so the agent knows exactly what the tool does. It stops short of distinguishing itself from a sibling like edit_block, leaving the rewrite-vs-edit choice implicit.

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?

Offers one concrete usage rule — chunked appends for big files — which tells the agent how to invoke it in a common scenario. It gives no when-not guidance (e.g., when to prefer an in-place edit tool) and no prerequisites, so the guidance is only partially covered.

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