delete_forwarding_address
Remove a configured email forwarding address from your Gmail account to stop redirecting messages to that destination.
Instructions
Deletes the specified forwarding address
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| forwardingEmail | Yes | The forwarding address to be deleted |
Implementation Reference
- src/index.ts:1095-1100 (handler)The handler function executes the tool logic by calling the Gmail API's users.settings.forwardingAddresses.delete method with the provided forwardingEmail.async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.forwardingAddresses.delete({ userId: 'me', forwardingEmail: params.forwardingEmail }) return formatResponse(data) }) }
- src/index.ts:1092-1094 (schema)Zod input schema defining the forwardingEmail parameter.{ forwardingEmail: z.string().describe("The forwarding address to be deleted") },
- src/index.ts:1090-1101 (registration)Registration of the delete_forwarding_address tool on the MCP server, including description, schema, and inline handler.server.tool("delete_forwarding_address", "Deletes the specified forwarding address", { forwardingEmail: z.string().describe("The forwarding address to be deleted") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.forwardingAddresses.delete({ userId: 'me', forwardingEmail: params.forwardingEmail }) return formatResponse(data) }) } )