Skip to main content
Glama
davidteren

Claude Server MCP

by davidteren

save_conversation_context

Store conversation context with session tracking and continuation support to maintain persistent dialogue history across interactions.

Instructions

Save conversation context with continuation support

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUnique identifier for the context
sessionIdYesConversation session identifier
contentYesContext content to save
continuationOfNoOptional ID of previous context
tagsNoOptional tags for categorizing
metadataNoOptional additional metadata

Implementation Reference

  • src/index.ts:215-249 (registration)
    Registration of the 'save_conversation_context' tool including name, description, and input schema in the ListTools response.
    {
      name: 'save_conversation_context',
      description: 'Save conversation context with continuation support',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'Unique identifier for the context',
          },
          sessionId: {
            type: 'string',
            description: 'Conversation session identifier',
          },
          content: {
            type: 'string',
            description: 'Context content to save',
          },
          continuationOf: {
            type: 'string',
            description: 'Optional ID of previous context',
          },
          tags: {
            type: 'array',
            items: { type: 'string' },
            description: 'Optional tags for categorizing',
          },
          metadata: {
            type: 'object',
            description: 'Optional additional metadata',
          },
        },
        required: ['id', 'sessionId', 'content'],
      },
    },
  • Handler logic for executing the save_conversation_context tool: destructures input arguments, builds ConversationContext object, calls saveContext helper, returns success text response.
    case 'save_conversation_context': {
      const {
        id,
        sessionId,
        content,
        continuationOf,
        tags,
        metadata,
      } = request.params.arguments as {
        id: string;
        sessionId: string;
        content: string;
        continuationOf?: string;
        tags?: string[];
        metadata?: Record<string, unknown>;
      };
    
      const context: ConversationContext = {
        id,
        sessionId,
        content,
        timestamp: new Date().toISOString(),
        continuationOf,
        tags,
        metadata,
      };
    
      await this.saveContext(context);
      return {
        content: [
          {
            type: 'text',
            text: `Conversation context saved with ID: ${id}`,
          },
        ],
      };
    }
  • JSON schema defining the input parameters for the save_conversation_context tool.
    inputSchema: {
      type: 'object',
      properties: {
        id: {
          type: 'string',
          description: 'Unique identifier for the context',
        },
        sessionId: {
          type: 'string',
          description: 'Conversation session identifier',
        },
        content: {
          type: 'string',
          description: 'Context content to save',
        },
        continuationOf: {
          type: 'string',
          description: 'Optional ID of previous context',
        },
        tags: {
          type: 'array',
          items: { type: 'string' },
          description: 'Optional tags for categorizing',
        },
        metadata: {
          type: 'object',
          description: 'Optional additional metadata',
        },
      },
      required: ['id', 'sessionId', 'content'],
    },
  • Core helper method that persists the context to a JSON file in the appropriate directory and updates the global index.
    private async saveContext(context: Context) {
      await this.ensureDirectories();
      const contextPath = await this.getContextPath(
        context.id,
        'projectId' in context ? context.projectId : undefined
      );
      
      await fs.writeFile(contextPath, JSON.stringify(context, null, 2), 'utf-8');
      await this.updateIndex(context);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Save' implies a write operation, but the description doesn't address permissions needed, whether this overwrites existing context with the same ID, what happens on success/failure, or any rate limits. The 'continuation support' hint is useful but insufficient for a mutation tool with zero annotation coverage.

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?

The description is extremely concise at just 5 words, front-loading the core purpose. Every word earns its place: 'Save' (action), 'conversation context' (resource), 'with continuation support' (key feature). There's zero waste or redundancy.

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

Completeness2/5

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

For a mutation tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what happens after saving, what format the saved context takes, whether there are size limits on content, or how continuation actually works. The agent lacks crucial information about this write operation's behavior and outcomes.

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?

Schema description coverage is 100%, so all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema descriptions. The baseline score of 3 is appropriate when the schema does the heavy lifting, though the description could have explained relationships between parameters like how 'continuationOf' relates to 'id'.

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

Purpose3/5

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

The description states the tool saves conversation context with continuation support, which is a clear verb+resource combination. However, it doesn't distinguish this from its sibling 'save_project_context' - both appear to save context but for different types (conversation vs project). The purpose is understandable but lacks sibling differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when to choose 'save_conversation_context' over 'save_project_context', nor any prerequisites or typical use cases. The agent must infer usage from the tool name alone.

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/davidteren/claude-server'

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