Skip to main content
Glama

register_file_read_tool

Store facts learned from reading a file to avoid re-reading in future sessions. Auto-hashes content and updates or creates records.

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 symbol: Optional symbol the fact is about (e.g. 'UserService.authenticate'); makes evidence survive line moves project: Optional project root path. Auto-detected from git root if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYes
pathYes
tagsYes
titleNo
symbolNo
detailsNo
projectNo
subjectYes
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.4/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 discloses meaningful behavior: it auto-hashes content and performs an upsert ('updates existing or creates new'), and explains the downstream benefit (prevents re-reading). It omits permission/auth requirements and whether writes are reversible, but the upsert and hashing semantics are genuinely useful disclosure.

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-loaded with purpose and trigger in the opening sentences, followed by a compact per-argument block. Zero filler, though the Args list is long by necessity and slightly restates the schema property names.

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?

Given 11 parameters, 5 required, 0% schema coverage, and an existing output schema, the description supplies the missing parameter meaning and the mutation/upsert semantics an agent needs to call it correctly. Only auth/permission context is missing, which is minor here.

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 coverage is 0%, so the description must compensate, and it does: all 11 parameters are documented with concrete examples ('src/auth.py', 'getUser() returns User | null', symbol 'UserService.authenticate'), it supplies enum-like values for 'kind' (api/function/module/type/config/schema) absent from the schema, and notes auto-detection/defaults for start_line, end_line, project, and title.

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 and resource ('Register facts learned from reading a file') and immediately contrasts it with the write counterpart by scoping to file reads and stating it 'Prevents re-reading the same file in future sessions.' An agent can distinguish it from register_file_write_tool 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?

Explicit when-to-use: 'Call this after reading a file to store what you learned.' Gives the trigger condition clearly, but offers no exclusions or explicit routing rules against the many sibling memory tools (memory_create_tool, observation_create, etc.).

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