SKILL.md--- name: managing-google-workspace description: > Manages Google Workspace operations across 12 services (Gmail, Drive, Calendar, Docs, Sheets, Slides, Forms, Tasks, Contacts, Chat, Apps Script, Custom Search). Supports MCP tools or the workspace-cli client. Provides tool routing, workflows, and parameter guidance for every tool. Triggers for "check my email", "find a file", "schedule a meeting", "update the spreadsheet", "share a doc", "create a presentation", "add a task", "look up a contact", or any mention of Google Workspace services. allowed-tools: Bash(workspace-cli *), Bash(uv run workspace-cli *) user-invocable: false --- # Google Workspace -- Tool Router ## Execution Mode Detect which mode is available and use it. ### MCP (preferred) If MCP tools from the `google-workspace` server are available, call them directly. The tool names in the tables below are the base names -- prefix with the server name as needed (e.g. `google-workspace:search_gmail_messages`). ### CLI (no MCP) If no MCP tools are available, call a running server via `workspace-cli`: ```bash workspace-cli list workspace-cli call <tool_name> key=value ... ``` - Pass `user_google_email=USER_EMAIL` only when the tool schema requires it (legacy OAuth 2.0 without `USER_GOOGLE_EMAIL` set). Omit it for OAuth 2.1 and trusted-gateway servers, which take it from the verified identity. - Arguments are `key=value` pairs; values are parsed as JSON when possible, so pass lists and objects as JSON (e.g. `label_ids='["INBOX"]'`). - The server must be reachable over HTTP. The default URL is `http://localhost:8000/mcp` (a server started with `--transport streamable-http`); override it with `--url` before the subcommand (`workspace-cli --url <url> call ...`) or `WORKSPACE_MCP_URL`. Plugin users on stdio can set `WORKSPACE_MCP_HTTP_PORT` to expose a loopback sidecar at `http://127.0.0.1:<port>/mcp`. - If `workspace-cli` is not on PATH, run `uv run workspace-cli` from a checkout of this repo. Installing it permanently (`uv tool install .` in that checkout) is a manual setup step for the user. Never use `uvx workspace-cli`: an unrelated, abandoned PyPI package squats that name. Before calling a tool, read the relevant reference file for exact parameter names and types. Only use parameters documented there -- do not invent parameters. ## First-Time Setup If a tool call fails with a credential error, walk the user through this setup. ### 1. Create OAuth credentials Direct the user to [Google Cloud Console](https://console.cloud.google.com/apis/credentials): - Create OAuth 2.0 Client ID (Desktop application type) - Enable the Google APIs they need (Gmail, Drive, Calendar, etc.) - Copy the Client ID and Client Secret ### 2. Store credentials Direct the user to edit `~/.claude/settings.local.json` themselves (this file is gitignored and never shared). Do not ask the user to paste secrets into the conve