Skip to main content
Glama

get_forwarding_address

Retrieve a specific email forwarding address configured in Gmail to manage where incoming messages are redirected.

Instructions

Gets the specified forwarding address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forwardingEmailYesThe forwarding address to be retrieved

Implementation Reference

  • The handler function for the 'get_forwarding_address' tool. It uses the handleTool wrapper to authenticate, create a Gmail client, call the Gmail API to get the forwarding address by email, and format the response.
    async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.forwardingAddresses.get({ userId: 'me', forwardingEmail: params.forwardingEmail }) return formatResponse(data) }) }
  • Zod schema defining the input parameters for the tool: forwardingEmail (string).
    { forwardingEmail: z.string().describe("The forwarding address to be retrieved") },
  • src/index.ts:1070-1081 (registration)
    Registration of the 'get_forwarding_address' tool on the MCP server, including name, description, input schema, and handler function.
    server.tool("get_forwarding_address", "Gets the specified forwarding address", { forwardingEmail: z.string().describe("The forwarding address to be retrieved") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.forwardingAddresses.get({ userId: 'me', forwardingEmail: params.forwardingEmail }) 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/HitmanLy007/gmail-mcp'

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