Skip to main content
Glama

register_file_read_tool

Registers a file read by hashing its content and storing key facts, updating existing entries or creating new ones to prevent re-reading in future sessions.

Instructions

Register facts learned from reading a file. Auto-hashes content, updates existing or creates new.

Call this after reading a file to store what you learned. Prevents re-reading the same file in future sessions.

Args: path: File path (e.g. 'src/auth.py') statement: What you learned (e.g. 'getUser() returns User | null, takes user_id: int') subject: What the fact is about (e.g. 'getUser()') kind: What kind of code fact (api/function/module/type/config/schema) tags: Tags for categorization start_line: Optional line range start (auto-detected if omitted) end_line: Optional line range end (auto-detected if omitted) 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
kindYes
pathYes
tagsYes
titleNo
detailsNo
projectNo
subjectYes
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.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of explaining behavior. It discloses auto-hashing content and that it updates existing or creates new entries, which gives useful transparency about side effects.

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 concise and well-structured, with a short purpose statement followed by a clear parameter list. It avoids unnecessary verbosity while covering all necessary details.

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?

The description covers purpose, usage, and parameters well. It does not describe the return value, but an output schema is indicated as present, so that information is likely available elsewhere.

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?

The description provides meaningful explanations and examples for all parameters, including optional defaults for start_line, end_line, title, details, and project. Since the schema has no descriptions, this fully compensates.

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: registering facts learned from reading a file. It also distinguishes itself from sibling tools like register_file_write_tool by focusing on reading and knowledge storage.

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?

The description explicitly says to call it after reading a file to store learned facts and prevent re-reading. It does not mention alternatives or when not to use it, but the primary use case is clear.

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