Skip to main content
Glama
erickva

Google Calendar - No deletion

by erickva

send_email

Send emails with customizable recipients, subject, and body. Supports CC, BCC, and HTML content, integrated with Google Calendar without deletion capabilities.

Instructions

Send a new email

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bccNoBCC recipients (comma-separated)
bodyYesEmail body (can include HTML)
ccNoCC recipients (comma-separated)
subjectYesEmail subject
toYesRecipient email address

Implementation Reference

  • The handler function that executes the send_email tool: destructures args, builds raw MIME email, base64url encodes it, sends via Gmail API, returns success/error response.
    private async handleSendEmail(args: any) {
      try {
        const { to, subject, body, cc, bcc } = args;
    
        // Create email content
        const message = [
          'Content-Type: text/html; charset=utf-8',
          'MIME-Version: 1.0',
          `To: ${to}`,
          cc ? `Cc: ${cc}` : '',
          bcc ? `Bcc: ${bcc}` : '',
          `Subject: ${subject}`,
          '',
          body,
        ].filter(Boolean).join('\r\n');
    
        // Encode the email
        const encodedMessage = Buffer.from(message)
          .toString('base64')
          .replace(/\+/g, '-')
          .replace(/\//g, '_')
          .replace(/=+$/, '');
    
        // Send the email
        const response = await this.gmail.users.messages.send({
          userId: 'me',
          requestBody: {
            raw: encodedMessage,
          },
        });
    
        return {
          content: [
            {
              type: 'text',
              text: `Email sent successfully. Message ID: ${response.data.id}`,
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: `Error sending email: ${error.message}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema defining parameters for send_email tool: to, subject, body (required), cc, bcc.
    inputSchema: {
      type: 'object',
      properties: {
        to: {
          type: 'string',
          description: 'Recipient email address',
        },
        subject: {
          type: 'string',
          description: 'Email subject',
        },
        body: {
          type: 'string',
          description: 'Email body (can include HTML)',
        },
        cc: {
          type: 'string',
          description: 'CC recipients (comma-separated)',
        },
        bcc: {
          type: 'string',
          description: 'BCC recipients (comma-separated)',
        },
      },
      required: ['to', 'subject', 'body']
    },
  • src/index.ts:98-127 (registration)
    Registration of send_email tool in the tools list, including name, description, and inputSchema.
    {
      name: 'send_email',
      description: 'Send a new email',
      inputSchema: {
        type: 'object',
        properties: {
          to: {
            type: 'string',
            description: 'Recipient email address',
          },
          subject: {
            type: 'string',
            description: 'Email subject',
          },
          body: {
            type: 'string',
            description: 'Email body (can include HTML)',
          },
          cc: {
            type: 'string',
            description: 'CC recipients (comma-separated)',
          },
          bcc: {
            type: 'string',
            description: 'BCC recipients (comma-separated)',
          },
        },
        required: ['to', 'subject', 'body']
      },
    },
  • src/index.ts:234-235 (registration)
    Switch case in CallToolRequestSchema handler that routes send_email calls to the handleSendEmail function.
    case 'send_email':
      return await this.handleSendEmail(request.params.arguments);
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Send a new email' implies a write/mutation operation, but it doesn't disclose any behavioral traits such as permissions required, rate limits, whether it's synchronous/asynchronous, error handling, or what happens on success/failure. This is a significant gap for a mutation tool with zero annotation coverage.

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 extremely concise with just three words, front-loaded with the core action. There's zero waste or redundancy, making it efficient for quick understanding, though this brevity contributes to gaps in other dimensions.

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

Completeness2/5

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

Given the complexity of sending an email (a mutation operation with potential side effects), no annotations, no output schema, and a minimal description, this is incomplete. The description doesn't address key contextual aspects like return values, error conditions, or integration with sibling tools, leaving the agent under-informed for safe and effective use.

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?

Schema description coverage is 100%, with all 5 parameters (to, subject, body, cc, bcc) well-documented in the input schema. The description adds no parameter semantics beyond what the schema provides, so it meets the baseline of 3 where the schema does the heavy lifting without compensating for any gaps.

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

Purpose3/5

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

The description 'Send a new email' clearly states the action (send) and resource (email), but it's quite basic and doesn't differentiate from potential sibling tools like 'modify_email' or provide any nuance about what constitutes a 'new' email versus other email operations. It avoids tautology but lacks specificity beyond the obvious.

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 versus alternatives like 'modify_email' or 'search_emails', nor does it mention any prerequisites or context for sending emails. It's a standalone statement with no usage context, leaving the agent to infer when this is appropriate.

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

Install Server

Other Tools

Related Tools

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/erickva/google-workspace-mcp-server-no-calendar-deletetion'

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