Skip to main content
Glama

create_forwarding_address

Enables users to set up an email forwarding address for redirecting messages from Gmail to a specified destination email.

Instructions

Creates a forwarding address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forwardingEmailYesAn email address to which messages can be forwarded

Implementation Reference

  • Handler function that executes the tool logic by calling Gmail API to create a forwarding address.
    async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.forwardingAddresses.create({ userId: 'me', requestBody: params }) return formatResponse(data) }) }
  • Zod schema defining the input parameters for the create_forwarding_address tool.
    { forwardingEmail: z.string().describe("An email address to which messages can be forwarded") },
  • src/index.ts:1077-1087 (registration)
    Registration of the create_forwarding_address tool on the MCP server, including schema and inline handler.
    server.tool("create_forwarding_address", "Creates a forwarding address", { forwardingEmail: z.string().describe("An email address to which messages can be forwarded") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.forwardingAddresses.create({ userId: 'me', requestBody: params }) return formatResponse(data) }) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shinzo-labs/gmail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server