get_workspace_overview
Retrieve comprehensive workspace analytics and insights to monitor productivity, collaboration, documentation, and blockers across specified time periods.
Instructions
Get comprehensive overview of entire workspace with analytics and insights
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_analytics | No | Whether to include detailed analytics | |
| time_range | No | Time range for activity analysis | week |
| focus_areas | No | Specific areas to focus analysis on |
Implementation Reference
- src/tools/context-aggregation.ts:182-224 (handler)Main handler function for get_workspace_overview tool. Fetches projects, tasks, documents; computes summary metrics, health analysis, productivity, collaboration insights, AI readiness, and recommendations.export const getWorkspaceOverview = requireAuth(async (args: any) => { const { include_analytics, time_range, focus_areas } = GetWorkspaceOverviewSchema.parse(args) logger.info('Getting workspace overview', { time_range, focus_areas }) // Get all workspace data const [projects, tasks, documents] = await Promise.all([ supabaseService.getProjects({}, { limit: 50 }), supabaseService.getTasks({}, { limit: 100 }), supabaseService.getDocuments({}, { limit: 100 }) ]) const overview: any = { summary: { total_projects: projects.length, active_projects: projects.filter(p => p.status === 'active').length, total_tasks: tasks.length, completed_tasks: tasks.filter(t => t.status === 'done').length, total_documents: documents.length, documentation_coverage: calculateDocumentationCoverage(projects, documents) }, project_health: analyzeProjectHealth(projects, tasks, documents), productivity_metrics: calculateProductivityMetrics(tasks, time_range), collaboration_insights: analyzeCollaboration(tasks, documents), ai_readiness: assessAIReadiness(documents), recommendations: generateWorkspaceRecommendations(projects, tasks, documents) } if (include_analytics) { overview.analytics = { task_distribution: analyzeTaskDistribution(tasks), document_metrics: analyzeDocumentMetrics(documents), project_velocity: calculateProjectVelocity(projects, tasks, time_range), bottleneck_analysis: identifyBottlenecks(projects, tasks) } } if (focus_areas) { overview.focused_insights = generateFocusedInsights(overview, focus_areas) } return overview })
- Zod schema for validating input parameters to the get_workspace_overview tool.const GetWorkspaceOverviewSchema = z.object({ include_analytics: z.boolean().default(true), time_range: z.enum(['today', 'week', 'month', 'all']).default('week'), focus_areas: z.array(z.enum(['productivity', 'collaboration', 'documentation', 'blockers'])).optional() })
- src/tools/context-aggregation.ts:153-180 (registration)MCPTool registration object defining the tool's metadata, description, and input schema for the MCP server.export const getWorkspaceOverviewTool: MCPTool = { name: 'get_workspace_overview', description: 'Get comprehensive overview of entire workspace with analytics and insights', inputSchema: { type: 'object', properties: { include_analytics: { type: 'boolean', default: true, description: 'Whether to include detailed analytics' }, time_range: { type: 'string', enum: ['today', 'week', 'month', 'all'], default: 'week', description: 'Time range for activity analysis' }, focus_areas: { type: 'array', items: { type: 'string', enum: ['productivity', 'collaboration', 'documentation', 'blockers'] }, description: 'Specific areas to focus analysis on' } } } }
- src/tools/context-aggregation.ts:724-730 (registration)Export mapping tool names to their handler functions, used by the main server to register all context aggregation handlers including get_workspace_overview.export const contextAggregationHandlers = { get_smart_context: getSmartContext, get_workspace_overview: getWorkspaceOverview, get_project_insights: getProjectInsights, find_related_content: findRelatedContent, generate_context_summary: generateContextSummary }
- src/index.ts:143-156 (registration)Main server constructor combines all handlers from modules including contextAggregationHandlers (which includes get_workspace_overview), registering it in the MCP server's allHandlers map.this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }