Skip to main content
Glama
jakedx6
by jakedx6

generate_conversation_summary

Create summaries from conversations, including brief overviews, detailed recaps, action items, or decision records for project management.

Instructions

Generate different types of summaries from a conversation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idYesThe conversation ID to summarize
summary_typeNoType of summary to generatebrief

Implementation Reference

  • The primary handler function for the 'generate_conversation_summary' tool. It validates input using Zod schema, fetches the conversation from the database, generates a summary based on the specified type using specialized helper functions, computes metadata, and returns the summary with statistics.
    export const generateConversationSummary = requireAuth(async (args: any) => { const { conversation_id, summary_type } = GenerateConversationSummarySchema.parse(args) logger.info('Generating conversation summary', { conversation_id, summary_type }) const conversation = await getConversationFromDatabase(conversation_id) if (!conversation) { throw new Error('Conversation not found') } let summary: string switch (summary_type) { case 'brief': summary = generateBriefSummary(conversation.messages) break case 'detailed': summary = generateDetailedSummary(conversation.messages, conversation.metadata?.context) break case 'action_items': summary = generateActionItemsSummary(conversation.messages) break case 'decisions': summary = generateDecisionsSummary(conversation.messages) break default: summary = generateBriefSummary(conversation.messages) } const metadata = { conversation_id, summary_type, generated_at: new Date().toISOString(), message_count: conversation.messages.length, conversation_duration: calculateConversationDuration(conversation.messages), key_participants: extractParticipants(conversation.messages) } return { summary, metadata, word_count: summary.split(' ').length, reading_time: Math.ceil(summary.split(' ').length / 200) // 200 words per minute } })
  • Zod schema defining the input parameters for the tool: required conversation_id (UUID) and optional summary_type (enum with default 'brief'). Used for input validation in the handler.
    const GenerateConversationSummarySchema = z.object({ conversation_id: z.string().uuid(), summary_type: z.enum(['brief', 'detailed', 'action_items', 'decisions']).default('brief') })
  • MCPTool registration object defining the tool's name, description, and input schema (JSON Schema format mirroring the Zod schema). This is likely used to register the tool with the MCP system.
    export const generateConversationSummaryTool: MCPTool = { name: 'generate_conversation_summary', description: 'Generate different types of summaries from a conversation', inputSchema: { type: 'object', properties: { conversation_id: { type: 'string', format: 'uuid', description: 'The conversation ID to summarize' }, summary_type: { type: 'string', enum: ['brief', 'detailed', 'action_items', 'decisions'], default: 'brief', description: 'Type of summary to generate' } }, required: ['conversation_id'] } }
  • Export object mapping tool names (snake_case) to their handler functions, serving as a registry for all conversation-related tools including generate_conversation_summary.
    export const conversationHandlers = { save_conversation: saveConversation, get_conversations: getConversations, analyze_conversation: analyzeConversation, extract_action_items: extractActionItems, generate_conversation_summary: generateConversationSummary }

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