MCPOutils MCP/Publications/update_post

update_post

Writeposts:write

Update an editable post (draft/scheduled/error/active). Only the content and schedule fields you supply are changed — omitted fields keep their stored values (name, postType, platforms, captions, media, scheduledFor, etc.). Pass draft=true to save without publishing (skips required-field checks); omit draft or pass draft=false to reconcile and publish. Reconciles platform submissions. A requested platform with no active connection never fails this call either (same as create_post) and the response is `{ status: "no_connection", missingPlatforms, scope, post: { id, status } }` instead of the usual `{ id, status }`. PLATFORM RULES (enforced — violations rejected): Post types: `announcement` works on every platform; `event` and `offer` are Google-only (any social platform ⇒ must be announcement). Caption char limits: google 1500, facebook 30000, instagram 2200, x 280 WEIGHTED characters rather than typed ones — Japanese/Chinese/Korean characters and emoji cost 2 each and any link costs a flat 23, so a non-Latin caption fits roughly 140 typed characters; setting linkUrl appends that link to the caption for a further 25 weighted (X thread mode is exempt from the limit entirely), linkedin 2000, pinterest 500, mastodon 500, bluesky 300, youtube 5000. Media (per platform, using each item's `platform`): facebook ≤10 images OR ≤1 video, no mix (carousel = 2–10 images only, per-card headline ≤80 / description ≤200); instagram requires ≥1 media, ≤10 images OR ≤1 video, no image/video mix; x ≤4 images OR ≤1 video, no mix; linkedin ≤5 images OR ≤1 video, no mix; pinterest image-only, exactly 1, required; mastodon ≤4 images OR ≤1 video, no mix; youtube video-only, exactly 1, required. Google event ⇒ eventTitle (≤58 chars) + eventStartAt + eventEndAt (end after start) required. Google offer ⇒ ctaType + ctaUrl required. scheduledFor must be in the future. Drafts (draft=true) skip required-field checks but still enforce all structural checks above.

Paramètres
postIdstringobligatoire
Post id (from list_posts or get_post). Accepts the database ID or public post- ID. IDs must belong to the authenticated agency and permitted client.
namestringfacultatif
Internal post name/label. Required, non-empty, ≤255 characters.
postType"announcement" | "event" | "offer"facultatif
Post type. `announcement` is supported by all platforms. `event` and `offer` are GOOGLE-ONLY — if any social platform (facebook, instagram, x, linkedin, pinterest, mastodon, bluesky, youtube) is selected, postType must be `announcement`.
platforms("google" | "facebook" | "instagram" | "x" | "linkedin" | "pinterest" | "mastodon" | "bluesky" | "threads" | "tiktok" | "youtube")[]facultatif
Target platforms. Valid values: google, facebook, instagram, x, linkedin, pinterest, mastodon, bluesky, youtube. At least one is required; unknown values are rejected. e.g. ["google","facebook","instagram"].
connectionIdsstring[]facultatif
Optional exact targets: the connection ids to publish to (from list_connected_accounts: a location-bound one, with a clientLocationId, or a brand-level page). When given, the post goes to exactly these and its platforms are theirs; otherwise each platform in `platforms` resolves to the location's connection.
messageGooglestringfacultatif
Caption for Google. Required when `google` is selected (unless draft). Max 1500 characters.
messageFacebookstringfacultatif
Shared social caption — used by facebook, instagram, x, linkedin, pinterest, mastodon, bluesky, youtube. Required when any of those is selected (not for a tiktok-only or youtube-only selection, where the caption is optional; Google uses messageGoogle instead) is selected, unless draft. It is validated against EACH selected platform's character limit: facebook 30000, instagram 2200, x 280 WEIGHTED characters rather than typed ones — Japanese/Chinese/Korean characters and emoji cost 2 each and any link costs a flat 23, so a non-Latin caption fits roughly 140 typed characters; setting linkUrl appends that link to the caption for a further 25 weighted (X thread mode is exempt from the limit entirely), linkedin 2000, pinterest 500, mastodon 500, bluesky 300, youtube 5000. The message must fit the smallest limit among the selected social platforms.
ctaType"learn_more" | "sign_up" | "order_online" | "book" | "buy" | "call_now"facultatif
Call-to-action type. For a Google `offer`, ctaType AND ctaUrl are both required. learn_more/sign_up/order_online/book/buy all require ctaUrl; call_now does not.
ctaUrlstringfacultatif
Call-to-action URL. Required for a Google offer and for CTA types other than call_now.
mediaUrlsobject[]facultatif
Media items, one entry per platform attachment: [{ "url", "platform", "type": "image"|"video" }]. The `platform` on each item must be one of the target platforms and controls which per-platform media rules apply. Per-platform limits (violations are rejected): google = no media constraints enforced here; facebook = ≤10 images OR ≤1 video, no mix (carousel: 2–10 image cards, images only); instagram = requires ≥1 item, ≤10 images OR ≤1 video, images and video cannot be mixed; x = ≤4 images OR ≤1 video, no mix; linkedin = ≤5 images OR ≤1 video, no mix; pinterest = image only (no video), exactly 1 image, required; mastodon = ≤4 images OR ≤1 video, no mix; youtube = video only (no images), exactly 1 video, required; up to YouTube's own 256 GB / 12 h limit.
urlstringfacultatif
Publicly reachable media URL (http/https).
platform"google" | "facebook" | "instagram" | "x" | "linkedin" | "pinterest" | "mastodon" | "bluesky" | "youtube"facultatif
Which target platform this media attaches to.
type"image" | "video"facultatif
Media kind.
eventTitlestringfacultatif
Event/offer title. For a Google event or offer this is required (unless draft) and must be ≤58 characters.
eventStartAtstringfacultatif
Event/offer start (ISO timestamp). Required for Google event/offer posts (unless draft).
eventEndAtstringfacultatif
Event/offer end (ISO timestamp). Required for Google event/offer posts (unless draft); must be after the start.
offerTermsstringfacultatif
Offer terms (offer posts).
offerCouponCodestringfacultatif
Offer coupon code.
offerRedeemUrlstringfacultatif
Offer redemption URL.
scheduledForstringfacultatif
Schedule for this ISO timestamp (must be in the future; omit to publish now).
youtubeTitlestringfacultatif
YouTube only (ignored otherwise): video title, ≤100 characters, no < or >. Defaults to `name`. The shared social caption (messageFacebook) becomes the video description (≤5000 bytes, no < or >). YouTube is available only on accounts with YouTube enabled; otherwise a YouTube target is rejected.
youtubePrivacyStatus"private" | "unlisted" | "public"facultatif
YouTube only: visibility. Defaults to private.
youtubeMadeForKidsbooleanfacultatif
YouTube only: whether the video is made for kids (COPPA). Required to publish to YouTube.
youtubeCategoryIdstringfacultatif
YouTube only: numeric video category id, e.g. "22" (People & Blogs, the default).
youtubeTagsstring[]facultatif
YouTube only: tags, ≤500 characters in total (commas count; a tag with a space costs 2 more).
youtubeNotifySubscribersbooleanfacultatif
YouTube only: notify channel subscribers of the upload. Defaults to true.
youtubeEmbeddablebooleanfacultatif
YouTube only: allow embedding on other sites.
youtubeLicense"youtube" | "creativeCommon"facultatif
YouTube only: license.
youtubeSyntheticMediabooleanfacultatif
YouTube only: the video contains realistic altered or synthetic content.
youtubePaidPlacementbooleanfacultatif
YouTube only: the video contains paid product placement.
youtubeThumbnailUrlstringfacultatif
YouTube only: custom thumbnail image URL (JPEG/PNG), set after upload. The channel must be phone-verified for YouTube to accept it.
youtubePlaylistIdstringfacultatif
YouTube only: id of one of the channel's own playlists; the video is added to it after upload.
youtubeCaptionsobject[]facultatif
YouTube only: caption tracks attached after upload, each { url (an .srt/.vtt file), language (e.g. "en"), name }. Each costs 400 YouTube quota units.
urlstringfacultatif
Caption file URL
languagestringfacultatif
Language code, e.g. en
namestringfacultatif
Track name shown to viewers
draftbooleanfacultatif
Save as draft without publishing. Drafts skip publish-gating 'required' checks (required message, required media, required event/offer fields) but STILL enforce structural checks: character limits, media counts, media mixing, valid enums, carousel bounds, and date ordering.
Exemple de requête
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_post",
    "arguments": {
      "postId": "string"
    }
  }
}
Exemple de réponse
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.