feat(google-workspace): add per-service prompts for agents#419
Merged
Conversation
Mirrors the pattern HyperDX uses (`server/prompts.ts` exposed via `prompts/list` and `prompts/get`) so an agent can pull just the relevant guide on demand instead of stuffing every tool description into its system prompt. Adds six prompts: - GOOGLE_WORKSPACE_AGENT_GUIDE — entry point covering all 5 services, tool naming, time/timezone, destructive actions, pagination, re-auth. - GOOGLE_WORKSPACE_CALENDAR_GUIDE — primary calendar convention, scheduling workflows, recurring-event pitfalls. - GOOGLE_WORKSPACE_GMAIL_GUIDE — Gmail search syntax, thread vs message, system-label IDs, and the drafts-only caveat (this MCP cannot send mail). - GOOGLE_WORKSPACE_DRIVE_GUIDE — Drive structured query syntax, MIME types, content vs metadata vs permissions, base64 download note. - GOOGLE_WORKSPACE_CHAT_GUIDE — Spaces vs DMs, threading, send-message confirmation pattern. - GOOGLE_WORKSPACE_PEOPLE_GUIDE — directory (Workspace-only) vs personal contacts, get_user_profile shortcut. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…rkflows Adds 11 prompt templates (with arguments) the user can pick from the MCP prompt menu — slash-command-style entries that drive the agent through common day-to-day tasks across the 5 wrapped services: Cross-service: - morning_briefing — calendar + important unread + recent chat - prep_for_meeting — attendees, last emails with them, shared docs Calendar: - whats_on_calendar — flexible time window - find_meeting_time — multi-attendee free/busy - block_focus_time — reserve a private block, confirms first Gmail: - inbox_triage — classify Reply/FYI/Action/Noise - draft_reply — find thread + create draft (user must Send) Drive: - find_files — natural-language → structured query - summarize_doc — find by name + read content + summarize Chat: - catch_up_chat — Decisions / Action items / Open threads / FYI People: - find_person — directory + personal contacts Each template is a single user message that orchestrates the right tools. Destructive operations (create event, draft reply, send chat) explicitly ask the agent to confirm before invoking. Existing agent guides are kept under the same export, separated by section comments. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds curated MCP prompts to
google-workspace, mirroring the pattern HyperDX already uses (server/prompts.tsexposed viaprompts/list/prompts/get). An agent can pull only the relevant guide on demand instead of cramming every tool description into its system prompt.Six prompts:
GOOGLE_WORKSPACE_AGENT_GUIDE— entry point. Lists the 5 services, the tool prefix convention, time/timezone rules, destructive-action rules, pagination, and re-auth handling.GOOGLE_WORKSPACE_CALENDAR_GUIDE— Calendar tool selection, theprimarycalendar convention, scheduling/free-time/reschedule workflows, and recurring-event pitfalls.GOOGLE_WORKSPACE_GMAIL_GUIDE— Gmail search syntax (from:,is:unread,newer_than:7d,after:2026/04/01), thread vs. message ops, system label IDs (INBOX,SENT, …), and the drafts-only caveat (this MCP has nosend_messagefor mail).GOOGLE_WORKSPACE_DRIVE_GUIDE— Drive structured query syntax (name contains,'<folderId>' in parents), MIME types for Docs/Sheets/Slides,read_file_contentvs.download_file_content, base64 caveats.GOOGLE_WORKSPACE_CHAT_GUIDE— Spaces vs. DMs, threading, send-message confirmation pattern.GOOGLE_WORKSPACE_PEOPLE_GUIDE— directory (Workspace-only) vs. personal contacts,get_user_profileas the "who am I" shortcut.Each prompt is hand-written from the actual tool catalog (see
TOOLS.md) — describes what tools exist, when to call which one, and what to watch out for.Why hand-written instead of generated?
The auto-generated
TOOLS.mdand the per-tooldescriptionfields already cover what each tool does. The prompts cover how to use them together — workflow guidance that doesn't come for free from upstream metadata. They're stable across Google's catalog changes (re-runninggenerate-toolsdoesn't touch them).Test plan
bun run check— clean (tsc --noEmit)bun run build— bundles 2.13 MB / 401 modulesbun scripts/check.ts google-workspace— ✅ passedprompts/listreturns 6 entriesprompts/get GOOGLE_WORKSPACE_GMAIL_GUIDEreturns the markdown body🤖 Generated with Claude Code
Summary by cubic
Add curated per‑service MCP guides and user workflow templates to
google-workspace, exposed viaprompts/listandprompts/get. Agents can pull focused docs on demand, and users can launch common tasks without bloating system prompts.GOOGLE_WORKSPACE_*_GUIDE; Gmail notes drafts‑only) and 11 user templates across Calendar, Gmail, Drive, Chat, and People (e.g.,morning_briefing,find_meeting_time,draft_reply,find_files).server/main.ts), addedserver/prompts.ts, and updatedREADME.mdwith the lists and source path.Written for commit 36a34f0. Summary will update on new commits.