Skip to main content
Glama

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
NameRequiredDescriptionDefault
sendAsEmailYesThe email address that appears in the 'From:' header
idYesThe 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)
        })
      }
    )
  • 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)
      })
    }
  • 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")
    },

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/HitmanLy007/gmail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server