Skip to main content
Glama

register_file_write_tool

Records file write events by hashing content and updating or creating entries, enabling change tracking and unblocking dependent tools.

Instructions

Register a file write/modification. Auto-hashes content, updates existing or creates new.

Call this after editing or writing a file to document what changed and why. The commit-gate hook will block all other tools until you register the write.

Args: path: File path (e.g. 'src/auth.py') statement: What changed (e.g. 'Added input validation to getUser()') reason: Why the change was made (e.g. 'Fix: getUser() crashed on null input') tags: Tags for categorization start_line: Optional line range start end_line: Optional line range end title: Optional title (defaults to 'File: {filename}') details: Optional additional details project: Optional project root path. Auto-detected from git root if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
tagsYes
titleNo
reasonYes
detailsNo
projectNo
end_lineNo
statementYes
start_lineNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A4.7/5.0
Behavior4/5

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

Despite no annotations, the description reveals key side effects: auto-hashing of content, update-or-create semantics, and the blocking behavior of the commit-gate hook. It does not detail all edge cases, but covers essential behavioral traits.

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 compact yet informative, with a clear top-level purpose, usage guidance, and an args list. No redundant or irrelevant content.

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?

Provides sufficient context for invocation (after file edits, blocking behavior, optional fields). While the output/return format is not described in the text, the presence of an output schema likely covers that, and the description is otherwise complete for a registration tool.

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

Parameters5/5

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

Although the schema has no per-parameter descriptions, the description lists all 9 parameters with brief explanations (e.g., 'path: File path', 'statement: What changed', 'reason: Why the change was made'), achieving 100% coverage.

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 clearly states the tool's purpose: to register a file write/modification with auto-hashing and update-or-create behavior. It is distinct from sibling tools like register_file_read_tool.

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

Usage Guidelines5/5

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

Explicitly states when to call ('after editing or writing a file') and provides a strong contextual cue about the commit-gate hook blocking other tools, making the timing and necessity unambiguous.

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