Skip to main content
Glama
@event4u/agent-config

@event4u/agent-config

Official

memory_lookup

Read-onlyIdempotent

Look up engineering-memory entries by type and anchor path before editing security-sensitive or historically buggy files; query the compact index first, then fetch only the entries you need.

Instructions

Engineering-memory entries for one or more types, optionally narrowed to anchor paths — use before editing a security-sensitive or historically buggy file. Call with detail:"index" FIRST (rows carry id, title, tokens_estimate), then memory_get only the ids you will use, batched. Reads agents/memory/<type>/*.yml and agents/memory/intake/*.jsonl. Returns a status plus per-type slices.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "types": "<types>"
    },
    "name": "memory_lookup"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysNoAnchor paths or globs to match entries against (e.g. a file you are about to edit).
limitNoMaximum entries to return per type.
typesYesMemory types to scan, e.g. `historical-patterns`, `incident-learnings`, `ownership`.
detailNo'full': complete entries.index
token_budgetNoRender compact rows (id, type, confidence, `line`) hard-cut at token_budget × 4 chars; omitted hits yield a top-level `truncation` hint.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv20.4.0
    • changedInput schema / properties / detail / default
      Previous value: -"full"New value: +"index"
    • changedInput schema / properties / detail / description
      Previous value: -"'index' returns compact priced rows (id, title, tokens_estimate) instead of full bodies — call this first, then memory_get the ids you need. 'full' (default) returns complete entries."New value: +"'full': complete entries."
    • changedInput schema / properties / keys / description
      Previous value: -"Optional anchor paths or globs to match entries against (e.g. a file you are about to edit)."New value: +"Anchor paths or globs to match entries against (e.g. a file you are about to edit)."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum entries to return per type. Defaults to 5."New value: +"Maximum entries to return per type."
    • changedInput schema / properties / token_budget / description
      Previous value: -"Optional token budget. When set, entries are rendered as one-line compact rows (id, type, confidence, `line`) and the row set is hard-cut at token_budget × 4 chars; omitted hits appear as a top-level `truncation` hint naming a concrete next step. Absent → the envelope is unchanged."New value: +"Render compact rows (id, type, confidence, `line`) hard-cut at token_budget × 4 chars; omitted hits yield a top-level `truncation` hint."
    • changedInput schema / properties / types / description
      Previous value: -"Memory types to scan, e.g. `historical-patterns`, `incident-learnings`, `ownership`. At least one required."New value: +"Memory types to scan, e.g. `historical-patterns`, `incident-learnings`, `ownership`."
  2. Changed2 schema fields changedv8.8.0
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "full",
      +  "description": "'index' returns compact priced rows (id, title, tokens_estimate) instead of full bodies — call this first, then memory_get the ids you need. 'full' (default) returns complete entries.",
      +  "enum": [
      +    "index",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / token_budget
      Added value: +{
      +  "description": "Optional token budget. When set, entries are rendered as one-line compact rows (id, type, confidence, `line`) and the row set is hard-cut at token_budget × 4 chars; omitted hits appear as a top-level `truncation` hint naming a concrete next step. Absent → the envelope is unchanged.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
  3. Changed1 schema field changedv6.1.0
    • removedInput schema / properties / with_package
      Removed value: -{
      -  "default": false,
      -  "description": "When true, also include memory shipped with the agent-config package, not just the consumer project's own.",
      -  "type": "boolean"
      -}
  4. Changed4 schema fields changedv1.0.2
    • addedInput schema / properties / keys / description
      Added value: +"Optional anchor paths or globs to match entries against (e.g. a file you are about to edit)."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum entries to return per type. Defaults to 5."
    • addedInput schema / properties / types / description
      Added value: +"Memory types to scan, e.g. `historical-patterns`, `incident-learnings`, `ownership`. At least one required."
    • addedInput schema / properties / with_package / description
      Added value: +"When true, also include memory shipped with the agent-config package, not just the consumer project's own."
  5. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the read-only/idempotent/non-destructive safety profile, and the description still adds real behavior: which files are read, that results are per-type `slices` with a `status`, and that `token_budget` hard-cuts rows and surfaces a top-level `truncation` hint for omitted hits. It stops short of describing empty-match behavior or ordering, so it is strong rather than exhaustive.

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?

Two dense sentences, front-loaded with what the tool returns and when to call it, followed by the invocation strategy and storage location. No filler, no restatement of the name or title.

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?

With no output schema, the description carries the return-shape burden and mostly discharges it: `status`, per-type `slices`, index rows carrying id/title/tokens_estimate, and the truncation hint. The `full` detail shape and the slice object structure remain unspecified, so it is nearly but not fully complete for a five-parameter tool.

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

Parameters4/5

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

Schema description coverage is 100%, so 3 is the baseline, but the description adds meaning the schema does not: `detail` is framed as a two-phase index-then-fetch workflow rather than a bare enum, and `token_budget` truncation is tied to the visible `truncation` consequence. `keys` is echoed as essentially the same anchor-path concept already in the schema, which is why this is a 4 and not a 5.

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 names a concrete resource (engineering-memory entries), the scoping axis (types, optionally anchor paths via `keys`), and the storage backing it (`agents/memory/<type>/*.yml` and `intake/*.jsonl`). It also implicitly separates this bulk scan from `memory_get`'s by-id fetch, so an agent can pick between them without reading schemas.

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?

It states an explicit trigger ('use before editing a security-sensitive or historically buggy file') and an explicit call sequence: index detail FIRST, then `memory_get` only for the ids actually needed, batched. That is genuine when-to-use plus a named alternative with the condition that selects it.

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