Skip to main content
Glama
marissamarym

iMessage MCP Server

by marissamarym

send_imessage

Send iMessages directly from Claude Desktop to phone numbers or email addresses using the macOS Messages app.

Instructions

Send an iMessage using Messages app

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recipientYesPhone number or email of the recipient
messageYesMessage content to send

Implementation Reference

  • Handler for the send_imessage tool. Extracts recipient and message from arguments, validates them, escapes the message for AppleScript, executes AppleScript to send the iMessage via Messages app, and returns success or error response.
    case "send_imessage": {
      const recipient = String(request.params.arguments?.recipient);
      const message = String(request.params.arguments?.message);
    
      if (!recipient || !message) {
        throw new Error("Recipient and message are required");
      }
    
      const escapedMessage = message.replace(/"/g, '\\"');
      const script = `
        tell application "Messages"
          send "${escapedMessage}" to buddy "${recipient}" of (service 1 whose service type = iMessage)
        end tell
      `;
    
      try {
        await runAppleScript(script);
        return {
          content: [
            {
              type: "text",
              text: `Message sent successfully to ${recipient}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Failed to send message: ${getErrorMessage(error)}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema definition for send_imessage tool, specifying recipient and message as required string properties.
    inputSchema: {
      type: "object",
      properties: {
        recipient: {
          type: "string",
          description: "Phone number or email of the recipient",
        },
        message: {
          type: "string",
          description: "Message content to send",
        },
      },
      required: ["recipient", "message"],
    },
  • src/index.ts:123-140 (registration)
    Registration of the send_imessage tool in the ListTools response, including name, description, and input schema.
    {
      name: "send_imessage",
      description: "Send an iMessage using Messages app",
      inputSchema: {
        type: "object",
        properties: {
          recipient: {
            type: "string",
            description: "Phone number or email of the recipient",
          },
          message: {
            type: "string",
            description: "Message content to send",
          },
        },
        required: ["recipient", "message"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Send an iMessage' implies a write/mutation operation, the description doesn't disclose important behavioral aspects: whether this requires specific permissions, if it's synchronous/asynchronous, error conditions, rate limits, or what happens if the recipient isn't in the user's contacts. It mentions 'using Messages app' which provides some implementation context, but lacks operational details.

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 - a single sentence with zero wasted words. It's front-loaded with the core functionality and uses straightforward language. Every word earns its place, making it easy for an agent to parse quickly while understanding the essential 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 insufficiently complete. It doesn't explain what happens after sending (success/failure indicators, return values), doesn't mention authentication requirements, and provides no error handling context. While the purpose is clear, the operational context needed for reliable tool invocation is missing.

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 has 100% description coverage, with both parameters ('recipient' and 'message') clearly documented in the schema. The tool description adds no additional parameter information beyond what's in the schema. According to 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 clearly states the action ('Send') and resource ('an iMessage using Messages app'), making the purpose immediately understandable. It doesn't differentiate from the sibling tool 'search_contacts', but that's reasonable since they perform completely different functions. The description is specific enough to understand what the tool does without being tautological.

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 about when to use this tool versus alternatives. There's no mention of prerequisites (like having the Messages app installed or configured), limitations (message length, supported recipients), or comparison with other messaging methods. The agent must infer usage context solely from the tool name and description.

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/marissamarym/imessage-mcp-server'

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