Skip to main content
Glama
MoonTzai

FolderBridge MCP

by MoonTzai

Transactionally write a large UTF-8 file

write_file
Destructive

Create or replace large workspace files in chunked transactions (begin, append, commit) to avoid oversized MCP messages and verify size/SHA-256 before atomic replacement.

Instructions

Host-owned five-action transaction for large whole-file creates or replacements without requiring one giant MCP message. Use begin, then one or more append calls with the exact next UTF-8 byte offset, optionally status, then commit with the complete expected size and SHA-256; abort discards staging. Staging stays outside the workspace, replace mode rechecks the original target SHA at commit, and successful commit uses a same-directory fsync + atomic replace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoRequired only for begin.
pathNoRequired only for begin.
chunkNoRequired for append; runtime-enforced maximum is 4 MiB of UTF-8 bytes so even worst-case JSON escaping stays below the MCP message ceiling.
actionYes
offsetNoRequired for append; exact next UTF-8 byte offset, making retries non-duplicating.
workspace_idNoRequired when server_info lists multiple workspaces.
expected_sizeNoRequired for commit; complete UTF-8 byte length.
transaction_idNoReturned by begin; required by append/status/commit/abort.
expected_sha256NoRequired for commit; SHA-256 of complete new UTF-8 bytes.
expected_target_sha256NoRequired for begin in replace mode; obtain with file_info.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.33
    • changedInput schema / properties / chunk / description
      Previous value: -"Required for append; runtime-enforced maximum is 128 KiB of UTF-8 bytes so even worst-case JSON escaping stays below the 1 MiB MCP message limit."New value: +"Required for append; runtime-enforced maximum is 4 MiB of UTF-8 bytes so even worst-case JSON escaping stays below the MCP message ceiling."
  2. First observedv0.8.25

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only supply the generic destructive/idempotent profile; the description adds substantive traits beyond them: staging lives outside the workspace, replace mode rechecks the original target SHA at commit, abort discards staging, and commit is a same-directory fsync plus atomic replace. The offset-based non-duplicating retry guarantee is also stated.

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 dense sentences that lead with the transaction model, then the action sequence, then the durability and safety guarantees. Nothing is repetitive of the name or title, and every clause carries operational information.

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 10-parameter, multi-action tool with no output schema, the description covers the full lifecycle and the return of transaction_id is captured in the schema itself. It leaves unstated what status or commit return on success and what happens when an offset mismatch or commit-contract failure occurs.

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

Parameters4/5

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

Schema coverage is 90%, so per-parameter documentation is already strong (baseline 3). The description goes further by binding parameters to actions as a cross-field contract: commit needs the complete expected size and SHA-256, append needs the exact next byte offset, and replace mode requires the original target SHA. It doesn't add format examples for the hashes, which the schema already constrains.

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?

States a specific verb and resource with scope: a host-owned five-action transaction for large whole-file creates or replacements. The 'whole-file ... without requiring one giant MCP message' framing distinguishes it from the sibling edit_file, which handles partial edits.

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?

Gives explicit protocol sequencing (begin, one or more appends, optionally status, commit, abort) and the size/whole-file condition that motivates it. It stops short of naming edit_file as the alternative for small or partial changes, so the routing decision is implied rather than stated.

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