Skip to main content
Glama

inject_context

Retrieve relevant project memories as formatted context for complex tasks, enabling AI agents to access historical information and constraints when starting multi-step work.

Instructions

Retrieve the most relevant memories for the current task and return them as a single formatted context block, ready to prepend to a prompt or include in a system message.

When to call: at the start of a complex or multi-step task where relevant project history, constraints, or preferences may exist in memory. Prefer this over recall when you want a single ready-to-use block rather than a list of individual memories.

Returns a formatted text block summarising the relevant memories, and a count of how many memories were used. Returns empty if none are relevant.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesDescribe the current task or topic in plain language. The server retrieves memories semantically related to this description. Example: 'refactoring the authentication module' or 'setting up the CI pipeline for the mobile app'.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool does (retrieves relevant memories, formats them into a block, returns count), what happens when no memories are relevant (returns empty), and the output format. However, it doesn't mention potential limitations like rate limits, memory constraints, or semantic matching accuracy.

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?

The description is well-structured and front-loaded with the core purpose, followed by usage guidelines and return behavior. Every sentence adds value without redundancy, and the three paragraphs efficiently cover purpose, usage, and output without unnecessary elaboration.

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?

For a tool with no annotations and no output schema, the description does an excellent job covering the essential aspects: purpose, usage context, parameter semantics, and return behavior. However, it doesn't detail the exact format of the 'formatted text block' or potential error conditions, leaving some ambiguity about the output structure.

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?

The schema description coverage is 100%, so the schema already documents the single 'query' parameter. The description adds value by explaining the semantic nature of the retrieval ('retrieves memories semantically related to this description') and providing context about how the query should be formulated ('Describe the current task or topic in plain language'), which goes beyond the schema's technical specification.

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 clearly states the tool's purpose with specific verbs ('retrieve', 'return') and resources ('memories'), distinguishing it from siblings by specifying it returns a 'single formatted context block' rather than individual memories. It explicitly contrasts with the 'recall' sibling tool, providing clear differentiation.

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?

The description provides explicit guidance on when to use this tool ('at the start of a complex or multi-step task') and when not to use it ('Prefer this over recall when you want a single ready-to-use block rather than a list of individual memories'). It names the alternative tool ('recall') and specifies the context where this tool is preferred.

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/Daftgoldens/Kronvex'

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