Skip to main content
Glama

Write a report source safely

write_report_file

Write UTF-8 content to a file in an active session only when the expected SHA-256 checksum matches, preventing unintended overwrites and conflicts.

Instructions

Write UTF-8 content only inside an active session and only when expected_sha256 matches. Use "new" for a new file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
session_idYesActive sessionId returned by begin_edit_session or workflow_status
expected_sha256Yes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
nextActionsYes
workflowStateYes

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 mark the tool as non-read-only and non-destructive; the description adds that writes are conditional on session state and expected hash, and that content must be UTF-8. This gives useful behavior beyond the boolean hints, though mismatch/error behavior is not explained.

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?

Two short sentences front-load the safety-critical constraints and add only one necessary parameter semantic. There is no filler or repetition of schema fields.

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 mutating file-write tool with an output schema, the description covers session precondition, hash-matching rule, and new-file sentinel. It is slightly incomplete on what happens when the hash does not match, but an agent can invoke it correctly.

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 only 25%, so the description must compensate. It does: it defines the expected_sha256 contract ('use new for a new file') and constrains content encoding to UTF-8. Path and full hash semantics remain implicit, so not a 5.

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 states a specific verb and resource—writing UTF-8 report-source content—and adds the session-limited scope. The write operation is unmistakably distinct from the read/list/compile/publish siblings, even 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 Guidelines4/5

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

It provides clear preconditions for use: only inside an active session and only when expected_sha256 matches, with 'new' signaling a new file. It does not name an alternative tool or an explicit when-not-to-use case, so it stops short of a 5.

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