Skip to main content
Glama

google_gmail_draft_email

Create and manage draft emails directly in Gmail by specifying recipients, subject, body, and optional CC/BCC. Supports plain text or HTML content for efficient email drafting.

Instructions

Create a draft email

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bccNoBCC recipients email addresses
bodyYesEmail body content (can be plain text or HTML)
ccNoCC recipients email addresses
isHtmlNoWhether the body contains HTML
subjectYesEmail subject
toYesRecipients email addresses

Implementation Reference

  • The main handler function that executes the tool: validates arguments using isDraftEmailArgs and delegates to GoogleGmail.draftEmail
    export async function handleGmailDraftEmail(
      args: any,
      googleGmailInstance: GoogleGmail
    ) {
      if (!isDraftEmailArgs(args)) {
        throw new Error("Invalid arguments for google_gmail_draft_email");
      }
      const { to, subject, body, cc, bcc, isHtml, attachments } = args;
      const result = await googleGmailInstance.draftEmail(
        to,
        subject,
        body,
        cc,
        bcc,
        isHtml,
        attachments
      );
      return {
        content: [{ type: "text", text: result }],
        isError: false,
      };
    }
  • Input schema definition for the google_gmail_draft_email tool, defining parameters like to, subject, body, attachments etc.
    export const DRAFT_EMAIL_TOOL: Tool = {
      name: "google_gmail_draft_email",
      description: "Create a draft email",
      inputSchema: {
        type: "object",
        properties: {
          to: {
            type: "array",
            items: { type: "string" },
            description: "Recipients email addresses",
          },
          subject: {
            type: "string",
            description: "Email subject",
          },
          body: {
            type: "string",
            description: "Email body content (can be plain text or HTML)",
          },
          cc: {
            type: "array",
            items: { type: "string" },
            description: "CC recipients email addresses",
          },
          bcc: {
            type: "array",
            items: { type: "string" },
            description: "BCC recipients email addresses",
          },
          isHtml: {
            type: "boolean",
            description: "Whether the body contains HTML",
          },
          attachments: {
            type: "array",
            items: {
              type: "object",
              properties: {
                filePath: {
                  type: "string",
                  description:
                    "Local file path to attach (e.g., '/Users/username/Documents/file.pdf')",
                },
                driveFileId: {
                  type: "string",
                  description:
                    "Google Drive file ID to attach (alternative to filePath)",
                },
                filename: {
                  type: "string",
                  description:
                    "Custom filename for the attachment (optional, will use original filename if not provided)",
                },
                mimeType: {
                  type: "string",
                  description:
                    "MIME type of the attachment (optional, will be auto-detected)",
                },
              },
              oneOf: [{ required: ["filePath"] }, { required: ["driveFileId"] }],
            },
            description:
              "Array of attachments to include with the email. Provide either filePath for local files or driveFileId for Google Drive files.",
          },
        },
        required: ["to", "subject", "body"],
      },
    };
  • Registration/dispatch: switch case in the MCP server request handler that routes 'call tool' requests for this tool name to the gmail handler.
    case "google_gmail_draft_email":
      return await gmailHandlers.handleGmailDraftEmail(
        args,
        googleGmailInstance
      );
Behavior2/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. 'Create a draft email' implies a write operation but doesn't specify what 'draft' means in this context - whether it's saved to a drafts folder, what permissions are needed, or what happens on failure. For a mutation tool with zero annotation coverage, this is insufficient behavioral context.

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 at just three words - 'Create a draft email'. It's front-loaded with the core action and resource, with zero wasted words. Every word earns its place by conveying essential information about the tool's purpose.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'draft' means operationally, what the tool returns, or how it differs from the send_email sibling. The 100% schema coverage helps with parameters, but the overall context for using this tool effectively is lacking.

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 schema description coverage is 100%, with all 6 parameters well-documented in the schema itself. The description adds no parameter information beyond what's already in the structured schema. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.

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

Purpose4/5

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

The description 'Create a draft email' clearly states the verb ('Create') and resource ('draft email'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'google_gmail_send_email' - both involve email creation, but one creates drafts while the other sends immediately.

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. It doesn't mention that this creates a draft (not sent) email, nor does it reference the sibling 'google_gmail_send_email' tool for when immediate sending is required. There's no context about prerequisites or when this tool 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/vakharwalad23/google-mcp'

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