Skip to main content
Glama

Create a template

create_template

Create a reusable content blueprint. Beyond the shared text and media, a template can target specific networks (platforms) and carry a different body or different media per network (platformContent), plus the portable network options (metadata) such as a YouTube title or Instagram collaborators. Attach media with mediaIds from list_media / import_media_from_url. Account-bound settings — Pinterest board, Discord channel, WhatsApp recipient, TikTok privacy — are NOT part of a template; set those on the post or automation that publishes it.

Platform rules (enforced by the API — validate_post checks all of them):

  • Facebook: ≤63206 chars, ≤10 images, ≤1 videos, video 1–14400s, supports first comment

  • Instagram: ≤2200 chars, media REQUIRED, ≤10 images, ≤1 videos, video 3–900s, supports first comment

  • Threads: ≤500 chars, ≤10 images, ≤1 videos, video 0–300s, supports first comment

  • X (Twitter): ≤280 chars (25000 with a long-post subscription), ≤4 images, ≤1 videos, supports first comment

  • LinkedIn: ≤3000 chars, ≤9 images, ≤1 videos, video 3–1800s

  • TikTok: ≤2200 chars, media REQUIRED, ≤35 images, ≤1 videos, video 3–600s, supports first comment (TikTok Business connections only)

  • YouTube: ≤5000 chars, VIDEO REQUIRED, ≤1 images, ≤1 videos

  • Telegram: ≤4096 chars (≤1024 with media), ≤10 images, ≤1 videos

  • WhatsApp: ≤4096 chars (≤1024 with media), ≤1 images, ≤1 videos

  • Pinterest: ≤500 chars, media REQUIRED, ≤5 images, ≤1 videos, video 4–900s

  • Google Business: ≤1500 chars, ≤10 images, ≤1 videos

  • Discord: ≤2000 chars, ≤10 images, ≤1 videos

  • Bluesky: ≤300 chars, ≤4 images, ≤1 videos, video 0–180s

  • Mastodon: ≤500 chars, ≤4 images, ≤1 videos

  • Images and a video in the same post are refused on Facebook, LinkedIn, Pinterest, X (Twitter), Bluesky, Mastodon, TikTok — attach one kind per post (or per platform override)

  • X counts weighted length, not characters: every URL counts 23, CJK characters count 2, each emoji counts 2; the ≤280 limit applies to that count

  • X long posts: an X connection whose metadata.subscriptionType (list_platform_connections) is Basic, Premium, PremiumPlus may post up to 25000; every X connection the post targets must have one, or the whole post is held to 280. The first comment stays ≤280. A subscription bought after connecting counts once an owner or admin presses Refresh on the X connection in PostRite

  • Bluesky counts graphemes (what a reader sees as one character, so an emoji is 1), not UTF-16 units; the ≤300 limit applies to that count

  • Pinterest: requires metadata.pinterest.boardId (from list_pinterest_boards) unless the account has a default board

  • Discord bot connections: require metadata.discord.channels (map of platformConnectionId -> channelId, from list_discord_channels)

  • WhatsApp: requires metadata.whatsappRecipient (phone number)

  • TikTok: requires metadata.tiktokOptions.privacyLevel, one of the account's privacy_level_options from get_tiktok_creator_info

  • TikTok connection method (metadata.authMethod on list_platform_connections: "business_api" is TikTok Business, absent or "login_kit" is Login Kit): a TikTok Business VIDEO publishes public only — metadata.tiktokOptions.privacyLevel must be PUBLIC_TO_EVERYONE — and is capped at 1 GB (Login Kit: 4 GB); photo posts keep the privacy_level_options from get_tiktok_creator_info on both

  • TikTok Business only (Login Kit refuses both): metadata.tiktokOptions.uploadAsDraft: true sends the video to the creator's TikTok drafts instead of publishing it — TikTok then ignores everything but the caption, though privacyLevel must still be set — and metadata.tiktokOptions.coverMediaId (a library image) sets a separate video cover, which makes TikTok ignore videoCoverTimestampMs

  • TikTok first comment: metadata.tiktokOptions.firstComment (≤1200 chars) is posted only on a TikTok Business connection and never on an uploadAsDraft post; on Login Kit the post still publishes but the comment is not posted (validate_post warns with validation.tiktokFirstCommentBusinessOnly)

  • TikTok photo carousels: metadata.tiktokOptions.photoTitle is an optional headline of ≤90 chars (derived from the caption's first line when omitted); the caption itself is sent as the description (≤4000)

  • Instagram contentType REEL: exactly 1 video, 3–900s

  • Instagram contentType STORY: exactly 1 media, video 3–60s and ≤100 MB, no caption

  • Facebook metadata.facebookOptions.postType REEL: exactly 1 vertical (9:16) video, 3–90s, at least 540×960; Meta allows 30 API-published Reels per Page per 24h

  • Facebook metadata.facebookOptions.postType STORY: exactly 1 image or video (3–60s), no caption, no first comment

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": {
      "name": "<name>",
      "content": "<content>"
    },
    "name": "create_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesTemplate name
tagsNoTags for organizing templates; applied, they become the post's hashtags, appended to the text on most networks (not Threads or YouTube) and counted against each network's character limit
contentYesShared template body; may contain {{variables}}. Max 2000 characters — this is the template cap, well below what the networks themselves allow.
mediaIdsNoMedia library IDs (from list_media or import_media_from_url) attached to every network — the preferred way to attach media. Images and videos only: a template, like a post, refuses an audio file or PDF document. On update_template, an empty array leaves the media untouched (passing [] does not remove media — removing all media is done in the app)
metadataNoPortable network options stored on the template, by block: youtubeOptions (title, privacyStatus: public | unlisted | private, categoryId, madeForKids, isShort, coverMediaId, coverUrl, tags); tiktokOptions (firstComment, privacyLevel, disableComment, disableDuet, disableStitch, isAigc, autoAddMusic, brandOrganicToggle, brandContentToggle, commercialContentEnabled, videoCoverTimestampMs, photoCoverIndex, photoTitle, uploadAsDraft, coverMediaId, coverUrl); instagramOptions (firstComment, isTrialReel, trialGraduation: MANUAL | SS_PERFORMANCE, collaborators, userTags, isAiGenerated, paidPartnership{sponsorIds}, shareToFeed, poll{options, extendedDuration}, commentPrompt, coverMediaId, coverUrl, coverTimestampMs, audio{audioId, audioType, title, artist, coverUrl, durationMs, audioVolume, videoVolume}); facebookOptions (firstComment, postType: FEED | REEL | STORY); linkedinOptions (coverMediaId, coverUrl); twitterOptions (firstComment, replySettings: following | mentionedUsers); threadsOptions (firstComment, replyControl: everyone | accounts_you_follow | mentioned_only, shareToInstagram, enableReplyApprovals, topicTag, linkAttachment, poll{options}, longText, mediaSpoiler, isMadeWithAi, isGhostPost, quotePostId, quotePostPreview{username, text, permalink}); pinterest (boardId, title, link, coverMediaId, coverUrl); googleBusiness (postType: STANDARD | EVENT | OFFER, ctaType: NONE | BOOK | ORDER | SHOP | LEARN_MORE | SIGN_UP | CALL, ctaUrl, event{title, startDate, endDate}, offer{couponCode, redeemOnlineUrl, termsConditions}); discord (channels, username, avatarUrl); bluesky (replyControl: everybody | nobody | mentioned_or_following, quoteControl: everybody | nobody, selfLabels: sexual | nudity | porn | graphic-media); mastodon (visibility: public | unlisted | private | direct, spoilerText, language); telegram (disableNotification, disableWebPagePreview); whatsappRecipient; globalTags. First comments: facebookOptions/instagramOptions/twitterOptions/threadsOptions/tiktokOptions.firstComment (TikTok: Business connections only, see below). facebookOptions.postType: absent means FEED; REEL takes exactly one vertical video, STORY one image or video with no caption and no first comment — independent of the top-level contentType, which is Instagram's placement. twitterOptions.replySettings: absent means everyone can reply. instagramOptions: trialGraduation only with isTrialReel and contentType REEL (absent means MANUAL); isAiGenerated adds Instagram's AI label; paidPartnership.sponsorIds are NUMERIC Instagram user IDs (max 2), ignored on an Instagram Login connection; audio only on a REEL via a Facebook Login connection. threadsOptions.shareToInstagram, enableReplyApprovals and replyControl are omitted unless the organization has the matching scope enabled. threadsOptions.topicTag is the post's one topic (≤50 chars, no ".", "&" or "#"). threadsOptions.poll (options: 2-4 strings of ≤25 chars), linkAttachment (an http(s) URL shown as a preview card) and longText (≤10000 chars attached under the post) only work on a Threads post with no media; poll and longText cannot be combined. mediaSpoiler blurs the attached media. A Threads post counts at most 5 distinct links, linkAttachment included. Spoilers on Threads are written in the text as ||hidden words|| (at most 10); the markers are removed before publishing and do not count against the character limit. Other platforms except Discord show the markers as typed (validate_post warns: validation.spoilerMarkersElsewhere), so give Threads its own text via platformContents when the post also goes elsewhere. instagramOptions.userTags tags people on the post's media: [{ mediaId, username, x, y }]. mediaId is the id of one of the media Instagram receives (from mediaIds); x and y are 0-1 fractions of the image (0,0 top-left) and are REQUIRED on an image and FORBIDDEN on a video/Reel. At most 20 people per media, each once. Story: x/y optional. A template never keeps userTags (the api strips them): they point at one post's media. instagramOptions.shareToFeed (boolean, REEL only) is three-valued: absent sends nothing and Instagram applies its own choice for the account (Meta's reference states no default), true asks for Feed and Reels, false for the Reels tab only. instagramOptions.poll ({ options: 2-4 strings of 1-25 chars, extendedDuration?: boolean }) and instagramOptions.commentPrompt (true) both turn the post's caption into the question, so the post needs a caption; the two cannot be combined, neither works on a Story, and both are published only through a Facebook Login connection (metadata.authMethod facebook_login on list_platform_connections): on an Instagram Login connection validate_post returns the error validation.instagramCaptionAddOnFacebookLoginOnly, and on a mix of connections a warning (validation.instagramCaptionAddOnSomeAccountsWithout). The serialized poll may not exceed 200 characters. threadsOptions.isMadeWithAi adds Threads' AI info label. threadsOptions.isGhostPost publishes a ghost post, archived by Threads after 24 hours: it is text only and supports nothing but text spoilers, so it refuses media, poll, longText, linkAttachment, topicTag, quotePostId, replyControl, enableReplyApprovals, shareToInstagram, isMadeWithAi and mediaSpoiler (validate_post names the option: validation.threadsGhostPostUnsupported). threadsOptions.quotePostId quotes a thread: it is the numeric Threads media id (digits only, not a URL and not a shortcode) of one of the connected account's OWN threads, and it is account-bound, so a template never keeps it. validate_post refuses an id that is not digits (validation.threadsQuotePostInvalid) and a quote on a post that goes to more than one Threads account (validation.threadsQuoteOneAccount); it cannot check that the thread belongs to the account, and what Threads does with someone else's thread has not been measured, so only quote the account's own. quotePostPreview is display data the editor fills in; leave it out. bluesky reply/quote gates are best-effort: a refusal is a warning on the published post, not a failure. mastodon.visibility: absent publishes public. tiktokOptions depends on how the TikTok account was connected (metadata.authMethod on list_platform_connections: business_api is TikTok Business, absent or login_kit is Login Kit). A TikTok Business video publishes public only, so privacyLevel must be PUBLIC_TO_EVERYONE. uploadAsDraft: true sends the post to the creator's TikTok drafts instead of publishing (Business connections only; absent means publish). coverMediaId is a library image id used as the video's cover (Business connections only; TikTok then ignores videoCoverTimestampMs; the api fills coverUrl, never send it). Login Kit refuses uploadAsDraft and coverMediaId. tiktokOptions.firstComment (≤1200 chars) is posted as a comment on the video only on a TikTok Business connection, and never on an uploadAsDraft post; on Login Kit the post still publishes but the comment is not posted (validate_post returns the warning validation.tiktokFirstCommentBusinessOnly). Alternative text is NOT here: it belongs to the media file (update_media), so one description serves every post and platform. Account-bound keys are NOT stored on a template — the api strips them — so set them on the post or automation instead: pinterest.boardId (ids from list_pinterest_boards; required unless the account has a default board); discord.channels (bot connections: map of platformConnectionId -> channelId, ids from list_discord_channels); whatsappRecipient (recipient phone number); tiktokOptions.privacyLevel (must be one of privacy_level_options from get_tiktok_creator_info); tiktokOptions.uploadAsDraft (drafts exist only on a TikTok Business connection); threadsOptions.quotePostId (the id of one of that account's own threads).
mediaUrlsNoEscape hatch for media proxy URLs — prefer mediaIds
platformsNoNetworks this template targets. A suggestion for the editor, not a restriction — the template still applies to any account.
contentTypeNoInstagram post type (POST | REEL | STORY)
descriptionNoInternal note about when to use this template; never published
organizationIdNoOrganization to act in — an id from list_organizations. Required when this connection was authorized for more than one organization; omit it when there is only one.
platformContentNoPer-network overrides keyed by Platform (INSTAGRAM, TWITTER, …). A network listed here publishes its own text/media; anything omitted falls back to the shared content and media.

Output Schema

NameRequiredDescriptionDefault
templateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / tags / description
      Previous value: -"Tags for organizing templates; also become the post's hashtags when applied"New value: +"Tags for organizing templates; applied, they become the post's hashtags, appended to the text on most networks (not Threads or YouTube) and counted against each network's character limit"
  2. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Beyond annotations declaring a non-destructive mutation with open-world effects, the description discloses extensive behavior: API-enforced platform rules, validate_post checks, stripped account-bound keys and userTags, validation warnings/errors, and template-specific constraints. It does not contradict the annotations.

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

Conciseness2/5

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

The first sentence is front-loaded and the platform rules are structured as bullets, but the description is extremely long and repetitive, restating TikTok business rules, metadata fields, and platform constraints that also appear in the schema. Many sentences do not earn their place for an agent selecting and invoking the tool.

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 complex tool with 11 parameters, nested objects, and an output schema, the description covers the critical behavioral context: platform rules, validation behavior, stripped template-incompatible fields, and media sourcing. It is complete, even if overstuffed relative to what an agent needs.

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 description coverage is 100%, so the schema already documents parameters. The description nevertheless adds platform character/media limits, account-bound key exclusions, platformContent fallback behavior, and the preference for mediaIds over mediaUrls, though it also repeats much of the already massive metadata schema description.

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

Purpose4/5

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

The description opens with a specific verb and resource: 'Create a reusable content blueprint,' and clarifies that templates can target platforms and carry per-network content and metadata. It distinguishes templates from account-bound post settings but does not explicitly name create_post or update_template as alternatives.

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

Usage Guidelines3/5

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

It gives some implied usage guidance: attach media with mediaIds from list_media or import_media_from_url, and set account-bound settings on the post or automation rather than the template. However, it never explicitly states when to use create_template instead of create_post or update_template, leaving the main sibling choice to inference.

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