Skip to main content
Glama

Attach Image to Post

set_post_image
DestructiveIdempotent

Attaches one image to a draft or scheduled post, from a public HTTPS URL (image_url) or from an image already stored in FeedSquad (asset_id, or the asset url an image upload returned), which attaches at once with no re-download. External URLs must be HTTPS images (JPEG, PNG, WebP or GIF), checked with a HEAD request, max 10MB; WebP and GIF are stored as JPEG or PNG (first frame only, so an animated GIF loses its animation), and anything over 3MB is downscaled on the server. One stored asset can be attached to any number of posts. A post holds one media format at a time (single image, carousel or video): replace=true swaps an existing carousel or video for this image. Published posts cannot be changed. Errors carry error.data = { code, recovery, ... } with codes URL_NOT_REACHABLE (received_status), URL_NOT_IMAGE (received_content_type), IMAGE_TOO_LARGE, POST_NOT_FOUND, POST_ALREADY_PUBLISHED, ASSET_NOT_FOUND; recovery says how to fix the call. Attaching media to an approved (ready or scheduled) post returns it to draft, and it needs approval again before it can publish. Every response carries status_before, status_after and approval_required.

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": "set_post_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoWhen true, the call validates without writing.
post_idYesThe post id to attach an image to.
replaceNoWhen true, the call discards any existing carousel or video on the post and attaches this image instead.
alt_textNoOptional accessibility text.
asset_idNoA stored image asset id (ast_...) from an earlier image upload. Takes image_url or asset_id, not both.
image_urlNoHTTPS URL of the image. A FeedSquad asset URL from an earlier image upload attaches without re-downloading.

Output Schema

NameRequiredDescriptionDefault
kindYes
dry_runNo
post_idYes
asset_idNo
image_urlNo
mime_typeNo
status_afterNo
dashboard_urlNo
status_beforeNo
approval_resetNo
approval_requiredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes far beyond the annotations: HEAD-request validation, HTTPS-only, 10MB cap, >3MB server-side downscaling, WebP/GIF re-encoded with animated GIFs losing animation, and the key side effect that attaching to an approved post returns it to draft and requires re-approval. It also enumerates error codes with their data payloads and recovery guidance.

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?

Front-loads the action and source options, then layers constraints, side effects and errors in a logical order with no filler sentences. It is dense — nearly one continuous block covering limits, conversion, errors and status fields — so scannability suffers slightly, but nothing is redundant.

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 destructive, open-world mutation with six parameters, the description covers inputs, format limits, side effects on approval status, and failure modes with recovery hints. Even though an output schema exists, it still names status_before, status_after and approval_required, so an agent can interpret the result without surprises.

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%, but the description adds real meaning: image_url and asset_id are mutually exclusive, an asset URL from a prior upload attaches without re-download, and replace discards existing carousel or video. It reinforces rather than merely repeats the schema.

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?

Opens with a specific verb+resource+scope: "Attaches one image to a draft or scheduled post." It immediately distinguishes itself from set_post_carousel and set_post_video by stating a post holds one media format at a time and that replace=true swaps a carousel or video for this image.

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?

Gives clear conditions: only draft or scheduled posts, published posts cannot be changed, and replace=true is required to evict an existing carousel or video. It also notes reuse of a stored asset across many posts. It never names the sibling tools by name, so routing is implied rather than explicit.

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