Skip to main content
Glama

pack

Assemble a compact context block from queries by retrieving, reranking, and budgeting top memories for prompt injection.

Instructions

Assemble a compact, prompt-ready context block from one or more queries: retrieves, reranks, and budgets the top memories into injectable text. Read-only. This is the retrieval path for putting memory into an agent's prompt; use search instead when you want individual scored records rather than an assembled block.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoRestrict retrieval to memories carrying these tags.
spaceNoRestrict retrieval to a single memory space (namespace).
titleNoHeading for the assembled pack. Default "context".
queriesYesOne or more natural-language queries to retrieve and merge into the pack. Required.
max_charsNoCharacter budget for the assembled pack. Default 6000.
min_scoreNoDrop memories scoring below this threshold; the pack abstains (returns empty) when nothing clears it. Default 0 (no floor).
max_memoriesNoMaximum memories to include in the pack. Default 10.
query_expansionNoDefault false. Deterministically add subqueries before retrieval.
max_thread_seedsNoDefault 3.
thread_expansionNoDefault false. Add same-entity/same-claim neighbors to the rerank pool.
max_query_variantsNoDefault engine maximum.
max_thread_neighborsNoDefault 3.
Behavior4/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. It declares the tool is 'Read-only', which is a key behavioral trait. It also describes the internal pipeline (retrieves, reranks, budgets) and mentions behavior for min_score ('abstains when nothing clears it'). However, it could disclose more about error handling or performance characteristics.

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 three sentences with no waste. The first sentence efficiently states purpose and process, the second adds a critical behavioral note (read-only), and the third provides clear sibling differentiation. Every sentence earns its place.

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 complexity (12 params, no output schema), the description adequately covers purpose, usage, and basic behavior. It explains what the output is ('injectable text'), which is sufficient for an assembly tool. Some details about return format or edge cases are missing, but overall it is complete enough for effective use.

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?

Schema coverage is 100% with detailed parameter descriptions. The description does not add significant semantics beyond what the schema already provides. It provides tool-level context but does not enhance parameter understanding. Per guidelines, baseline 3 is appropriate.

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: 'Assemble a compact, prompt-ready context block from one or more queries'. The verb 'assemble' and resource 'context block' are specific. It also distinguishes from the sibling tool 'search' by contrasting assembled block vs individual scored records.

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?

Explicit guidance is provided: 'use `search` instead when you want individual scored records rather than an assembled block'. This tells the agent when to use this tool vs alternatives. The description also implies the context of injecting memory into a prompt.

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/teflon07/memkeeper'

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