load_day_planner
Open an interactive dashboard to view and manage your daily schedule by integrating calendar events, prioritized emails, and relevant documents in one interface.
Instructions
Opens an interactive day planning dashboard showing your calendar, emails, and docs.
The dashboard shows:
Today's calendar events (expandable to reveal related emails and docs)
Inbox emails prioritized by importance
Recent Drive documents surfaced by meeting context
Interactive buttons: expand events, mark emails handled, start meeting prep
Use this to give the user a holistic view of their day.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Date to plan for in YYYY-MM-DD format. Defaults to today. | |
| maxEmails | No | Max email threads to surface (default 10) | |
| maxDocs | No | Max recent Drive docs to surface (default 5) |
Implementation Reference
- src/tools/dayPlanner.ts:60-84 (handler)The handler function for load_day_planner tool - fetches calendar events, emails, and docs, cross-references them, and returns DayPlannerData JSON
async ({ date, maxEmails, maxDocs }) => { date = date ?? new Date().toISOString().split('T')[0]; const [events, emails, recentDocs] = await Promise.all([ svc.fetchCalendarEvents(date), svc.fetchEmailThreads(maxEmails), svc.fetchRecentDocs(maxDocs), ]); const { eventEmailMap, eventDocMap } = svc.crossReference(events, emails, recentDocs); const data: DayPlannerData = { generatedAt: new Date().toISOString(), date, events, emails, recentDocs, eventEmailMap, eventDocMap, }; return { content: [{ type: 'text' as const, text: JSON.stringify(data) }], }; }, - src/tools/dayPlanner.ts:14-21 (schema)Zod schema LoadDayPlannerSchema defining input validation: optional date (YYYY-MM-DD), maxEmails (1-50), and maxDocs (1-20)
const LoadDayPlannerSchema = z.object({ date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional() .describe('Date to plan for in YYYY-MM-DD format. Defaults to today.'), maxEmails: z.number().int().min(1).max(50).default(10) .describe('Max email threads to surface (default 10)'), maxDocs: z.number().int().min(1).max(20).default(5) .describe('Max recent Drive docs to surface (default 5)'), }); - src/tools/dayPlanner.ts:43-85 (registration)registerAppTool call that registers the load_day_planner tool with MCP server, including title, description, inputSchema, and UI resource URI metadata
registerAppTool( server, 'load_day_planner', { title: 'Load Day Planner', description: `Opens an interactive day planning dashboard showing your calendar, emails, and docs. The dashboard shows: - Today's calendar events (expandable to reveal related emails and docs) - Inbox emails prioritized by importance - Recent Drive documents surfaced by meeting context - Interactive buttons: expand events, mark emails handled, start meeting prep Use this to give the user a holistic view of their day.`, inputSchema: LoadDayPlannerSchema.shape, _meta: { ui: { resourceUri: RESOURCE_URI } }, }, async ({ date, maxEmails, maxDocs }) => { date = date ?? new Date().toISOString().split('T')[0]; const [events, emails, recentDocs] = await Promise.all([ svc.fetchCalendarEvents(date), svc.fetchEmailThreads(maxEmails), svc.fetchRecentDocs(maxDocs), ]); const { eventEmailMap, eventDocMap } = svc.crossReference(events, emails, recentDocs); const data: DayPlannerData = { generatedAt: new Date().toISOString(), date, events, emails, recentDocs, eventEmailMap, eventDocMap, }; return { content: [{ type: 'text' as const, text: JSON.stringify(data) }], }; }, ); - src/index.ts:36-37 (registration)Imports and calls registerDayPlannerTools(server) to register both load_day_planner and handle_day_planner_action tools with the MCP server
// Register day planner tools (load_day_planner + handle_day_planner_action) registerDayPlannerTools(server); - src/types.ts:67-72 (schema)TypeScript interface LoadDayPlannerInput defining the type structure for tool input parameters
export interface LoadDayPlannerInput { date?: string; // YYYY-MM-DD, defaults to today daysAhead?: number; // Include events N days ahead (default 0 = today only) maxEmails?: number; // Max emails to fetch (default 20) maxDocs?: number; // Max recent docs to fetch (default 10) }