Skip to main content
Glama
adyoi
by adyoi

memory_context

Builds a compact context block from relevant memories for a given topic, enabling LLMs to inject targeted memory into prompts.

Instructions

Build a compact context block from the most relevant memories for a given topic. Best for injecting memory into prompts.

Input Schema

NameRequiredDescriptionDefault
top_kNo
topicYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the interesting behavioral trait that the output is a synthesized, compact block rather than raw records, which is genuinely useful. However it omits that this is a read-only/non-mutating operation, how relevance is ranked, and any size or token bounds.

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?

Two short sentences with the core action front-loaded and zero filler. Efficient, though the brevity comes at the cost of detail elsewhere.

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?

For a simple two-parameter read tool with no output schema, the description covers what the tool produces at a high level. It is minimally adequate, but for a 0%-coverage schema it should have explained top_k and the compactness/ranking behavior.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate and largely does not. It names 'topic' only implicitly by mentioning 'a given topic' and never addresses top_k, its default of 6, or its 1-20 range, leaving the result-count control entirely undocumented.

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?

States a specific verb and resource: 'Build a compact context block from the most relevant memories for a given topic.' This distinguishes it from memory_recall (retrieval of items) and memory_list (enumeration), though it never names those siblings explicitly.

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?

'Best for injecting memory into prompts' gives one positive usage context, but there is no guidance on when to prefer this over memory_recall or memory_search, no prerequisites, and no exclusions. Usage is implied rather than specified.

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