get_send_as
Retrieve a specific send-as alias configuration from Gmail to verify or use alternative sender identities for email management.
Instructions
Gets the specified send-as alias
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sendAsEmail | Yes | The send-as alias to be retrieved |
Implementation Reference
- src/index.ts:1149-1155 (handler)The handler function that executes the get_send_as tool logic. It uses handleTool to set up OAuth2 authentication and calls the Gmail API gmail.users.settings.sendAs.get to retrieve the specified send-as alias.async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.sendAs.get({ userId: 'me', sendAsEmail: params.sendAsEmail }) return formatResponse(data) }) } )
- src/index.ts:1146-1148 (schema)Input schema for the get_send_as tool, defining the required sendAsEmail parameter as a string.{ sendAsEmail: z.string().describe("The send-as alias to be retrieved") },
- src/index.ts:1144-1155 (registration)Registration of the get_send_as tool using server.tool(), including description, input schema, and handler function.server.tool("get_send_as", "Gets the specified send-as alias", { sendAsEmail: z.string().describe("The send-as alias to be retrieved") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.sendAs.get({ userId: 'me', sendAsEmail: params.sendAsEmail }) return formatResponse(data) }) } )