Skip to main content
Glama

Publish Draft

publish_draft
Destructive

Publish a DRAFT post now or schedule it; SCHEDULED posts are accepted too, to reschedule or push live. Other statuses fail with "Post is not a draft". A future scheduledAt sets SCHEDULED for that time and queues nothing yet; a past one publishes now. Without scheduledAt, a draft whose planned date (the scheduledAt it was saved with) is still in the future is SCHEDULED for that date, and any other post (an undated draft, a planned date already past, a SCHEDULED post) publishes now. publishNow: true publishes now even when the draft has a planned date; sending it with scheduledAt fails with 400. Read the draft with get_post first and tell the user which of these will happen. Publishing now clears the stored scheduledAt, moves the post to PENDING and queues a publishing job per platform: content reaches the networks within moments and cannot be recalled. Fails if an account was disconnected or a TikTok entry lacks privacyLevel; fix with update_post first. A post whose YouTube video already waits on YouTube (scheduleOnYouTube) fails with 409 SCHEDULED_ON_YOUTUBE, since YouTube publishes it at scheduledAt. Not for new content, use create_post. Returns { postId, queuedPlatforms, isScheduled, scheduledAt }: queuedPlatforms lists the platforms whose publishing job was queued and is empty when the post was scheduled for later, so it confirms queueing, not publishing. Check list_post_results afterwards for per-platform outcomes.

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": {
      "id": "<id>"
    },
    "name": "publish_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesPost ID with status DRAFT (or SCHEDULED)
timezoneNoIANA timezone stored with the post for display (e.g. "America/New_York"); it does not shift scheduledAt. Omitting it stores UTC, replacing the timezone the draft was saved with, so resend the draft's timezone from get_post to keep itUTC
publishNowNoPublish now even when the draft has a planned date in the future. Sending it with scheduledAt fails with 400
scheduledAtNoAbsolute ISO 8601 instant (e.g. "2026-03-15T10:00:00Z"). A future time schedules for that time instead of the draft's planned date; a past time publishes now. Omit to schedule for the planned date when it is still in the future, and to publish now otherwise
workspaceIdNoWorkspace to act in: an id from list_workspaces. Omit to act in the workspace list_workspaces marks current. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another

Output Schema

NameRequiredDescriptionDefault
resultYesAn object with postId, queuedPlatforms (platforms whose publishing job was queued; empty when scheduled for later), isScheduled, and scheduledAt.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / timezone / description
      Previous value: -"IANA timezone stored with the post for display (e.g. \"America/New_York\"); it does not shift scheduledAt"New value: +"IANA timezone stored with the post for display (e.g. \"America/New_York\"); it does not shift scheduledAt. Omitting it stores UTC, replacing the timezone the draft was saved with, so resend the draft's timezone from get_post to keep it"
    • addedOutput schema / properties / result / additionalProperties
      Added value: +true
    • addedOutput schema / properties / result / properties
      Added value: +{
      +  "isScheduled": {
      +    "type": [
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "postId": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "queuedPlatforms": {
      +    "anyOf": [
      +      {
      +        "items": {
      +          "description": "One of: FACEBOOK, INSTAGRAM, THREADS, TIKTOK, TWITTER, BLUESKY, LINKEDIN, PINTEREST, YOUTUBE, MASTODON, TELEGRAM, GOOGLE_BUSINESS, TUMBLR, WORDPRESS",
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "scheduledAt": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  }
      +}
    • addedOutput schema / properties / result / type
      Added value: +"object"
    • addedOutput schema / required
      Added value: +[
      +  "result"
      +]
  2. Changed2 schema fields changed
    • addedInput schema / properties / publishNow
      Added value: +{
      +  "description": "Publish now even when the draft has a planned date in the future. Sending it with scheduledAt fails with 400",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / scheduledAt / description
      Previous value: -"Absolute ISO 8601 instant (e.g. \"2026-03-15T10:00:00Z\"). Omit, or pass a past time, to publish now"New value: +"Absolute ISO 8601 instant (e.g. \"2026-03-15T10:00:00Z\"). A future time schedules for that time instead of the draft's planned date; a past time publishes now. Omit to schedule for the planned date when it is still in the future, and to publish now otherwise"
  3. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  4. Changed1 schema field changed
    • changedInput schema / properties / workspaceId / description
      Previous value: -"Workspace to act in: an id from list_workspaces. Omit to use the default workspace. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another"New value: +"Workspace to act in: an id from list_workspaces. Omit to act in the workspace list_workspaces marks current. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another"
  5. Changed1 schema field changed
    • addedInput schema / properties / workspaceId
      Added value: +{
      +  "description": "Workspace to act in: an id from list_workspaces. Omit to use the default workspace. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another",
      +  "type": "string"
      +}
  6. Changed4 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"Draft post ID"New value: +"Post ID with status DRAFT (or SCHEDULED)"
    • changedInput schema / properties / scheduledAt / description
      Previous value: -"Schedule time (ISO 8601). Omit to publish now"New value: +"Absolute ISO 8601 instant (e.g. \"2026-03-15T10:00:00Z\"). Omit, or pass a past time, to publish now"
    • changedInput schema / properties / timezone / description
      Previous value: -"IANA timezone"New value: +"IANA timezone stored with the post for display (e.g. \"America/New_York\"); it does not shift scheduledAt"
    • changedOutput schema / properties / result / description
      Previous value: -"The published or scheduled post record with its updated status as returned by the AdaptlyPost API."New value: +"An object with postId, queuedPlatforms (platforms whose publishing job was queued; empty when scheduled for later), isScheduled, and scheduledAt."
  7. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the irreversible side effects (clears stored scheduledAt, moves to PENDING, queues a job, content 'cannot be recalled'), specific failure codes (400 on publishNow+scheduledAt, 409 SCHEDULED_ON_YOUTUBE), and prerequisites (connected account, TikTok privacyLevel). Annotation alignment is clean: destructiveHint=true matches the 'cannot be recalled' warning. Minor gap: no mention of rate limits or auth scope.

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

Conciseness3/5

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

Front-loaded with the action and status rules, but it is a single dense block of clauses that mixes decision logic, side effects, error codes, and return-value explanation. Every sentence carries information, yet the return-field breakdown duplicates the output schema and the paragraph would benefit from separation into usage/side-effects/failure sections.

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 destructive, open-world mutation tool it covers decision logic, irreversibility, failure modes, and follow-up (list_post_results). The only real shortfall is redundancy on return values, which the output schema already provides, rather than any missing behavioral context.

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 100%, so a 3 would be the baseline, but the description adds real meaning: it explains the interaction rule between publishNow and scheduledAt (400), and that a future scheduledAt queues nothing yet while a past one publishes immediately. It does not cover the timezone parameter's replacement pitfall or workspaceId, which the schema handles on its own.

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 ('Publish a DRAFT post') and immediately scopes which statuses are accepted (DRAFT, SCHEDULED) versus which fail. It explicitly distinguishes itself from create_post ('Not for new content'), get_post (read the draft first), and update_post (fix problems first).

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 routing ('Read the draft with get_post first and tell the user which of these will happen'), explicit when-not ('Not for new content, use create_post'), and remediation paths for failures ('fix with update_post first'). The publishNow/scheduledAt decision rules are spelled out so the agent can predict the outcome before calling.

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