Store Memory
advanced_augmentationStore durable user facts and preferences after responding to maintain context across sessions without SDK integration.
Instructions
Store durable facts and preferences after drafting a response. Call after responding to persist user context across sessions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_message | Yes | The full user message | |
| assistant_response | Yes | The full assistant response |
Implementation Reference
- src/index.ts:100-125 (handler)The handler for the advanced_augmentation tool, which forwards the request to a remote client.
async ({ user_message, assistant_response }) => { try { const client = await getRemoteClient(); const result = await client.callTool({ name: "advanced_augmentation", arguments: { user_message, assistant_response }, }); return { content: (result.content as Array<{ type: "text"; text: string }>) || [ { type: "text", text: "memory being created" }, ], }; } catch (error) { const message = error instanceof Error ? error.message : String(error); return { content: [ { type: "text" as const, text: `Error storing memory: ${message}`, }, ], isError: true, }; } }, ); - src/index.ts:89-99 (registration)Registration and schema definition for the advanced_augmentation tool.
server.registerTool( "advanced_augmentation", { title: "Store Memory", description: "Store durable facts and preferences after drafting a response. Call after responding to persist user context across sessions.", inputSchema: { user_message: z.string().describe("The full user message"), assistant_response: z.string().describe("The full assistant response"), }, },