Skip to main content
Glama
jakedx6
by jakedx6

generate_context_summary

Generate intelligent summaries from aggregated context data including projects, tasks, documents, and conversations, with customizable focus for different audiences.

Instructions

Generate intelligent summary from aggregated context data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_dataYesAggregated context data to summarize
summary_focusNoFocus of the summaryoverview
target_audienceNoTarget audience for the summaryai_agent

Implementation Reference

  • The primary handler function that executes the tool logic. It validates input with GenerateContextSummarySchema, generates various summary sections using helper functions (generateExecutiveSummary, extractKeyMetrics, etc.), and returns a structured summary object.
    export const generateContextSummary = requireAuth(async (args: any) => { const { context_data, summary_focus, target_audience } = GenerateContextSummarySchema.parse(args) logger.info('Generating context summary', { summary_focus, target_audience }) const summary = { executive_summary: generateExecutiveSummary(context_data, summary_focus), key_metrics: extractKeyMetrics(context_data), insights: generateInsights(context_data, summary_focus), action_items: extractActionItems(context_data), recommendations: generateRecommendations(context_data, target_audience), metadata: { generated_at: new Date().toISOString(), summary_focus, target_audience, data_sources: Object.keys(context_data).filter(key => (context_data as any)[key]?.length > 0) } } return summary })
  • Zod schema defining the input structure for the generate_context_summary tool, including context_data object with optional arrays for projects, tasks, etc., and enums for summary_focus and target_audience.
    const GenerateContextSummarySchema = z.object({ context_data: z.object({ projects: z.array(z.any()).optional(), tasks: z.array(z.any()).optional(), documents: z.array(z.any()).optional(), conversations: z.array(z.any()).optional() }), summary_focus: z.enum(['overview', 'action_items', 'blockers', 'opportunities']).default('overview'), target_audience: z.enum(['developer', 'manager', 'ai_agent']).default('ai_agent') })
  • MCPTool registration object defining the tool name 'generate_context_summary', description, and inputSchema matching the Zod schema.
    export const generateContextSummaryTool: MCPTool = { name: 'generate_context_summary', description: 'Generate intelligent summary from aggregated context data', inputSchema: { type: 'object', properties: { context_data: { type: 'object', properties: { projects: { type: 'array' }, tasks: { type: 'array' }, documents: { type: 'array' }, conversations: { type: 'array' } }, description: 'Aggregated context data to summarize' }, summary_focus: { type: 'string', enum: ['overview', 'action_items', 'blockers', 'opportunities'], default: 'overview', description: 'Focus of the summary' }, target_audience: { type: 'string', enum: ['developer', 'manager', 'ai_agent'], default: 'ai_agent', description: 'Target audience for the summary' } }, required: ['context_data'] } }
  • Export mapping handler names to functions, registering 'generate_context_summary' to the generateContextSummary handler.
    export const contextAggregationHandlers = { get_smart_context: getSmartContext, get_workspace_overview: getWorkspaceOverview, get_project_insights: getProjectInsights, find_related_content: findRelatedContent, generate_context_summary: generateContextSummary }

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