Skip to main content
Glama

create_send_as

Create a custom send-as alias to send emails from an alternative email address directly in Gmail. Configure display name, reply-to, signature, and alias settings.

Instructions

Creates a custom send-as alias

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sendAsEmailYesThe email address that appears in the 'From:' header
displayNameNoA name that appears in the 'From:' header
replyToAddressNoAn optional email address that is included in a 'Reply-To:' header
signatureNoAn optional HTML signature
isPrimaryNoWhether this address is the primary address
treatAsAliasNoWhether Gmail should treat this address as an alias

Implementation Reference

  • src/index.ts:1127-1143 (registration)
    Registration of the 'create_send_as' tool using server.tool(), with its Zod schema and handler.
    server.tool("create_send_as",
      "Creates a custom send-as alias",
      {
        sendAsEmail: z.string().describe("The email address that appears in the 'From:' header"),
        displayName: z.string().optional().describe("A name that appears in the 'From:' header"),
        replyToAddress: z.string().optional().describe("An optional email address that is included in a 'Reply-To:' header"),
        signature: z.string().optional().describe("An optional HTML signature"),
        isPrimary: z.boolean().optional().describe("Whether this address is the primary address"),
        treatAsAlias: z.boolean().optional().describe("Whether Gmail should treat this address as an alias")
      },
      async (params) => {
        return handleTool(config, async (gmail: gmail_v1.Gmail) => {
          const { data } = await gmail.users.settings.sendAs.create({ userId: 'me', requestBody: params })
          return formatResponse(data)
        })
      }
    )
  • Input schema for create_send_as: sendAsEmail (required), displayName, replyToAddress, signature, isPrimary, treatAsAlias (optional).
    {
      sendAsEmail: z.string().describe("The email address that appears in the 'From:' header"),
      displayName: z.string().optional().describe("A name that appears in the 'From:' header"),
      replyToAddress: z.string().optional().describe("An optional email address that is included in a 'Reply-To:' header"),
      signature: z.string().optional().describe("An optional HTML signature"),
      isPrimary: z.boolean().optional().describe("Whether this address is the primary address"),
      treatAsAlias: z.boolean().optional().describe("Whether Gmail should treat this address as an alias")
    },
  • Handler function for create_send_as that calls gmail.users.settings.sendAs.create API.
    async (params) => {
      return handleTool(config, async (gmail: gmail_v1.Gmail) => {
        const { data } = await gmail.users.settings.sendAs.create({ userId: 'me', requestBody: params })
        return formatResponse(data)
      })
    }
Behavior2/5

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

Without annotations, the description bears full burden but only states 'creates,' implying mutation. It omits permissions, idempotency, error conditions (e.g., duplicate alias handling), or any side effects.

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

Conciseness3/5

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

The description is extremely brief (one sentence), which is concise but at the cost of necessary details. It could include more context without becoming verbose.

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?

With 6 parameters and no output schema or annotations, the description fails to explain return values, success indicators, or edge cases, leaving the agent with insufficient information.

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 coverage is 100%, so parameters are well-documented. The description adds no extra meaning beyond 'creates'; baseline score is appropriate.

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

Purpose5/5

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

The description 'Creates a custom send-as alias' clearly states the action (create) and resource (send-as alias), effectively distinguishing it from sibling tools like patch_send_as (update) and delete_send_as.

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 on when to use this tool versus alternatives (e.g., patch_send_as for updates). The description lacks context about prerequisites or scenarios.

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/shinzo-labs/gmail-mcp'

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