Skip to main content
Glama

Send a message

send_message

Send a text direct message on Instagram or Facebook, or an approved WhatsApp template from the profile's own number. message is exactly the JSON body of POST /api/v1/messages; recipient is the platform-scoped sender id from list_messages (an E.164 phone number on WhatsApp). Confirm the text with the user first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "message": "<message>"
    },
    "name": "send_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / message / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "accountId": {
      -        "format": "uuid",
      -        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -        "type": "string"
      -      },
      -      "platform": {
      -        "const": "instagram",
      -        "type": "string"
      -      },
      -      "profileId": {
      -        "format": "uuid",
      -        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -        "type": "string"
      -      },
      -      "recipient": {
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "text": {
      -        "maxLength": 1000,
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "platform",
      -      "accountId",
      -      "recipient",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "accountId": {
      -        "format": "uuid",
      -        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -        "type": "string"
      -      },
      -      "platform": {
      -        "const": "facebook",
      -        "type": "string"
      -      },
      -      "profileId": {
      -        "format": "uuid",
      -        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -        "type": "string"
      -      },
      -      "recipient": {
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "text": {
      -        "maxLength": 1000,
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "platform",
      -      "accountId",
      -      "recipient",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "accountId": {
      -        "format": "uuid",
      -        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -        "type": "string"
      -      },
      -      "platform": {
      -        "const": "whatsapp",
      -        "type": "string"
      -      },
      -      "profileId": {
      -        "format": "uuid",
      -        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -        "type": "string"
      -      },
      -      "recipient": {
      -        "pattern": "^\\+?[1-9]\\d{7,14}$",
      -        "type": "string"
      -      },
      -      "template": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "bodyParameters": {
      -            "default": [],
      -            "items": {
      -              "maxLength": 1024,
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "maxItems": 20,
      -            "type": "array"
      -          },
      -          "language": {
      -            "pattern": "^[a-z]{2,3}(_[A-Z]{2})?$",
      -            "type": "string"
      -          },
      -          "name": {
      -            "maxLength": 512,
      -            "minLength": 1,
      -            "pattern": "^[a-z0-9_]+$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "name",
      -          "language"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "platform",
      -      "accountId",
      -      "recipient",
      -      "template"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "accountId": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "platform": {
      +        "const": "instagram",
      +        "type": "string"
      +      },
      +      "profileId": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "recipient": {
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "text": {
      +        "maxLength": 1000,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "platform",
      +      "accountId",
      +      "recipient",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "accountId": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "platform": {
      +        "const": "facebook",
      +        "type": "string"
      +      },
      +      "profileId": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "recipient": {
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "text": {
      +        "maxLength": 1000,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "platform",
      +      "accountId",
      +      "recipient",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "accountId": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "platform": {
      +        "const": "whatsapp",
      +        "type": "string"
      +      },
      +      "profileId": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "recipient": {
      +        "pattern": "^\\+?[1-9]\\d{7,14}$",
      +        "type": "string"
      +      },
      +      "template": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "bodyParameters": {
      +            "default": [],
      +            "items": {
      +              "maxLength": 1024,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "maxItems": 20,
      +            "type": "array"
      +          },
      +          "language": {
      +            "pattern": "^[a-z]{2,3}(_[A-Z]{2})?$",
      +            "type": "string"
      +          },
      +          "name": {
      +            "maxLength": 512,
      +            "minLength": 1,
      +            "pattern": "^[a-z0-9_]+$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "language"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "platform",
      +      "accountId",
      +      "recipient",
      +      "template"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "accountId": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "platform": {
      +        "const": "whatsapp",
      +        "type": "string"
      +      },
      +      "profileId": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "recipient": {
      +        "pattern": "^\\+?[1-9]\\d{7,14}$",
      +        "type": "string"
      +      },
      +      "text": {
      +        "description": "Free text, sent only inside the 24-hour window after the customer's last message; 409 window_closed otherwise. Send a template outside it.",
      +        "maxLength": 4096,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "platform",
      +      "accountId",
      +      "recipient",
      +      "text"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare this as a non-read-only, open-world, non-destructive write, so the safety profile is covered. The description adds genuinely useful behavior: WhatsApp requires an approved template sent from the profile's own number, and the payload must be the raw request body with no transformation. It says nothing about failure modes (rate limits, window-closed errors) or what a successful send returns, so it only partially extends past the annotations.

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?

Three tight sentences: platform capabilities first, payload and recipient semantics second, user-confirmation protocol last. Every clause carries information an agent needs; nothing is padding.

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

Completeness3/5

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

Given a four-variant discriminated union with no documented fields and no output schema, the description covers the essentials of what to send but not enough of the variant details. An agent constructing the Instagram/Facebook branch or the WhatsApp template branch still has to infer accountId, profileId, and template.bodyParameters from the schema alone.

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 0% and the single `message` parameter is a four-way oneOf, so the description must compensate. It does explain the recipient's meaning (platform-scoped sender id from list_messages, E.164 on WhatsApp) and identifies the payload as the verbatim API body, but it leaves accountId, profileId, text length ceilings, and the template object's name/language/bodyParameters unexplained.

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 names a specific verb and resource (send a text direct message) and enumerates the platforms accepted (Instagram, Facebook, WhatsApp template), so the action is unmistakable. It does not, however, distinguish itself from the sibling tool send_instagram_message, which appears to overlap on the Instagram path, leaving the agent to guess which one applies there.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It supplies concrete pre-call guidance: confirm the text with the user first, and derive the recipient from list_messages rather than constructing it. What is missing is an explicit when-not rule or a pointer telling the agent when to prefer send_instagram_message instead.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources