set_default_smime_info
Configure the default S/MIME encryption settings for a Gmail send-as email alias to ensure secure message transmission.
Instructions
Sets the default S/MIME config for the specified send-as alias
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sendAsEmail | Yes | The email address that appears in the 'From:' header | |
| id | Yes | The immutable ID for the S/MIME config |
Implementation Reference
- src/index.ts:1256-1268 (registration)Registration of the 'set_default_smime_info' tool. Includes input schema (sendAsEmail and id), description, and inline handler function that validates OAuth credentials via handleTool and calls the Gmail API gmail.users.settings.sendAs.smimeInfo.setDefault to set the default S/MIME configuration for the specified send-as alias.server.tool("set_default_smime_info", "Sets the default S/MIME config for the specified send-as alias", { sendAsEmail: z.string().describe("The email address that appears in the 'From:' header"), id: z.string().describe("The immutable ID for the S/MIME config") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.sendAs.smimeInfo.setDefault({ userId: 'me', sendAsEmail: params.sendAsEmail, id: params.id }) return formatResponse(data) }) } )
- src/index.ts:1262-1267 (handler)The handler function for the tool, which uses the shared handleTool utility to create/authenticate a Gmail client and invoke the setDefault method on smimeInfo for the given sendAsEmail and id.async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.sendAs.smimeInfo.setDefault({ userId: 'me', sendAsEmail: params.sendAsEmail, id: params.id }) return formatResponse(data) }) }
- src/index.ts:1258-1261 (schema)Zod schema defining the input parameters: sendAsEmail (string) and id (string).{ sendAsEmail: z.string().describe("The email address that appears in the 'From:' header"), id: z.string().describe("The immutable ID for the S/MIME config") },