Skip to main content
Glama

add_delegate

Grant email management access by adding a delegate to a Gmail account. This tool allows another user to send, read, and organize emails on your behalf.

Instructions

Adds a delegate to the specified account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
delegateEmailYesEmail address of delegate to add

Implementation Reference

  • The handler function executes the tool logic by calling the Gmail API to create a new delegate using the provided delegateEmail.
    async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.delegates.create({ userId: 'me', requestBody: { delegateEmail: params.delegateEmail } }) return formatResponse(data) }) }
  • Input schema defining the delegateEmail parameter for the add_delegate tool.
    { delegateEmail: z.string().describe("Email address of delegate to add") },
  • src/index.ts:962-973 (registration)
    Registration of the add_delegate tool using server.tool, including name, description, schema, and handler.
    server.tool("add_delegate", "Adds a delegate to the specified account", { delegateEmail: z.string().describe("Email address of delegate to add") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.delegates.create({ userId: 'me', requestBody: { delegateEmail: params.delegateEmail } }) 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/faithk7/gmail-mcp'

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