list_memories
Retrieve recent stored memories from a namespace to enable AI agents to access past interactions and data across sessions.
Instructions
List recent memories in a namespace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | Namespace to list (default: "default") | |
| limit | No | Max results (default 20) |
Implementation Reference
- src/index.js:135-147 (handler)The handler logic for the 'list_memories' tool, which constructs a query string for the /memories API and formats the response.
case 'list_memories': { const qs = new URLSearchParams(); if (args.namespace) qs.set('namespace', args.namespace); if (args.limit) qs.set('limit', args.limit); result = await call('GET', `/memories?${qs}`); if (!result.memories?.length) { return { content: [{ type: 'text', text: 'No memories found.' }] }; } const text = result.memories.map((r, i) => `[${i + 1}] (id: ${r.id}, ${r.created_at})\n${r.content}` ).join('\n\n'); return { content: [{ type: 'text', text }] }; } - src/index.js:68-78 (schema)The tool definition for 'list_memories', including its description and input schema.
{ name: 'list_memories', description: 'List recent memories in a namespace.', inputSchema: { type: 'object', properties: { namespace: { type: 'string', description: 'Namespace to list (default: "default")' }, limit: { type: 'number', description: 'Max results (default 20)' }, }, }, },