update_pop
Modify POP settings to define which messages are accessible via POP and the action after fetching each message.
Instructions
Updates POP settings
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accessWindow | Yes | The range of messages which are accessible via POP | |
| disposition | Yes | The action that will be executed on a message after it has been fetched via POP |
Implementation Reference
- src/index.ts:929-941 (registration)Registration of the 'update_pop' tool using server.tool() with schema and handler.
server.tool("update_pop", "Updates POP settings", { accessWindow: z.enum(['disabled', 'allMail', 'fromNowOn']).describe("The range of messages which are accessible via POP"), disposition: z.enum(['archive', 'trash', 'leaveInInbox']).describe("The action that will be executed on a message after it has been fetched via POP") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.updatePop({ userId: 'me', requestBody: params }) return formatResponse(data) }) } ) - src/index.ts:931-934 (schema)Input schema for 'update_pop' defining accessWindow (enum: disabled, allMail, fromNowOn) and disposition (enum: archive, trash, leaveInInbox).
{ accessWindow: z.enum(['disabled', 'allMail', 'fromNowOn']).describe("The range of messages which are accessible via POP"), disposition: z.enum(['archive', 'trash', 'leaveInInbox']).describe("The action that will be executed on a message after it has been fetched via POP") }, - src/index.ts:935-940 (handler)Handler function for 'update_pop' that calls gmail.users.settings.updatePop with the params and returns the response.
async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.updatePop({ userId: 'me', requestBody: params }) return formatResponse(data) }) }