Skip to main content
Glama

mcp_engram_context_for_file

Retrieve the top 5 most relevant memories for a file path, including AST functions, structs, and known bugs with exact line ranges, using geometric memory for precise file-specific context.

Instructions

TRIGGER: Call this automatically whenever you open or are about to edit a file. Surfaces the top 5 memories most relevant to that file path, including AST-ingested functions, structs, and known bugs associated with that file's geometry. The daemon stores spatial AABB coordinates (line ranges) with each ingested AST node, so results include which exact lines each concept came from. This is faster and more precise than a free-text recall for file-specific context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path (e.g. /home/user/project/backend.rs)
Behavior4/5

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

Without annotations, the description carries the burden. It discloses output characteristics (top 5, line ranges, spatial coordinates) and performance benefit. It does not explicitly state read-only or address side effects, but the read-only nature is implied by 'surfaces memories' and the context of file editing.

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 two sentences, front-loaded with the trigger and purpose, followed by a justification. Every sentence adds value without redundancy.

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 simple read tool with one parameter, the description covers purpose, trigger, output details, and performance advantage. No output schema is needed because the description explains what is returned. It is fully sufficient for an agent to choose and invoke the tool correctly.

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

Parameters3/5

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

The single parameter 'path' is fully described in the input schema with an example. The tool description does not add further meaning or constraints beyond what the schema provides, so baseline score applies.

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 action: 'surfaces the top 5 memories most relevant to that file path', including specific content types (AST-ingested functions, structs, known bugs). It distinguishes itself from siblings by emphasizing speed and precision compared to free-text recall.

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 provides a trigger condition: 'Call this automatically whenever you open or are about to edit a file.' It also explains why to use it over alternatives ('faster and more precise than a free-text recall for file-specific context').

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/staticroostermedia-arch/engram'

If you have feedback or need assistance with the MCP directory API, please join our Discord server