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 and target audience.

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 implements the core logic of the 'generate_context_summary' tool. It validates input using Zod schema, generates a structured summary including executive summary, metrics, insights, action items, recommendations, and metadata.
    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 and validation for the generate_context_summary tool, including context_data object and optional focus/audience parameters.
    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 for 'generate_context_summary', including name, description, and JSON schema for input validation.
    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 object mapping tool names to their handler functions, including 'generate_context_summary' mapped to generateContextSummary.
    export const contextAggregationHandlers = { get_smart_context: getSmartContext, get_workspace_overview: getWorkspaceOverview, get_project_insights: getProjectInsights, find_related_content: findRelatedContent, generate_context_summary: generateContextSummary }
  • Export object collecting all context aggregation MCPTool objects, including generateContextSummaryTool.
    export const contextAggregationTools = { getSmartContextTool, getWorkspaceOverviewTool, getProjectInsightsTool, findRelatedContentTool, generateContextSummaryTool }

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