insert_smime_info
Upload S/MIME certificate and private key for a send-as alias to enable encrypted email.
Instructions
Insert (upload) the given S/MIME config for the specified send-as alias
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sendAsEmail | Yes | The email address that appears in the 'From:' header | |
| encryptedKeyPassword | Yes | Encrypted key password | |
| pkcs12 | Yes | PKCS#12 format containing a single private/public key pair and certificate chain |
Implementation Reference
- src/index.ts:1268-1274 (handler)The handler/execution logic for the 'insert_smime_info' tool. It takes sendAsEmail, encryptedKeyPassword, and pkcs12 parameters and calls the Gmail API's smimeInfo.insert endpoint.
async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.sendAs.smimeInfo.insert({ userId: 'me', sendAsEmail: params.sendAsEmail, requestBody: params }) return formatResponse(data) }) } ) - src/index.ts:1263-1267 (schema)Zod schema defining the input parameters for insert_smime_info: sendAsEmail (string), encryptedKeyPassword (string), and pkcs12 (string).
{ sendAsEmail: z.string().describe("The email address that appears in the 'From:' header"), encryptedKeyPassword: z.string().describe("Encrypted key password"), pkcs12: z.string().describe("PKCS#12 format containing a single private/public key pair and certificate chain") }, - src/index.ts:1261-1274 (registration)Registration of the 'insert_smime_info' MCP tool via server.tool(), with description 'Insert (upload) the given S/MIME config for the specified send-as alias'.
server.tool("insert_smime_info", "Insert (upload) the given S/MIME config for the specified send-as alias", { sendAsEmail: z.string().describe("The email address that appears in the 'From:' header"), encryptedKeyPassword: z.string().describe("Encrypted key password"), pkcs12: z.string().describe("PKCS#12 format containing a single private/public key pair and certificate chain") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.sendAs.smimeInfo.insert({ userId: 'me', sendAsEmail: params.sendAsEmail, requestBody: params }) return formatResponse(data) }) } )