Skip to main content
Glama

reset_conversation

Idempotent

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

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idYes

Implementation Reference

  • 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,
          },
        };
      },
    );
  • 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),
    });
  • 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);
    }
  • Import of the resetConversationToolInputSchema from schemas.ts into the server file.
    resetConversationToolInputSchema,
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare idempotentHint: true. The description adds context about in-memory operation and process scope, which is beyond annotations. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no wasted words. The action is stated first, then usage guidance. Highly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and a simple delete operation, the description covers purpose, when to use, and scope. It lacks details about error behavior on non-existent conversation_id, but for a straightforward tool it is adequately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage. The description mentions conversation_id by name but does not explain its meaning or constraints beyond the schema. For a single required parameter, it partially compensates but could be more explicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Delete stored in-memory chat history for a `conversation_id`', specifying the action and resource. It distinguishes from sibling tools like chat_completion and list_conversations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit usage context: 'Use this when you want to keep the same ID but start a fresh thread.' It also clarifies scope: 'This only affects server-side memory in the current MCP process.' However, it lacks explicit when-not-to-use or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DMontgomery40/deepseek-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server