Skip to main content
Glama

memory_context_tool

Retrieve and format relevant stored memories to provide context for AI assistants, enabling persistent storage and semantic search of preferences, decisions, and project information.

Instructions

Fetch relevant memories and format them for context injection.

Args: query: Optional search query to filter relevant memories project: Project namespace (auto-detected from cwd if not specified) token_budget: Maximum tokens for context (default from RECALL_DEFAULT_TOKEN_BUDGET config)

Returns: Dictionary with success status and formatted markdown context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
projectNo
token_budgetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool fetches and formats memories, implying a read-only operation, but doesn't clarify permissions, rate limits, or side effects. The mention of 'auto-detected from cwd' for the project parameter adds some context, but overall, behavioral traits like error handling, data sources, or formatting specifics are missing.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by structured Args and Returns sections. Each sentence adds value, with no redundant information. The structure is clear, though the separation into sections might slightly reduce flow compared to a single paragraph.

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?

Given 3 parameters with 0% schema coverage and no annotations, the description partially compensates by explaining parameter semantics and mentioning a default config. However, it lacks details on behavioral aspects like error cases or formatting specifics. The presence of an output schema means return values don't need explanation, but overall completeness is moderate due to missing usage guidelines and transparency.

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 0%, so the description must compensate. It adds meaningful semantics: 'query' filters relevant memories, 'project' is a namespace auto-detected from cwd, and 'token_budget' sets a maximum token limit with a default from config. This clarifies each parameter's role beyond the schema's basic titles. However, it doesn't detail the format of 'query' or 'project', leaving some gaps.

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 the tool's purpose: 'Fetch relevant memories and format them for context injection.' This specifies the verb ('fetch' and 'format'), resource ('memories'), and output ('context injection'). It distinguishes from siblings like memory_list_tool (list) or memory_recall_tool (recall) by emphasizing formatting for context. However, it doesn't explicitly differentiate from memory_apply_tool or memory_outcome_tool, which might have overlapping purposes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With many sibling memory tools (e.g., memory_list_tool, memory_recall_tool, memory_store_tool), there's no indication of when this context-focused fetching is preferred over other memory operations. The Args and Returns sections describe parameters and output but don't offer usage context or exclusions.

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/blueman82/recall'

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