Skip to main content
Glama

Generate Image

generate_image

Create an image from the user's prompt with AdaptlyPost AI and save it to the user's own AI image studio in AdaptlyPost. Nothing is posted. It returns { jobId, sessionId, status } right away with status queued; poll get_image_job with the jobId every few seconds until status is completed or failed (usually 10 to 40 seconds). A completed job carries imageUrl, which can go straight into mediaUrls of create_post. Reuse sessionId to keep related images together. Needs the ai.generate permission, which Admin, Editor and Contributor hold and Viewer does not (403 permission_denied). Uses the member's AdaptlyPost AI credits (2 for standard, 4 for premium, none when the member connected their own image provider key) and refunds them if the job fails. With no credits left the job fails with an error saying so; tell the user and do not retry.

Input Schema

NameRequiredDescriptionDefault
modelNostandard (default, 2 credits) or premium (higher fidelity, 4 credits)
promptYesWhat the image should show, including style and composition (max 2000 characters)
qualityNoLOW, MEDIUM or HIGH rendering quality
sessionIdNoImage studio session to add the image to, as returned by an earlier generate_image. Omit to start a new session
aspectRatioNoImage shape (default 1:1). Pick one that suits the target platform, e.g. 9:16 for stories and reels, 4:5 for Instagram feed, 16:9 for YouTube and X
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
referenceImagesNoUp to 5 image URLs the user provided, such as publicUrl values from upload_media, to guide the style or subject

Output Schema

NameRequiredDescriptionDefault
resultNoAn object with jobId (pass it to get_image_job), sessionId, and status (queued).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / referenceImages / description
      Previous value: -"Up to 5 public image URLs that steer the style or subject of the result"New value: +"Up to 5 image URLs the user provided, such as publicUrl values from upload_media, to guide the style or subject"
  2. 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#"
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond annotations (readOnlyHint=false, openWorldHint=true): discloses the required ai.generate permission and which roles hold it (403 permission_denied for Viewer), credit costs per model, refund-on-failure behavior, typical 10–40s latency, and that an empty-credit failure must not be retried.

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-loaded with the core action and the 'nothing is posted' constraint, and every sentence carries operational information (polling, credits, permissions). It is a dense single paragraph rather than a wall of filler, though it is long enough that structure would aid scanning.

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 7-parameter mutation tool with an output schema, it covers the full lifecycle an agent needs: async return shape, polling cadence, terminal statuses, downstream consumption, permission failure mode, and credit accounting. Nothing required to invoke it correctly 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 100%, so the baseline is 3, but the description adds workflow meaning the schema lacks: sessionId is for keeping related images together across calls, and the returned imageUrl is the value that plugs into mediaUrls. It adds context beyond the field-level documentation without re-listing every enum.

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+resource ('Create an image from the user's prompt... save it to the user's own AI image studio') and immediately disambiguates from the sibling create_post with 'Nothing is posted.' An agent can distinguish this from publish/post tools without opening the schema.

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?

Explicitly routes the agent: poll get_image_job with the jobId until completed/failed, feed imageUrl into create_post's mediaUrls, reuse sessionId for related images, and do not retry when credits are exhausted. Names both alternatives and the conditions that select them.

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