Skip to main content
Glama

Publish post

publish_post

Publish a draft directly (if the workspace has not changed this setting, it is on by default and all the direct-publish platforms listed below are available, so the user does not need to enable anything in settings first; platforms that the workspace owner has turned off or unchecked in settings cannot be published directly). Publishes immediately or on a schedule; drafts are not published until this tool is called. Only drafts can be published. Direct-publish platforms: Facebook, Instagram, Threads, LinkedIn, LinkedIn Page, Pinterest, Telegram, Mastodon, Tumblr, Bluesky, X (paid plans only), Telegraph; the workspace settings are authoritative (the allowedPlatforms returned by GET /api/v1/agent-publish, as set by the user on the web); a request that is not allowed is rejected with a reviewUrl. YouTube connections are not yet open (once open, the workspace owner must also first choose "made for kids" in settings, which the server declares on their behalf; a madeForKids value passed by the agent is always ignored); TikTok always requires the user's own confirmation. If the post's targets include any platform that is not in allowedPlatforms, the whole request is rejected with AGENT_PUBLISH_NEEDS_USER_CONFIRMATION and a reviewUrl where the user can confirm and publish on the web; if YouTube is allowed but the owner has not made the kids declaration, AGENT_PUBLISH_YOUTUBE_KIDS_REQUIRED is returned (also with a reviewUrl); if the workspace has not enabled this or the platform is not checked, AGENT_PUBLISH_NOT_ENABLED is returned; if the master switch is off, 503 is returned. The optional scheduledAt (ISO time, in the future) schedules the post; retrying the same post does not publish it twice. With dryRun:true, only the pre-publish checks run (permissions, plan, platform requirements, media); nothing is published and the draft is not changed, and a pass returns dryRun:true; the anti-spam check and the daily count are evaluated at actual publish time. The caller must be a workspace owner/admin/editor. (Required scope: cd.posts.publish)

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": {
      "postId": "<postId>"
    },
    "name": "publish_post"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNotrue = run the checks only without actually publishing; the draft is unchanged. Test keys are always treated as true.
postIdYes
confirmNotrue = the user has approved this specific action. Without it the request is rejected with 409 AGENT_USER_CONFIRMATION_REQUIRED.
scheduledAtNoISO 8601 (with time zone); must be later than the current time; if omitted, publishes immediately
workspaceIdNoOptional: id of the workspace to operate on (look it up with list_workspaces); if omitted, the default personal workspace is used. A developer API key can only use the workspace it is bound to.
idempotencyKeyNo16-128 characters: letters, digits, underscores, or hyphens; keep it unchanged when retrying

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only say readOnly=false, destructive=false, openWorld=true, idempotent=false; the description adds the entire gating model (workspace settings authoritative, allowedPlatforms from the agent-publish endpoint), the concrete error codes AGENT_PUBLISH_NEEDS_USER_CONFIRMATION / AGENT_PUBLISH_YOUTUBE_KIDS_REQUIRED / AGENT_PUBLISH_NOT_ENABLED / 503, and the required scope. One tension: "retrying the same post does not publish it twice" reads as at-most-once behavior while idempotentHint is declared false, though the schema's idempotencyKey framing suggests dedupe is key-based rather than intrinsic.

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?

The length is defensible for a tool with this many gating rules and error modes, and little is pure filler. However, the front-loading is poor: the first sentence opens with a 60-word nested parenthetical about settings defaults before the reader learns that the tool publishes immediately or on a schedule, and the critical "Only drafts can be published" constraint is buried mid-paragraph.

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 high-stakes publish operation with no output schema, the description covers authority, scope, platform allowlist source, scheduling, idempotent retry, dry-run coverage, and the exact failure codes an agent must branch on. Nothing an agent needs in order to call it correctly, or to interpret a rejection, is 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 high (83%), so the baseline is 3, and the description earns an extra point by disambiguating dryRun beyond the schema: only permissions, plan, platform requirements and media checks run, the draft is untouched, and the anti-spam check and daily count are deferred to actual publish time. It also clarifies the confirm/reviewUrl flow that the schema's "confirm" parameter only names, though it never mentions confirm directly.

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?

"Publish a draft directly" gives a specific verb and resource, and the description immediately bounds the scope: "Only drafts can be published" and "drafts are not published until this tool is called." That boundary alone separates it from reschedule_post, retry_publish_target, and the read-side siblings without the agent needing to open 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?

Strong when-to-use guidance: only drafts qualify, the caller must be a workspace owner/admin/editor, the workspace/platform switch must be on, and dryRun is offered as the safe pre-check path. When the tool cannot act, the description routes the agent to the web via the returned reviewUrl rather than to a sibling tool, so the alternative path is stated even though no sibling is named.

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.