Skip to main content
Glama

delete_smime_info

Remove S/MIME encryption configuration for a Gmail send-as alias to manage email security settings.

Instructions

Deletes the specified 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:1200-1212 (registration)
    Registration of the 'delete_smime_info' MCP tool, including inline input schema using Zod and the handler function that invokes the Gmail API to delete the specified S/MIME configuration for a send-as alias.
    server.tool("delete_smime_info",
      "Deletes the specified 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.delete({ userId: 'me', sendAsEmail: params.sendAsEmail, id: params.id })
          return formatResponse(data)
        })
      }
    )
  • Handler function for 'delete_smime_info' tool that uses the shared handleTool utility to authenticate and call the Gmail API's users.settings.sendAs.smimeInfo.delete method.
    async (params) => {
      return handleTool(config, async (gmail: gmail_v1.Gmail) => {
        const { data } = await gmail.users.settings.sendAs.smimeInfo.delete({ userId: 'me', sendAsEmail: params.sendAsEmail, id: params.id })
        return formatResponse(data)
      })
    }
  • Input schema for 'delete_smime_info' tool defined inline using Zod, requiring sendAsEmail and id parameters.
    {
      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")
    },
  • Shared helper function 'handleTool' used by all Gmail API tools, including 'delete_smime_info', to handle OAuth2 authentication, client creation, and API call execution with error handling.
    const handleTool = async (queryConfig: Record<string, any> | undefined, apiCall: (gmail: gmail_v1.Gmail) => Promise<any>) => {
      try {
        const oauth2Client = queryConfig ? createOAuth2Client(queryConfig) : defaultOAuth2Client
        if (!oauth2Client) throw new Error('OAuth2 client could not be created, please check your credentials')
    
        const credentialsAreValid = await validateCredentials(oauth2Client)
        if (!credentialsAreValid) throw new Error('OAuth2 credentials are invalid, please re-authenticate')
    
        const gmailClient = queryConfig ? google.gmail({ version: 'v1', auth: oauth2Client }) : defaultGmailClient
        if (!gmailClient) throw new Error('Gmail client could not be created, please check your credentials')
    
        const result = await apiCall(gmailClient)
        return result
      } catch (error: any) {
        return `Tool execution failed: ${error.message}`
      }
    }
  • Shared helper 'formatResponse' used to standardize tool responses as MCP content blocks with JSON stringified data.
    const formatResponse = (response: any) => ({ content: [{ type: "text", text: JSON.stringify(response) }] })

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description should disclose behavioral traits. It only states that deletion occurs, but does not mention irreversibility, impact on other settings, or required permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that efficiently states the action and resource. No unnecessary words or details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple delete operation with well-described parameters, the description is adequate but could be improved by mentioning that the deletion is permanent or referencing related tools like set_default_smime_info.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already fully describes both parameters with clear descriptions. The description adds no additional meaning beyond the schema, so a baseline score of 3 is appropriate given 100% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the verb 'Deletes', the resource 'S/MIME config', and the alias context 'specified send-as alias'. It clearly distinguishes this from sibling tools like insert_smime_info, get_smime_info, list_smime_info, and set_default_smime_info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool, prerequisites, or alternatives. It lacks any context about required permissions or conditions for deletion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.