memory_context
Builds a formatted context block from ranked memories relevant to a query, so you can insert one prompt-ready context string instead of assembling search results manually.
Instructions
Build a formatted context string from relevant memories for a given query. Returns ranked memories with similarity scores, ready for use in prompts. More convenient than memory_search when you need a single context block.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "memory_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of memories to include (1-50) | |
| query | Yes | Natural language query to find relevant memories | |
| threshold | No | Minimum similarity threshold (0-1) | |
| max_tokens | No | Maximum token budget for the context string. Results are truncated to fit. |