set_default_smime_info
Set the default S/MIME configuration for a specified email alias in Gmail to enhance secure email communication and ensure consistent encryption settings.
Instructions
Sets the default S/MIME config for the specified send-as alias
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The immutable ID for the S/MIME config | |
| sendAsEmail | Yes | The email address that appears in the 'From:' header |
Implementation Reference
- src/index.ts:1289-1301 (registration)Registration of the 'set_default_smime_info' tool using McpServer.tool(), including inline schema and handler.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:1291-1294 (schema)Zod input schema for the tool 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") },
- src/index.ts:1295-1300 (handler)Handler function that uses the shared handleTool wrapper to authenticate and call the Gmail API method users.settings.sendAs.smimeInfo.setDefault to set the default S/MIME configuration for the specified send-as alias.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) }) }