Skip to main content
Glama

register_file_write_tool

Record file writes after edits to document changes and reasons; auto-hashes content and satisfies commit-gate checks before other tools can run.

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 symbol: Optional symbol the change touches project: Optional project root path. Auto-detected from git root if omitted.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • addedInput schema / properties / symbol
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Symbol"
      +}
  2. Addedv0.5.1

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses auto-hashing, the upsert semantics (updates existing or creates new), and the blocking commit-gate behavior, which is a major operational trait. It stops short of describing failure modes, permissions, or idempotency guarantees.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the purpose sentence, then usage context, then the args block. The args section is long but earns its place given zero schema description coverage. Structure is scannable and no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter mutation tool with an output schema present, the description covers the two things the schema cannot: the blocking commit-gate behavior and the full semantics of every parameter. Nothing an agent needs to invoke it correctly is missing.

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?

Schema description coverage is 0%, so the description must compensate and it does fully, documenting all 10 parameters with inline examples ('src/auth.py', 'Added input validation to getUser()', 'Fix: getUser() crashed on null input'). Each optional param (start_line/end_line, title, details, symbol, project) is explained, including project's auto-detection from git root.

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 (Register) and resource (file write/modification) with the key behavioral qualifier 'Auto-hashes content, updates existing or creates new.' This clearly distinguishes it from the sibling register_file_read_tool without ambiguity about which operation is being registered.

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 says 'Call this after editing or writing a file to document what changed and why' and reveals the enforcement mechanism: the commit-gate hook blocks all other tools until the write is registered. This tells the agent exactly when the tool is mandatory, which is stronger than a typical when-to-use hint.

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