remove_delegate
Remove a delegate from your Gmail account to revoke their access to manage your emails and settings.
Instructions
Removes the specified delegate
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| delegateEmail | Yes | Email address of delegate to remove |
Implementation Reference
- src/index.ts:966-971 (handler)Handler function that validates credentials, creates Gmail client if needed, and calls the Gmail API to delete the specified delegate.async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.delegates.delete({ userId: 'me', delegateEmail: params.delegateEmail }) return formatResponse(data) }) }
- src/index.ts:963-965 (schema)Input schema for the remove_delegate tool, requiring delegateEmail as string.{ delegateEmail: z.string().describe("Email address of delegate to remove") },
- src/index.ts:961-972 (registration)Registers the remove_delegate tool on the MCP server with description, input schema, and handler function.server.tool("remove_delegate", "Removes the specified delegate", { delegateEmail: z.string().describe("Email address of delegate to remove") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.delegates.delete({ userId: 'me', delegateEmail: params.delegateEmail }) return formatResponse(data) }) } )