Skip to main content
Glama

Create a comment-to-DM automation (draft)

create_comment_to_dm

The most common automation: when someone comments on a post, DM them. Creates a draft; nothing goes out until enable_automation. How Meta works: a DM cannot be started by the account. The only automatic door is a private reply to a comment, one per comment, within 7 days of the comment, and once the person answers the 24-hour window opens for the rest. Instagram can check whether the person follows the account (requireFollow); Facebook cannot, so requireFollow is rejected there. Threads has no DMs at all; use create_automation with comment_public_reply. Files go through media_presign first and are passed as deliver.mediaId. post can be our post id, the post's own id on the platform, a link to the post, "any" for every post, or "next" for the next post you publish (or pass automation on publish to do both in one call). Only one enabled automation per account can wait for "next" (409 next_post_taken). Order when everything is on: opening DM (message + button) -> askEmail -> requireFollow -> deliver (text, up to three link buttons, file; clicks are tracked) -> followUp if no link was clicked. openingDm:false sends deliver as the private reply itself; then requireFollow, askEmail, followUp and files are rejected because the window never opens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
postYesOur post id, the platform post id, a link to the post, "any", or "next".
matchNo
deliverYesWhat to send after the tap: text, up to three link buttons, and/or a media id.
enabledNoDefault false. Prefer leaving it off and calling enable_automation after the person confirms.
messageNoThe opening DM (private reply). One message. Required unless openingDm is false.
askEmailNoAsk for their email after the tap and store it in contact field `email`. Three tries, then continue without.
followUpNoSent followUpAfterMinutes later if none of deliver.links was clicked. Needs openingDm and at least one link.
keywordsNoTrigger words in the comment. Empty means every comment.
accountIdYesConnected Instagram or Facebook account id from list_accounts.
openingDmNoDefault true. false: deliver goes out as the private reply itself (no button, no window afterwards).
emailRetryNo
buttonTitleNoButton under the opening DM, at most 20 characters.
publicReplyNoOptional public replies under the comment; one is picked at random.
workspaceIdNoWhich workspace this is for. Only needed when the account has more than one — the error tells you the ids when it matters. Leave it out if it is already decided; do not ask the person again.
emailMessageNo
recheckTitleNo
requireFollowNoInstagram only. Deliver only to followers; others are asked to follow and check again.
notFollowingMessageNo
followUpAfterMinutesNo1 to 1380 (23 hours). Default 60.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • addedInput schema / properties / askEmail
      Added value: +{
      +  "description": "Ask for their email after the tap and store it in contact field `email`. Three tries, then continue without.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / buttonTitle / description
      Previous value: -"Button under the private reply, at most 20 characters."New value: +"Button under the opening DM, at most 20 characters."
    • changedInput schema / properties / deliver / description
      Previous value: -"What to send after the tap: text, link, and/or a media id."New value: +"What to send after the tap: text, up to three link buttons, and/or a media id."
    • addedInput schema / properties / deliver / properties / link / description
      Added value: +"Legacy: one url appended to the text. Prefer links."
    • addedInput schema / properties / deliver / properties / links
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "title": {
      +        "description": "At most 20 characters.",
      +        "type": "string"
      +      },
      +      "url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "title",
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 3,
      +  "type": "array"
      +}
    • addedInput schema / properties / emailMessage
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / emailRetry
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / followUp
      Added value: +{
      +  "description": "Sent followUpAfterMinutes later if none of deliver.links was clicked. Needs openingDm and at least one link.",
      +  "type": "string"
      +}
    • addedInput schema / properties / followUpAfterMinutes
      Added value: +{
      +  "description": "1 to 1380 (23 hours). Default 60.",
      +  "type": "number"
      +}
    • changedInput schema / properties / message / description
      Previous value: -"The private reply. One message."New value: +"The opening DM (private reply). One message. Required unless openingDm is false."
    • addedInput schema / properties / openingDm
      Added value: +{
      +  "description": "Default true. false: deliver goes out as the private reply itself (no button, no window afterwards).",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "accountId",
      -  "post",
      -  "message",
      -  "deliver"
      -]New value: +[
      +  "accountId",
      +  "post",
      +  "deliver"
      +]
  2. Added
  3. Removed
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only carry readOnlyHint=false and destructiveHint=false, so the description bears the full transparency burden and delivers richly: Meta's private-reply/7-day/24-hour-window mechanics, the Instagram-vs-Facebook requireFollow asymmetry, the media_presign→mediaId pipeline, the post value forms, and the complete execution order (opening DM → askEmail → requireFollow → deliver → followUp). No contradiction with 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?

Long but every sentence earns its place given the tool's complexity. The most decision-relevant fact (draft, nothing goes out) is front-loaded; platform differences, ordering, and edge cases follow in a logical flow. No filler or repetition of schema content.

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

Completeness4/5

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

For a 20-parameter tool with nested objects, platform differences, and no output schema, the description covers the essential behavioral mechanics almost exhaustively. The one gap: it never states what the call returns (e.g., the draft automation id needed by enable_automation), which matters more because no output schema exists to fill that void.

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?

Schema coverage is 70%, so the baseline is 3; the description pushes higher by adding meaning the schema lacks: what 'post' values mean in practice ('next' for the next post you publish), how files reach deliver.mediaId via media_presign, and the consequences of openingDm:false (window never opens, so requireFollow/askEmail/followUp/files are rejected). A few obscure params (emailRetry, recheckTitle, notFollowingMessage) remain undocumented in both, capping the score.

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?

Opens with a crisp definition: 'when someone comments on a post, DM them.' The verb (create), resource (comment-to-DM automation), and the draft status ('nothing goes out until enable_automation') are all explicit, and the description clearly differentiates from siblings like send_dm, reply, and create_automation.

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?

Gives explicit when-to-use and when-not-to-use guidance: 'Threads has no DMs at all; use create_automation with comment_public_reply' names the exact alternative. It also routes to enable_automation as the follow-up step and warns about the 409 next_post_taken conflict. The schema's 'enabled' field reinforces this with 'Prefer leaving it off and calling enable_automation after the person confirms.'

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