Skip to main content
Glama

Send Direct Message

send_inbox_message
Destructive

Send a direct message in a conversation, from the account, where capabilities.canReply is true. Facebook and Instagram only allow a reply within 24 hours of the person's last message (replyWindowEndsAt); after that the call answers 400 inbox_messaging_window_closed, so stop and tell the user. This sends text to a real person from the account: show the user the exact text and the item it answers, and get their yes before calling. Each call sends a new message, so after an error or timeout read get_inbox_conversation before trying again. A 403 with code inbox_reconnect_required means the account lacks the platform permission for this channel or action (some channels still wait on platform review) or its token expired: tell the user to reconnect the account in AdaptlyPost and do not retry. 404 inbox_item_not_found means the id is unknown in this workspace. 429 inbox_rate_limited means the platform rate limited the call: wait a while before trying again. 503 inbox_platform_error means the platform failed: try again later. Needs the inbox.reply permission, which Admin and Editor hold (403 permission_denied otherwise), and an active plan.

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": {
      "id": "<id>",
      "text": "<text>"
    },
    "name": "send_inbox_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe conversation id, from list_inbox_conversations
textYesThe text to send. Up to the conversation's maxMessageLength. Empty or too long text answers 400 inbox_reply_invalid, whose message names the limit
workspaceIdNoWorkspace to act in: an id from list_workspaces. Omit to act in the workspace list_workspaces marks current. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another

Output Schema

NameRequiredDescriptionDefault
resultYesAn object with conversation and message ({ id, isOwn, text, hasAttachments, createdAt }). An InboxConversation: id, accountId, platform, accountName, participant { id, name, username, avatarUrl }, lastMessageText, lastMessageAt, lastMessageIsOwn, status, repliedAt, replyWindowEndsAt (the end of the 24-hour Facebook and Instagram reply window, else null), maxMessageLength and capabilities { canReply }.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedOutput schema / properties / result / additionalProperties
      Added value: +true
    • addedOutput schema / properties / result / properties
      Added value: +{
      +  "conversation": {
      +    "anyOf": [
      +      {
      +        "additionalProperties": true,
      +        "properties": {
      +          "accountId": {
      +            "description": "The account `id` from GET /social-accounts",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "accountName": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "capabilities": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "properties": {
      +                  "canReply": {
      +                    "type": [
      +                      "boolean",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "id": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "lastMessageAt": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "lastMessageIsOwn": {
      +            "type": [
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          "lastMessageText": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "maxMessageLength": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "participant": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "properties": {
      +                  "avatarUrl": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "id": {
      +                    "description": "The platform user id",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "name": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "username": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "platform": {
      +            "description": "One of: FACEBOOK, INSTAGRAM, THREADS, TIKTOK, TWITTER, BLUESKY, LINKEDIN, PINTEREST, YOUTUBE, MASTODON, TELEGRAM, GOOGLE_BUSINESS, TUMBLR, WORDPRESS",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "repliedAt": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "replyWindowEndsAt": {
      +            "description": "When the FACEBOOK and INSTAGRAM 24-hour reply window closes; null on other platforms",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "status": {
      +            "description": "One of: UNREAD, READ, DONE",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "message": {
      +    "anyOf": [
      +      {
      +        "additionalProperties": true,
      +        "properties": {
      +          "createdAt": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "hasAttachments": {
      +            "type": [
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          "id": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "isOwn": {
      +            "type": [
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          "text": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  }
      +}
    • addedOutput schema / properties / result / type
      Added value: +"object"
    • addedOutput schema / required
      Added value: +[
      +  "result"
      +]
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations: it discloses the platform 24-hour reply window, the confirmation-before-send requirement for a real person, non-idempotent behavior ("Each call sends a new message"), and a full error taxonomy (400/403/404/429/503) with the required action for each. The destructive, non-idempotent profile in annotations is confirmed and explained rather than contradicted.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the confirmation safeguard are front-loaded, and every sentence carries operational value. The error-code run-on is dense and would read better as a list, but nothing is padded.

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

Completeness5/5

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

For a destructive, non-idempotent send tool, the description covers prerequisites, permissions, confirmation, retry/stop rules, and error recovery, and return values are handled by the existing output schema. An agent has everything needed to call it safely.

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 coverage is 100%, so id, text, and workspaceId are already documented, including maxMessageLength and the inbox_reply_invalid limit. The description adds only the notional 'item it answers' framing, not new parameter semantics, so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource ("Send a direct message in a conversation") plus the precondition (capabilities.canReply is true). It is clearly distinguishable from siblings like reply_to_inbox_comment or reply_to_inbox_review, which target different resources.

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

Usage Guidelines5/5

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

Explicit when-to-use conditions (canReply true, within the 24-hour window), when to stop and escalate to the user, and which sibling to consult after an error ("read get_inbox_conversation before trying again"). It also names an alternative path (reconnect the account) instead of retrying.

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