get_workspace_overview
Retrieve a comprehensive workspace overview with analytics and insights. Customize by time range and focus areas like productivity or blockers.
Instructions
Get comprehensive overview of entire workspace with analytics and insights
Input 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)The main handler function for get_workspace_overview. It parses input (include_analytics, time_range, focus_areas), fetches projects/tasks/documents from supabaseService, and builds an overview with summary stats, project health, productivity metrics, collaboration insights, AI readiness, recommendations, and optional analytics/focused insights.
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 (GetWorkspaceOverviewSchema) for validating tool input: include_analytics (boolean, default true), time_range (enum today/week/month/all, default week), focus_areas (optional array of productivity/collaboration/documentation/blockers).
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)Tool definition object (getWorkspaceOverviewTool) with name 'get_workspace_overview', description, and JSON Schema inputSchema matching the Zod schema.
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-726 (registration)Export map contextAggregationHandlers that maps the string 'get_workspace_overview' to the handler function getWorkspaceOverview, which gets merged into allHandlers in index.ts.
export const contextAggregationHandlers = { get_smart_context: getSmartContext, get_workspace_overview: getWorkspaceOverview, - src/index.ts:597-602 (registration)Resource handler in index.ts that calls allHandlers.get_workspace_overview when the URI path is '/workspace/overview', with default options (include_analytics: true, time_range: 'week').
// Workspace Resources if (path === '/workspace/overview') { return await this.allHandlers.get_workspace_overview({ include_analytics: true, time_range: 'week' })