Skip to main content
Glama
jakedx6
by jakedx6

analyze_conversation

Extract insights, themes, and patterns from AI conversations to identify key discussion points and 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

  • The main handler function that executes the analyze_conversation tool logic, parsing input, fetching conversation data, performing analysis using helper functions, and returning structured insights.
    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 used for input validation in the analyze_conversation handler.
    const AnalyzeConversationSchema = z.object({ conversation_id: z.string().uuid() })
  • MCPTool object defining the tool metadata, name, description, and input schema for listing in MCP protocol.
    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'] } }
  • Export of handlers map that registers the analyzeConversation handler under the 'analyze_conversation' key, imported into main allHandlers.
    export const conversationHandlers = { save_conversation: saveConversation, get_conversations: getConversations, analyze_conversation: analyzeConversation, extract_action_items: extractActionItems, generate_conversation_summary: generateConversationSummary
  • src/index.ts:143-155 (registration)
    Central registration in MCP server constructor where conversationHandlers (including analyze_conversation) is spread into the main allHandlers object used for tool execution.
    this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }

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