Skip to main content
Glama

Execute an approved file write

filesystem.write_file_approved
Destructive

Executes a previously approved file write by request ID, using the path, content, and hash captured at approval time. Runs once to keep mutations auditable.

Instructions

Execute exactly the file write stored in an APPROVED request.

Takes only a request_id; the path/content/hash snapshot captured at request time is used. Single-use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
errorNo
createdNo
messageNo
outcomeYes
approvalNo
executedYes
new_hashNo
trace_idYes
request_idNo
bytes_writtenNo
previous_hashNo
approval_statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the write/mutating nature is covered. The description adds real value beyond that: the path/content/hash are frozen at request time (so the executed write may not match current disk state) and execution is single-use, which prevents accidental replay. It stops short of describing failure behavior for unapproved/expired requests.

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, zero filler, with the decisive constraint (APPROVED, snapshot-based, single-use) front-loaded. Every sentence earns its place.

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?

An output schema exists so return values need not be described, the single parameter is explained, and the safety profile is covered by annotations. The remaining gap is error/edge behavior (what happens on unapproved, expired, or already-consumed requests), which an agent would want for a destructive write.

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 0% for the single request_id parameter, so the schema contributes no meaning. The description compensates by explaining that only a request_id is taken and that path/content/hash come from the stored request snapshot, which is the key semantic an agent needs.

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 precise verb+resource ('execute ... the file write') with the crucial qualifier that it operates on a previously APPROVED request, which cleanly separates it from filesystem.write_file and filesystem.apply_patch. An agent can tell exactly what this does without opening the schema.

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?

Clearly establishes the precondition that a request must already be APPROVED and that the operation is single-use, which tells the agent when this tool is usable. It does not explicitly name the alternative (e.g., filesystem.write_file to create the request, or toolhub.request_status to check approval), so routing guidance is implied rather than spelled out.

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