Skip to main content
Glama
jakedx6

Helios-9 MCP Server

by jakedx6

analyze_conversation

Extract insights, themes, and patterns from AI conversations to inform project decisions and identify trends.

Instructions

Analyze an AI conversation to extract insights, themes, and patterns

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idYesThe conversation ID to analyze

Implementation Reference

  • Main handler for the analyze_conversation tool. Parses conversation_id, fetches conversation from database, and runs analysis (flow, content, AI performance, topics, action items, decisions, questions, knowledge gaps, follow-ups).
    export const analyzeConversation = requireAuth(async (args: any) => {
      const { conversation_id } = AnalyzeConversationSchema.parse(args)
      
      logger.info('Analyzing conversation', { conversation_id })
    
      const conversation = await getConversationFromDatabase(conversation_id)
      
      if (!conversation) {
        throw new Error('Conversation not found')
      }
    
      const analysis = {
        conversation_flow: analyzeConversationFlow(conversation.messages),
        content_analysis: analyzeConversationContent(conversation.messages),
        ai_performance: analyzeAIPerformance(conversation.messages),
        topic_modeling: extractTopicsAndThemes(conversation.messages),
        action_items: extractActionItemsFromConversation(conversation.messages, conversation.metadata?.context),
        decisions_made: extractDecisions(conversation.messages),
        questions_raised: extractQuestions(conversation.messages),
        knowledge_gaps: identifyKnowledgeGaps(conversation.messages),
        follow_up_suggestions: generateFollowUpSuggestions(conversation.messages, conversation.metadata?.context)
      }
    
      return {
        conversation_id,
        analysis,
        summary: generateAnalysisSummary(analysis),
        recommendations: generateRecommendations(analysis, conversation.metadata?.context)
      }
    })
  • Zod schema for input validation - expects a single conversation_id as UUID string.
    const AnalyzeConversationSchema = z.object({
      conversation_id: z.string().uuid()
    })
  • src/index.ts:143-155 (registration)
    Registers all handlers including conversationHandlers which maps 'analyze_conversation' to the analyzeConversation function.
    this.allHandlers = {
      ...projectHandlers,
      ...taskHandlers,
      ...documentHandlers,
      ...conversationHandlers,
      ...contextAggregationHandlers,
      ...workflowAutomationHandlers,
      ...intelligentSearchHandlers,
      ...analyticsInsightsHandlers,
      ...initiativeHandlers,
      ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}),
      ...debugHandlers,
    }
  • Tool definition with name 'analyze_conversation', description, and input schema exposed via MCP.
    export const analyzeConversationTool: MCPTool = {
      name: 'analyze_conversation',
      description: 'Analyze an AI conversation to extract insights, themes, and patterns',
      inputSchema: {
        type: 'object',
        properties: {
          conversation_id: {
            type: 'string',
            format: 'uuid',
            description: 'The conversation ID to analyze'
          }
        },
        required: ['conversation_id']
      }
    }
  • Helper that analyzes message content statistics (counts, word counts, questions, code blocks, URLs, balance ratio).
    function analyzeConversationContent(messages: Message[]): any {
      const totalMessages = messages.length
      const userMessages = messages.filter(m => m.role === 'user').length
      const assistantMessages = messages.filter(m => m.role === 'assistant').length
      
      const totalWords = messages.reduce((sum, msg) => sum + msg.content.split(' ').length, 0)
      const avgWordsPerMessage = totalWords / totalMessages
      
      // Extract common patterns
      const questions = messages.filter(msg => msg.content.includes('?')).length
      const codeBlocks = messages.filter(msg => msg.content.includes('```')).length
      const urls = messages.filter(msg => /https?:\/\//.test(msg.content)).length
      
      return {
        message_count: totalMessages,
        user_messages: userMessages,
        assistant_messages: assistantMessages,
        total_words: totalWords,
        avg_words_per_message: Math.round(avgWordsPerMessage),
        questions_asked: questions,
        code_examples: codeBlocks,
        external_links: urls,
        conversation_balance: userMessages / (assistantMessages || 1)
      }
    }
Behavior2/5

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

No annotations provided, so description carries full burden. Only states basic action and outputs. Does not disclose read/ write nature, permissions, rate limits, or other behavioral traits. Minimal transparency.

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

Conciseness4/5

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

One sentence, 12 words, efficient. However, it may be under-specified for complex usage. Still maintains conciseness.

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?

No output schema, no annotations, and description does not explain return format or behavioral details. For an analysis tool, it lacks completeness. However, simplicity of parameters (only 1) partially compensates.

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% with a clear description for conversation_id. The tool description adds no extra parameter semantics beyond the schema. Baseline of 3 is appropriate.

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

Purpose4/5

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

Description clearly states verb (analyze), resource (AI conversation), and outcomes (extract insights, themes, patterns). However, it does not explicitly differentiate from siblings like generate_conversation_summary or extract_action_items, though the focus on themes and patterns provides implicit distinction.

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?

No guidance on when to use this tool versus alternatives. It does not mention prerequisites, exclusions, or context where this tool is preferred. Usage is implied but not explicit.

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/jakedx6/helios9-MCP-Server'

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