Google Workspace
Access all of Google Workspace — Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and 20+ more services — through a single toolkit. Powered by the gws CLI and the Model Context Protocol, tools are discovered dynamically at runtime. When Google adds new APIs or gws ships updates, your agent picks them up automatically with zero code changes.Prerequisites
1
Install the gws CLI
2
Authenticate with Google
3
Install the MCP SDK
Quick Start
Config
string[]
Google Workspace services to expose as tools. Use
["all"] to enable every service.string
default:"gws"
Path to the
gws binary. Override if it’s not on your PATH.boolean
default:"false"
Include higher-level workflow tools (e.g., composing and sending a Gmail message, uploading to Drive with metadata).
boolean
default:"false"
Include helper tools for common multi-step operations.
Record<string, string>
Environment variables forwarded to the gws process. Useful for overriding auth (e.g.,
GOOGLE_WORKSPACE_CLI_TOKEN).Service Selection
Each service adds roughly 10-80 tools. Select only what you need to keep the tool set manageable:Available Services
Using ToolRouter for Large Tool Sets
When enabling many services, usetoolRouter to automatically select only the relevant tools per query. This keeps LLM prompts small and responses fast:
Advanced: Raw MCPToolProvider
For full control over the MCP connection (custom filtering, include/exclude tools), useMCPToolProvider directly:
Lifecycle
The toolkit must be connected before use and closed when done:Comparison with Individual Toolkits
Agentium also ships dedicated toolkits for Gmail, Google Sheets, and Google Calendar. Here’s when to use which:Troubleshooting
”gws: command not found”
The gws CLI is not installed or not on your PATH.“Access blocked” during gws auth
Your OAuth app is in testing mode and your account isn’t listed as a test user. See the gws troubleshooting guide.Too many tools overwhelming the LLM
Reduce the service list or usetoolRouter: