Skip to main content
Glama

mcp_engram_context_for_edit

Retrieve pre-edit situated memory with spatial context, edit arcs, and decision traces for a given file path. Supports optional line range filtering and auto-ingests when empty.

Instructions

Code atlas v2 — pre-edit situated memory. Returns JSON: spatial_items (tree-sitter AABB + edit_arc per locus), traces_at_locus (decisions at file:line), scars_at_locus, spatial_siblings, anchor goals/traces. Requires wake queue ack when ENGRAM_WAKE_QUEUE_GATE=hard (call mcp_engram_ack_wake_queue after session_start queue). Soft mode embeds wake_queue_gate warning if not acked. Auto-ingests single file when empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
auto_ingestNoIf true (default), force-ingest this single file when no spatial items exist
line_endNoOptional end line for spatial AABB filter (1-based)
line_startNoOptional start line for spatial AABB filter (1-based)
pathYesAbsolute or relative file path to edit
Behavior3/5

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

With no annotations provided, the description carries the full burden. It reveals the return structure (JSON fields) and conditional behaviors (wake queue modes, auto-ingest). However, it does not mention error states, side effects beyond potential auto-ingest, or path validation behavior, leaving gaps.

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?

The description is dense with information, covering return types, gate requirements, and auto-ingest in a few sentences. It is efficient with no redundancy, though the technical jargon may slightly reduce readability.

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 the absence of an output schema, the description adequately outlines the return structure (spatial_items, traces, scars, etc.). It also addresses gate requirements and auto-ingest behavior. For a 4-parameter tool, it covers most key aspects, though detailed field types are missing.

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?

All parameters have schema descriptions (100% coverage), so the description adds minimal extra meaning. It contextualizes the 'auto_ingest' property but does not elaborate on line_start/line_end format or path resolution, maintaining a baseline 3.

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 identifies the tool as returning pre-edit spatial context with specific data structures (spatial_items, traces, etc.). It distinguishes from siblings implicitly by focusing on edit context, though it does not explicitly differentiate from similar tools like mcp_engram_context_for_file.

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 explains the wake queue ack requirement and auto-ingest behavior, giving context-sensitive usage hints. However, it lacks explicit when-to-use or when-not-to-use guidance compared to sibling tools, making it rely on implied usage.

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