reset_conversation
Delete stored in-memory chat history for a conversation ID to start a fresh thread. Resets server-side memory without changing the ID.
Instructions
Delete stored in-memory chat history for a conversation_id. Use this when you want to keep the same ID but start a fresh thread. This only affects server-side memory in the current MCP process.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| conversation_id | Yes |
Implementation Reference
- src/mcp-server.ts:392-419 (handler)Registration and handler for the 'reset_conversation' tool. Clears in-memory chat history for a given conversation_id by calling options.conversations.clear().
server.registerTool( "reset_conversation", { description: "Delete stored in-memory chat history for a `conversation_id`. Use this when you want to keep the same ID but start a fresh thread. This only affects server-side memory in the current MCP process.", inputSchema: resetConversationToolInputSchema, annotations: { idempotentHint: true, }, }, async ({ conversation_id }) => { const deleted = options.conversations.clear(conversation_id); return { content: [ { type: "text", text: deleted ? `Conversation \"${conversation_id}\" was removed.` : `Conversation \"${conversation_id}\" did not exist.`, }, ], structuredContent: { conversation_id, removed: deleted, }, }; }, ); - src/deepseek/schemas.ts:124-126 (schema)Zod input schema for reset_conversation tool, requiring a non-empty string conversation_id.
export const resetConversationToolInputSchema = z.object({ conversation_id: z.string().min(1), }); - src/conversation-store.ts:25-27 (helper)The ConversationStore.clear() method that performs the actual deletion by calling Map.prototype.delete(). Returns boolean indicating if the key existed.
clear(conversationId: string): boolean { return this.store.delete(conversationId); } - src/mcp-server.ts:12-12 (registration)Import of the resetConversationToolInputSchema from schemas.ts into the server file.
resetConversationToolInputSchema,