Skip to main content
Glama

update_imap

Configure IMAP access for Gmail accounts by enabling or disabling the protocol, setting expunge behavior for deleted messages, and managing folder size limits.

Instructions

Updates IMAP settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enabledYesWhether IMAP is enabled for the account
expungeBehaviorNoThe action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder
maxFolderSizeNoAn optional limit on the number of messages that can be accessed through IMAP

Implementation Reference

  • src/index.ts:901-914 (registration)
    Registration of the 'update_imap' MCP tool, including schema and handler function.
    server.tool("update_imap", "Updates IMAP settings", { enabled: z.boolean().describe("Whether IMAP is enabled for the account"), expungeBehavior: z.enum(['archive', 'trash', 'deleteForever']).optional().describe("The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder"), maxFolderSize: z.number().optional().describe("An optional limit on the number of messages that can be accessed through IMAP") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.updateImap({ userId: 'me', requestBody: params }) return formatResponse(data) }) } )
  • Handler for the 'update_imap' tool: invokes Gmail API to update IMAP settings using the provided parameters.
    async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.updateImap({ userId: 'me', requestBody: params }) return formatResponse(data) }) }
  • Input schema (Zod) for 'update_imap' tool parameters.
    { enabled: z.boolean().describe("Whether IMAP is enabled for the account"), expungeBehavior: z.enum(['archive', 'trash', 'deleteForever']).optional().describe("The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder"), maxFolderSize: z.number().optional().describe("An optional limit on the number of messages that can be accessed through IMAP") },

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