Skip to main content
Glama

Postkey: Instagram DM Automation and Comment-to-DM

Change a DM automation

postkey_update_automation
Destructive

Postkey: Changes a DM automation's draft: its name (any automation); for one made with the Quick form (made_with "Quick form" in postkey_get_automation) its keywords, link, message texts and followers_only; for one built in the Flow Builder (every template that is not a Quick form) the words of its messages, buttons and cards, with messages. messages never adds, removes or reorders steps, buttons or cards, and never changes links or images: a person does that in Postkey. Send at least one field. Changes are saved to its draft: a live automation keeps answering with its published version until postkey_publish_automation is called again. An X reply automation takes replies, post_id, link_url and keywords; no message texts or followers_only.

Input Schema

NameRequiredDescriptionDefault
dmsNoDM wordings as on create (same rules); [] = public replies again.
nameNoA new name, 1 to 120 characters. Works for every automation.
post_idNotemplate x_comment_reply only: one post, as a post_id from postkey_list_posts or the link of a post on X. Left out: any post with this keyword.
repliesNotemplate x_comment_reply only: the fixed replies, up to 10, in the order they rotate. Each carries the link: put {{link}} where it goes, or it is added at the end. No other variable works, and nothing is written per comment. Left out on create: the account's saved voice, or Postkey's suggestions.
keywordsNoQuick form only: the words that start it, up to 20. Replaces the list and turns off any-word matching.
link_urlNoQuick form only: the link the DM hands out, https://.... Refused no_link when its link message has no link button.
messagesNoFlow Builder automations only: new words by step number (postkey_get_automation). text replaces the message; buttons renames all its buttons, in order; cards rewrites a gallery's cards, one entry per card, in order. Not with Quick form fields.
link_messageNoQuick form only: the DM that carries the link. At most 640 characters.
automation_idYesThe automation id (a UUID) from postkey_list_automations or postkey_create_automation.
followers_onlyNoQuick automations: true means only followers get the link (people who have not messaged the account before first get a short "follow, then tap" message); false turns the follow check off, and leaves Tap to unlock as it is. Instagram only: true is refused for a Facebook Page.
opening_messageNoQuick form only: the first DM, the one with the button. At most 640 characters.

Output Schema

NameRequiredDescriptionDefault
okYesfalse: refused (isError; code, message, guide_topic, url); no change.
noteNoPresent when a live automation keeps its published version.
savedNotrue: the draft was saved.
draft_nowNoAfter a Quick form change: keywords (as saved, trimmed, one of each) and link_url.
updated_atNoWhen it was saved.
messages_nowNoAfter a messages change: the changed steps as saved (step, kind, says, buttons, cards).
automation_idNoThe automation id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / ok / description
      Previous value: -"false: refused (isError true; code, message, guide_topic, url), nothing changed."New value: +"false: refused (isError; code, message, guide_topic, url); no change."
  2. Changed3 schema fields changed
    • changedInput schema / properties / messages / description
      Previous value: -"Flow Builder automations only: new words by step number (postkey_get_automation). text replaces the message; buttons renames all its buttons, in order. Not with Quick form fields."New value: +"Flow Builder automations only: new words by step number (postkey_get_automation). text replaces the message; buttons renames all its buttons, in order; cards rewrites a gallery's cards, one entry per card, in order. Not with Quick form fields."
    • addedInput schema / properties / messages / items / properties / cards
      Added value: +{
      +  "description": "Exactly as many as the step has.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "buttons": {
      +        "description": "The card's button titles, in order.",
      +        "items": {
      +          "maxLength": 20,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 3,
      +        "type": "array"
      +      },
      +      "subtitle": {
      +        "description": "The line under it, at most 80.",
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "At most 80 characters.",
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
    • changedOutput schema / properties / messages_now / description
      Previous value: -"After a messages change: the changed steps as saved (step, kind, says, buttons)."New value: +"After a messages change: the changed steps as saved (step, kind, says, buttons, cards)."
  3. Changed2 schema fields changed
    • addedInput schema / properties / messages
      Added value: +{
      +  "description": "Flow Builder automations only: new words by step number (postkey_get_automation). text replaces the message; buttons renames all its buttons, in order. Not with Quick form fields.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "buttons": {
      +        "description": "Titles, in order.",
      +        "items": {
      +          "maxLength": 20,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 13,
      +        "type": "array"
      +      },
      +      "step": {
      +        "description": "From postkey_get_automation.",
      +        "maximum": 40,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "At most 640 characters with buttons, 1000 without.",
      +        "maxLength": 1000,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "step"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 40,
      +  "type": "array"
      +}
    • addedOutput schema / properties / messages_now
      Added value: +{
      +  "description": "After a messages change: the changed steps as saved (step, kind, says, buttons).",
      +  "items": {
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / dms
      Added value: +{
      +  "description": "DM wordings as on create (same rules); [] = public replies again.",
      +  "items": {
      +    "maxLength": 1000,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
  5. Changed2 schema fields changed
    • addedInput schema / properties / post_id
      Added value: +{
      +  "description": "template x_comment_reply only: one post, as a post_id from postkey_list_posts or the link of a post on X. Left out: any post with this keyword.",
      +  "maxLength": 300,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / replies
      Added value: +{
      +  "description": "template x_comment_reply only: the fixed replies, up to 10, in the order they rotate. Each carries the link: put {{link}} where it goes, or it is added at the end. No other variable works, and nothing is written per comment. Left out on create: the account's saved voice, or Postkey's suggestions.",
      +  "items": {
      +    "maxLength": 1000,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
  6. Changed7 schema fields changed
    • changedInput schema / properties / automation_id / description
      Previous value: -"The automation id."New value: +"The automation id (a UUID) from postkey_list_automations or postkey_create_automation."
    • changedInput schema / properties / keywords / description
      Previous value: -"Quick automations: the words that start it (replaces the list)."New value: +"Quick form only: the words that start it, up to 20. Replaces the list and turns off any-word matching."
    • changedInput schema / properties / link_message / description
      Previous value: -"Quick automations: the DM that carries the link."New value: +"Quick form only: the DM that carries the link. At most 640 characters."
    • changedInput schema / properties / link_url / description
      Previous value: -"Quick automations: the link the DM hands out (https://...)."New value: +"Quick form only: the link the DM hands out, https://.... Refused no_link when its link message has no link button."
    • changedInput schema / properties / name / description
      Previous value: -"A new name."New value: +"A new name, 1 to 120 characters. Works for every automation."
    • changedInput schema / properties / opening_message / description
      Previous value: -"Quick automations: the first DM, the one with the button."New value: +"Quick form only: the first DM, the one with the button. At most 640 characters."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "automation_id": {
      +      "description": "The automation id.",
      +      "type": "string"
      +    },
      +    "draft_now": {
      +      "description": "After a Quick form change: keywords (as saved, trimmed, one of each) and link_url.",
      +      "type": "object"
      +    },
      +    "note": {
      +      "description": "Present when a live automation keeps its published version.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "false: refused (isError true; code, message, guide_topic, url), nothing changed.",
      +      "type": "boolean"
      +    },
      +    "saved": {
      +      "description": "true: the draft was saved.",
      +      "type": "boolean"
      +    },
      +    "updated_at": {
      +      "description": "When it was saved.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  7. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: edits land in the draft, a live automation keeps serving its published version until publish, and `messages` never adds, removes or reorders steps, buttons or cards or changes links/images. That last clause is exactly the kind of scoping an agent needs given destructiveHint=true.

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?

Front-loaded with the verb and resource, then type-specific rules, then the draft/publish caveat. It is dense and long-sentenced, but nearly every clause carries a constraint an agent would otherwise get wrong; only the nested parentheticals cost readability.

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 an 11-parameter mutation tool with an output schema and annotations already covering safety, the description supplies the remaining essentials: which fields apply to which automation type, the draft-vs-live lifecycle, and the ordering/no-restructuring guarantee.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description goes further by mapping field groups to automation types (keywords/link/message texts/followers_only for Quick form, messages for Flow Builder, replies/post_id/link_url/keywords for X reply). This cross-field applicability isn't reconstructable from the per-parameter descriptions alone.

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 ('Changes a DM automation's draft') and immediately separates draft edits from the published version by naming postkey_publish_automation. An agent can tell this apart from postkey_create_automation and postkey_publish_automation without opening any schema.

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?

Gives concrete per-type applicability rules (Quick form vs Flow Builder vs X reply automation), requires at least one field, and points to postkey_get_automation as the prerequisite for identifying the type and step numbers. It doesn't explicitly contrast with postkey_create_automation for new automations, but the when-to-use context is otherwise clear.

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