Skip to main content
Glama
cynarax

Ganado Bridge

write_file

Destructive

Create a new file or replace an existing one only when the current SHA-256 matches the expected hash. This prevents overwriting files that changed after you inspected them.

Instructions

Create a file with expected_sha256=null, or replace one only if the current SHA-256 matches. Changes actual files. Parent must exist. Does not follow a final symlink.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
contentYes
encodingNoutf8
expected_sha256Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0-preview.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already mark this as destructive, and the description reinforces that with 'Changes actual files.' It adds non-obvious behaviors beyond annotations: parent directory must exist and a final symlink is not followed. These are exactly the side-effect details an agent needs before invoking a destructive write.

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 front-load the core behavior, then add two critical constraints. No filler or redundancy; every sentence contributes a distinct fact needed for correct invocation.

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 destructive write with no output schema, it covers creation vs replacement, the hash guard, side effects, parent existence, and symlink behavior. The only notable gap is an explicit statement of what happens when the hash does not match (e.g., no write occurs), though that is strongly implied.

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 parameter meaning. It meaningfully explains expected_sha256 (null creates, a value requires a current-file match) and implies file must be a path whose parent exists. However, it does not elaborate on content or encoding semantics beyond what the schema's type and enum already show.

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 names a specific action ('Create' or 'replace') on a specific resource (file) with a precise precondition (expected_sha256 null for create, matching SHA-256 for replace). This clearly differentiates it from sibling tools like edit_file by emphasizing its full-file, hash-guarded write semantics.

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

Usage Guidelines4/5

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

It states when to use the tool: create when expected_sha256=null and replace only when the current file hash matches. It also gives prerequisites ('Parent must exist') and a symlink caveat. It does not explicitly name alternatives or say 'use edit_file for...', so it falls just short of full usage guidance.

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