Skip to main content
Glama

mail_send_message

Send an email message from the macOS Mail application. This tool transmits the most recently created message in your Mail app to its intended recipients.

Instructions

Send the most recently created message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the 'mail_send_message' tool. It runs an AppleScript command via osascript to send the most recent outgoing message (first item in outgoing messages) in the Mail application.
    case 'mail_send_message':
      try {
        const command = `osascript -e 'tell application "Mail"
          set frontMessage to item 1 of (get outgoing messages)
          send frontMessage
          return "Message sent successfully"
        end tell'`;
        
        const { stdout, stderr } = await execAsync(command);
        
        if (stderr.trim()) {
          return {
            content: [
              {
                type: 'text',
                text: `Error sending message: ${stderr.trim()}`,
              },
            ],
          };
        }
        
        return {
          content: [
            {
              type: 'text',
              text: stdout.trim(),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: `Error executing mail send command: ${error.message}`,
            },
          ],
        };
      }
  • src/index.ts:323-329 (registration)
    Tool registration in the ListTools response, defining name, description, and empty input schema for 'mail_send_message'.
      name: 'mail_send_message',
      description: 'Send the most recently created message',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Input schema definition for the 'mail_send_message' tool (no parameters required).
      name: 'mail_send_message',
      description: 'Send the most recently created message',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('send') but doesn't clarify what 'send' entails (e.g., whether it's irreversible, requires network connectivity, or has side effects like moving the message to a sent folder). It also doesn't mention error conditions or what happens if no recent message exists. This leaves significant gaps in understanding the tool's behavior.

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, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse. Every word earns its place by conveying essential information without redundancy or fluff.

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 tool's complexity (it performs a send action with no parameters but relies on implicit context), lack of annotations, and no output schema, the description is incomplete. It doesn't explain how the 'most recently created message' is determined, what the send operation does, or what the expected outcome is (e.g., success/failure indicators). For a context-dependent tool with no structured support, more detail is needed to ensure reliable use.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description doesn't add parameter details, which is appropriate since there are none. However, it implicitly suggests the tool operates on context (the 'most recently created message'), but this isn't a formal parameter. Given the lack of parameters, a baseline of 4 is justified as the description doesn't need to compensate for missing schema info.

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 the most recently created message' states a specific action (send) on a specific resource (most recently created message), which is clear. However, it doesn't distinguish this tool from potential alternatives like 'mail_create_message' or explain what qualifies as 'most recently created message' (e.g., from which context or application). This makes the purpose somewhat vague in practice.

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 prerequisites (e.g., that a message must have been created first, possibly using 'mail_create_message'), exclusions, or contextual cues. Without such information, an agent might misuse it or overlook necessary preparatory steps.

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

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/samicokar/mcp-mac'

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