memory_pack
Build a formatted context block for a concept or task using keyword and semantic search, with automatic keyword-only fallback when embeddings are unavailable.
Instructions
Build a formatted context block for a concept or task using keyword and semantic search when embeddings are available, with automatic keyword-only fallback. Use for conceptually relevant context; use memory_search or memory_search_index for exact identifiers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Filter by memory kind | |
| limit | No | Max items to include | |
| compact | No | When true, render a scannable index of all items with full detail only for the top N (default 3). Saves tokens when broad overview matters more than per-item detail. | |
| context | Yes | Context description to search for | |
| project | No | Filter by project scope (matches sessions.project) | |
| scope_id | No | Filter by a single sharing domain scope_id | |
| trust_bias | No | ||
| visibility | No | ||
| personal_first | No | ||
| ownership_scope | No | ||
| compression_mode | No | Near-related compression mode: off disables it, compact applies only to compact rendering, ids applies in all modes. Defaults to CODEMEM_PACK_COMPRESSION or compact. | |
| exclude_actor_ids | No | ||
| exclude_scope_ids | No | Sharing domain scope_ids to exclude | |
| include_actor_ids | No | ||
| include_scope_ids | No | Sharing domain scope_ids to include | |
| exclude_visibility | No | ||
| include_visibility | No | ||
| compact_detail_count | No | Number of items to show in full detail in compact mode (default 3) | |
| exclude_trust_states | No | ||
| include_trust_states | No | ||
| exclude_workspace_ids | No | ||
| include_workspace_ids | No | ||
| widen_shared_when_weak | No | ||
| exclude_workspace_kinds | No | ||
| include_workspace_kinds | No | ||
| widen_shared_min_personal_score | No | ||
| widen_shared_min_personal_results | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| context | Yes | ||
| metrics | Yes | ||
| item_ids | Yes | ||
| pack_text | Yes |