Skip to main content
Glama

get_conversation_snapshot

Capture current conversation context for resuming discussions or analyzing architectural decisions. Specify recent turn count to control snapshot scope.

Instructions

Phase 3: Get current conversation context snapshot for resumption or analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recentTurnCountNoNumber of recent turns to include

Implementation Reference

  • The primary handler implementation for the 'get_conversation_snapshot' tool. This async function receives arguments (recentTurnCount optional), retrieves a context snapshot from the ConversationMemoryManager, and formats a comprehensive markdown report including session ID, recent turns, active intents, recorded decisions, and conversation focus.
    export async function getConversationSnapshot(
      args: {
        recentTurnCount?: number;
      },
      memoryManager: ConversationMemoryManager
    ): Promise<CallToolResult> {
      try {
        const snapshot = await memoryManager.getContextSnapshot(args.recentTurnCount ?? 5);
    
        if (!snapshot) {
          return {
            content: [
              {
                type: 'text',
                text: 'No active conversation session found.',
              },
            ],
          };
        }
    
        let output = `# Conversation Context Snapshot\n\n`;
        output += `**Session ID**: ${snapshot.sessionId}\n\n`;
    
        // Recent turns
        output += `## Recent Turns (${snapshot.recentTurns.length})\n\n`;
        snapshot.recentTurns.forEach(turn => {
          output += `### Turn ${turn.turnNumber} - ${turn.timestamp}\n`;
          output += `- **Request**: ${turn.request.toolName || 'message'}\n`;
          output += `- **Tokens**: ${turn.response.tokenCount}\n`;
          if (turn.response.expandableId) {
            output += `- **Expandable ID**: ${turn.response.expandableId}\n`;
          }
          output += `\n`;
        });
    
        // Active intents
        if (snapshot.activeIntents.length > 0) {
          output += `## Active Knowledge Graph Intents\n\n`;
          snapshot.activeIntents.forEach(intent => {
            output += `- **${intent.intent}**: ${intent.status}\n`;
          });
          output += `\n`;
        }
    
        // Decisions recorded
        if (snapshot.decisionsRecorded.length > 0) {
          output += `## Decisions Recorded\n\n`;
          snapshot.decisionsRecorded.forEach(decision => {
            output += `- **${decision.title}** (${decision.adrId}) - ${decision.timestamp}\n`;
          });
          output += `\n`;
        }
    
        // Conversation focus
        if (snapshot.conversationFocus) {
          output += `## Conversation Focus\n\n`;
          output += `- **Topic**: ${snapshot.conversationFocus.topic}\n`;
          output += `- **Phase**: ${snapshot.conversationFocus.phase}\n`;
          output += `- **Next Steps**:\n`;
          snapshot.conversationFocus.nextSteps.forEach(step => {
            output += `  - ${step}\n`;
          });
        }
    
        return {
          content: [
            {
              type: 'text',
              text: output,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `❌ Failed to get conversation snapshot: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Central tool catalog metadata and input schema definition for 'get_conversation_snapshot'. Defines description, category ('memory'), complexity ('simple'), estimated token costs, related tools, and a basic input schema (note: catalog schema uses 'includeMetadata' while handler uses 'recentTurnCount'). Used for dynamic tool discovery and MCP ListTools responses.
    TOOL_CATALOG.set('get_conversation_snapshot', {
      name: 'get_conversation_snapshot',
      shortDescription: 'Get conversation snapshot',
      fullDescription: 'Gets a snapshot of the current conversation state.',
      category: 'memory',
      complexity: 'simple',
      tokenCost: { min: 300, max: 800 },
      hasCEMCPDirective: true, // Phase 4.3: Simple tool - state snapshot
      relatedTools: ['query_conversation_history', 'get_memory_stats'],
      keywords: ['conversation', 'snapshot', 'state'],
      requiresAI: false,
      inputSchema: {
        type: 'object',
        properties: {
          includeMetadata: { type: 'boolean', default: false },
        },
      },
    });
  • Tool listing entry in server context generator's hardcoded tool list under 'Memory & Context' category, used to generate human-readable documentation of available tools.
      name: 'get_conversation_snapshot',
      description: 'Get current conversation context snapshot',
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It indicates the tool retrieves a 'snapshot' for 'resumption or analysis', implying a read-only operation, but does not specify what data is included (e.g., metadata, format), whether it's real-time or cached, or any limitations (e.g., access controls, rate limits). This leaves significant gaps in understanding the tool's behavior.

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

Conciseness3/5

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

The description is a single sentence, which is concise, but the 'Phase 3:' prefix is unnecessary and adds clutter without value. The core information is front-loaded, but the structure could be improved by removing the extraneous prefix to focus solely on the tool's function.

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?

Given no annotations and no output schema, the description is incomplete for a tool that retrieves conversation context. It lacks details on what the snapshot contains (e.g., format, fields), how it differs from 'query_conversation_history', and any behavioral constraints. This makes it inadequate for an agent to use the tool effectively without additional context.

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 input schema has 100% description coverage, with the single parameter 'recentTurnCount' documented as 'Number of recent turns to include' with a default of 5. The description does not add any meaning beyond this, such as explaining what a 'turn' is or how the snapshot is structured. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but doesn't need to.

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 'Get current conversation context snapshot for resumption or analysis', which specifies the verb ('Get'), resource ('conversation context snapshot'), and purpose ('resumption or analysis'). However, it does not distinguish this from sibling tools like 'query_conversation_history', making the purpose somewhat vague in context. The 'Phase 3' prefix adds noise but doesn't clarify the tool's unique role.

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. It mentions 'resumption or analysis' as purposes but does not specify scenarios, prerequisites, or exclusions. With sibling tools like 'query_conversation_history' available, there is no explicit or implied differentiation, leaving usage unclear.

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/tosin2013/mcp-adr-analysis-server'

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