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: {}, }, },

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