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)
        })
      }
    )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states this is a 'get' operation but doesn't disclose behavioral traits like whether it requires specific permissions, what happens if the address doesn't exist, rate limits, or what the return format looks like. For a read operation with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's appropriately sized for a simple retrieval tool, though it could be slightly more informative without sacrificing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple parameter schema, the description is incomplete. It doesn't explain what information is returned about the forwarding address, error conditions, or how this differs from related tools. For a tool in a rich ecosystem with many siblings, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'forwardingEmail' clearly documented in the schema as 'The forwarding address to be retrieved'. The description adds no additional meaning beyond what the schema provides, so it meets the baseline of 3 when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'gets the specified forwarding address', which is a clear verb+resource combination. However, it doesn't distinguish this from sibling tools like 'list_forwarding_addresses' or 'get_auto_forwarding', leaving ambiguity about when to use this specific retrieval tool versus alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing an existing forwarding address), compare it to 'list_forwarding_addresses' for bulk retrieval, or explain why one would retrieve a single address rather than list all.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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