Skip to main content
Glama

Postkey: Instagram DM Automation and Comment-to-DM

Change a draft post

postkey_update_post
Destructive

Postkey: Changes a post that is not scheduled or published yet. Its type (image, video, text, story) cannot change: for another type, postkey_delete_post and make it again with postkey_create_post. Only the fields you send change, and each one replaces what was there (an empty list removes all media or all accounts; to add one file use postkey_attach_library_item). A post that waits for approval goes back to a draft when you change it: schedule it again. A post with can_edit false is refused conflict with the steps to take: a scheduled one, or one already sent to the platform as a draft, needs postkey_unschedule_post first; a published one cannot be changed at all. Do not make a new post with postkey_create_post instead unless the person asks for a copy. postkey_attach_library_item is refused the same way. An unknown post_id is refused not_found.

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": {
      "post_id": "<post_id>"
    },
    "name": "postkey_update_post"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoAn internal title only the team sees. Never published. At most 200 characters.
captionNoThe caption published with the post, at most 5,000 characters. Each platform's own length limit is checked when it is scheduled.
keywordNoThe call-to-action word people comment to get a DM, for example "GUIDE". Letters, digits, _ and - only, at most 40. It is a label on the post; the DM itself is sent by a live automation with the same keyword (postkey_create_automation).
post_idYesThe post id (a UUID) from postkey_list_posts or postkey_create_post.
link_urlNoThe link the keyword automation hands out, https://...
visibilityNoYouTube only: who can see the video. "public" (default); "unlisted": anyone with the link, not in search or on the channel; "private": only the channel.
youtube_titleNoYouTube only: the video's title, at most 100 characters. Left out: YouTube uses the first 100 characters of the caption. An empty string removes it.
library_item_idsNoThe post's media in order: ids from postkey_list_library or postkey_finish_upload. Up to 10 (a story takes exactly 1). Sending it replaces the list; an empty list removes all.
linkedin_post_asNoLinkedIn only, keyed by LinkedIn social account id (in social_account_ids): who it posts as. "me", company pages by name or urn (post_as in postkey_list_social_accounts), or both: each is its own post and counts once in posts_per_week. { "<id>": ["me", "Acme Corp"] }: the person and the page. null: back to "me" only. A page it does not manage is refused with the ones it can use.
trial_graduationNoOnly with instagram_trial_reel true. "manual" (default): the person shares it to their followers in Instagram; "by_performance": Instagram shares it by itself if it does well.
platform_settingsNoEach platform's own settings, keyed by platform, merged key by key into what the post has (null removes one). For example { "tiktok": { "privacy_status": "private", "allow_duet": false }, "instagram": { "share_to_feed": false, "first_comment": "Link in bio" }, "linkedin": { "first_comment": "..." }, "reddit": { "subreddit": "videography", "title": "..." } }. postkey_guide topic platforms lists every setting and what it takes. An unknown platform or setting is refused invalid_arguments.
social_account_idsNoThe social accounts to post to: ids from postkey_list_social_accounts (active, not needs_reconnect). Up to 30. Sending it replaces the list; an empty list removes all.
instagram_trial_reelNoInstagram only, one video, not a Story. true: post it as a TRIAL reel, shown first to people who do not follow the account and not on the profile grid. false takes that off.

Output Schema

NameRequiredDescriptionDefault
okYesfalse: refused (isError; code, message, guide_topic, url); no change.
noteNoPresent when the post was taken out of Approvals by the change.
statusNoThe post's status after the save.
post_idNoThe post id.
warningsNoThings to fix before it can be sent.
publishedNoAlways false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / linkedin_post_as
      Added value: +{
      +  "description": "LinkedIn only, keyed by LinkedIn social account id (in social_account_ids): who it posts as. \"me\", company pages by name or urn (post_as in postkey_list_social_accounts), or both: each is its own post and counts once in posts_per_week. { \"<id>\": [\"me\", \"Acme Corp\"] }: the person and the page. null: back to \"me\" only. A page it does not manage is refused with the ones it can use.",
      +  "type": "object"
      +}
  2. 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."
  3. Changed13 schema fields changed
    • changedInput schema / properties / caption / description
      Previous value: -"The caption that is published with the post."New value: +"The caption published with the post, at most 5,000 characters. Each platform's own length limit is checked when it is scheduled."
    • changedInput schema / properties / instagram_trial_reel / description
      Previous value: -"true: post the video to Instagram as a TRIAL reel, shown first to people who do not follow the account and not on the profile grid. One video only, not a Story. false takes it off."New value: +"Instagram only, one video, not a Story. true: post it as a TRIAL reel, shown first to people who do not follow the account and not on the profile grid. false takes that off."
    • changedInput schema / properties / keyword / description
      Previous value: -"The call-to-action word people comment to get a DM, for example \"GUIDE\". Letters, digits, _ and - only."New value: +"The call-to-action word people comment to get a DM, for example \"GUIDE\". Letters, digits, _ and - only, at most 40. It is a label on the post; the DM itself is sent by a live automation with the same keyword (postkey_create_automation)."
    • changedInput schema / properties / library_item_ids / description
      Previous value: -"The media of the post, in order, by id from postkey_list_library."New value: +"The post's media in order: ids from postkey_list_library or postkey_finish_upload. Up to 10 (a story takes exactly 1). Sending it replaces the list; an empty list removes all."
    • changedInput schema / properties / link_url / description
      Previous value: -"The link the keyword automation hands out (https://...)."New value: +"The link the keyword automation hands out, https://..."
    • changedInput schema / properties / platform_settings / description
      Previous value: -"Each platform's own settings, keyed by platform, set key by key over what the post has (null takes one off). For example { \"tiktok\": { \"privacy_status\": \"private\", \"allow_duet\": false }, \"instagram\": { \"share_to_feed\": false, \"first_comment\": \"Link in bio\" }, \"linkedin\": { \"first_comment\": \"...\" }, \"reddit\": { \"subreddit\": \"videography\", \"title\": \"...\" } }. postkey_guide topic platforms lists every setting and what it takes. An unknown platform or setting is refused."New value: +"Each platform's own settings, keyed by platform, merged key by key into what the post has (null removes one). For example { \"tiktok\": { \"privacy_status\": \"private\", \"allow_duet\": false }, \"instagram\": { \"share_to_feed\": false, \"first_comment\": \"Link in bio\" }, \"linkedin\": { \"first_comment\": \"...\" }, \"reddit\": { \"subreddit\": \"videography\", \"title\": \"...\" } }. postkey_guide topic platforms lists every setting and what it takes. An unknown platform or setting is refused invalid_arguments."
    • changedInput schema / properties / post_id / description
      Previous value: -"The post id."New value: +"The post id (a UUID) from postkey_list_posts or postkey_create_post."
    • changedInput schema / properties / social_account_ids / description
      Previous value: -"The social accounts to post to, by id from postkey_list_social_accounts."New value: +"The social accounts to post to: ids from postkey_list_social_accounts (active, not needs_reconnect). Up to 30. Sending it replaces the list; an empty list removes all."
    • changedInput schema / properties / title / description
      Previous value: -"An internal title only your team sees. Never published."New value: +"An internal title only the team sees. Never published. At most 200 characters."
    • changedInput schema / properties / trial_graduation / description
      Previous value: -"With instagram_trial_reel true: \"manual\" (default) the person shares it to their followers in Instagram; \"by_performance\" Instagram shares it by itself if it does well."New value: +"Only with instagram_trial_reel true. \"manual\" (default): the person shares it to their followers in Instagram; \"by_performance\": Instagram shares it by itself if it does well."
    • changedInput schema / properties / visibility / description
      Previous value: -"Who can see the video on YouTube (only YouTube uses this). \"unlisted\": anyone with the link, not in search or on the channel. Default public."New value: +"YouTube only: who can see the video. \"public\" (default); \"unlisted\": anyone with the link, not in search or on the channel; \"private\": only the channel."
    • changedInput schema / properties / youtube_title / description
      Previous value: -"The YouTube video's title, at most 100 characters. Without one, YouTube uses the first 100 characters of the caption. Send an empty string to remove it."New value: +"YouTube only: the video's title, at most 100 characters. Left out: YouTube uses the first 100 characters of the caption. An empty string removes it."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "note": {
      +      "description": "Present when the post was taken out of Approvals by the change.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "false: refused (isError true; code, message, guide_topic, url), nothing changed.",
      +      "type": "boolean"
      +    },
      +    "post_id": {
      +      "description": "The post id.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "published": {
      +      "description": "Always false.",
      +      "type": "boolean"
      +    },
      +    "status": {
      +      "description": "The post's status after the save.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "warnings": {
      +      "description": "Things to fix before it can be sent.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that only sent fields change, list fields replace existing values, empty lists remove all media or accounts, approval state resets to draft, immutable post type, can_edit false conflicts, and unknown post_id returns not_found. These are substantive behavioral details for a destructive update operation.

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?

The description is front-loaded with the core operation and uses no filler. It is dense and somewhat run-on, but every clause carries operational meaning and the key constraints are stated early.

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?

Given the 13 parameters, nested platform_settings, output schema, and destructive annotation, the description covers the important behavioral edges: type immutability, replacement semantics, approval reset, conflict handling, scheduling prerequisites, and unknown-id errors. Nothing critical for correct invocation appears to be missing.

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 already 100%, so the schema documents most parameters. The description still adds important meaning beyond the schema by clarifying that only sent fields are updated, list parameters replace prior values, empty lists remove media or accounts, and post_id failures return not_found.

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?

The description states a specific verb and resource: it changes an existing post that is not yet scheduled or published. It also clearly distinguishes this tool from postkey_create_post, postkey_delete_post, postkey_attach_library_item, and postkey_unschedule_post.

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?

It gives explicit when-to-use and when-not-to-use guidance: changing type requires delete plus create, approval posts return to draft, scheduled or platform-draft posts need unscheduling first, and published posts cannot be changed. It also warns not to create a new post unless the person asks for a copy.

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