Skip to main content
Glama

mcp_engram_context_for_file

Retrieve spatially-prioritized AST context for a file before editing, showing exact line ranges from geometric AABB coordinates.

Instructions

TRIGGER (core of spatial impact ritual): Call before editing any file. Now spatially-prioritized — returns real daemon-extracted AABB AST items (with line ranges + CRS) first, then higher-level context. This is your geometric Pre-Edit impact recon tool. 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?

The description discloses that the tool returns daemon-extracted AABB AST items with line ranges and CRS first, then higher-level context, and mentions it is faster than free-text recall. Since no annotations are provided, the description carries full burden and does so adequately, though it omits details about potential side effects or authentication requirements.

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

Conciseness3/5

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

The description is verbose and includes enthusiastic flair ('TRIGGER', 'geometric Pre-Edit impact recon tool') that could be trimmed for conciseness. It contains multiple sentences with some redundancy, making it less efficient than ideal.

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

Completeness3/5

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

The tool has no output schema, so the description should clarify the return value structure. It mentions 'AABB AST items with line ranges + CRS' and 'higher-level context' but does not detail the format or types of these items. Aspects like error handling or prerequisites are not covered.

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?

Schema coverage is 100% with a single 'path' parameter described. The description adds no additional details about the parameter beyond what the schema provides, meeting the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states this is a pre-edit context retrieval tool that returns spatially-prioritized AST items with line ranges. It distinguishes itself by emphasizing its geometric, spatial nature, but does not explicitly differentiate from the similar sibling 'mcp_engram_context_for_edit'.

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

Usage Guidelines3/5

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

The description says 'Call before editing any file' which implies usage context but does not provide explicit guidance on when not to use or alternatives. The sibling list includes similar tools like mcp_engram_context_for_edit and mcp_engram_recall_in_file, but no differentiation is made.

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