Skip to main content
Glama

msf_file_write

Destructive

Writes text or base64-encoded binary to a local file at a chosen byte offset, creating missing directories and files, and supports successive chunk writes to build large resource scripts and modules.

Instructions

Write text or {$binary: base64} at a local file byte offset.

Creates missing parent directories and files. truncate=true clears an existing file first; use only on the first chunk when replacing a file. Supports arbitrary-sized resource scripts, modules, and import artifacts by writing successive chunks at next_offset. Paths are local to the MCP host.

Input Schema

NameRequiredDescriptionDefault
dataYes
pathYes
offsetNo
truncateNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, and idempotentHint=false. The description adds concrete behavioral context: parent directories and missing files are created, truncate wipes an existing file, chunked writes at offsets are supported, and paths are local to the MCP host. It does not mention overwrite behavior without truncate or concurrency/ordering hazards, but it is informative beyond the annotations.

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?

The description is front-loaded with the core write action, then adds only high-value operational details: directory/file creation, truncate semantics, chunking, and host-local path interpretation. Every sentence contributes to correct invocation, with no filler.

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?

Given rich annotations and an output schema, the description covers the critical behavior an agent needs: writing at offsets, chunk sequencing, truncate semantics, file/directory creation, and local path scope. It could say more about overwriting existing bytes without truncate, but the definition is otherwise complete for this destructive file-write tool.

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 description coverage is 0%, so the description must carry the parameter explanations, which it largely does. It clarifies data can be text or the {$binary: base64} object form, offset is a byte offset used with next_offset for chunking, truncate clears the file first, and path is interpreted on the local MCP host.

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 states a specific verb and resource: writing text or base64 binary data at a byte offset in a local file. It implicitly separates itself from msf_file_read and msf_file_list, and 'local file' plus 'Paths are local to the MCP host' distinguishes it from msf_console_write and msf_process_write, though no sibling is named explicitly.

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?

It gives useful chunking guidance ('truncate=true ... use only on the first chunk when replacing a file') and explains that successive chunks go at next_offset. However, it does not explicitly say when to choose this tool over msf_file_read, msf_process_write, or msf_console_write beyond the implicit local-host path distinction.

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