Skip to main content
Glama

text_to_image

Generate images from text prompts using Qwen 2 models via RunAPI. Submit a prompt and receive a task ID, status, and output URLs, with optional polling until completion.

Instructions

Create a Qwen 2 task on RunAPI (text to image). Returns a task id, status, and output URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoDeclared type: integer.
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptYesDeclared type: string.
timeout_msNo
aspect_ratioNoDeclared type: string. Known values: "1:1", "3:4", "4:3", "9:16", "16:9".
callback_urlNoDeclared type: string.
output_formatNoDeclared type: string. Known values: "png", "jpeg".
poll_interval_msNo
enable_safety_checkerNoDeclared type: boolean.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.2.0
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +{}
    • addedInput schema / properties / aspect_ratio / description
      Added value: +"Declared type: string. Known values: \"1:1\", \"3:4\", \"4:3\", \"9:16\", \"16:9\"."
    • removedInput schema / properties / aspect_ratio / enum
      Removed value: -[
      -  "1:1",
      -  "3:4",
      -  "4:3",
      -  "9:16",
      -  "16:9"
      -]
    • addedInput schema / properties / callback_url / description
      Added value: +"Declared type: string."
    • addedInput schema / properties / enable_safety_checker / description
      Added value: +"Declared type: boolean."
    • removedInput schema / properties / model / enum
      Removed value: -[
      -  "qwen-2-text-to-image"
      -]
    • addedInput schema / properties / output_format / description
      Added value: +"Declared type: string. Known values: \"png\", \"jpeg\"."
    • removedInput schema / properties / output_format / enum
      Removed value: -[
      -  "png",
      -  "jpeg"
      -]
    • addedInput schema / properties / poll_interval_ms / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / prompt / description
      Added value: +"Declared type: string."
    • addedInput schema / properties / seed / description
      Added value: +"Declared type: integer."
    • changedInput schema / properties / seed / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / timeout_ms / maximum
      Added value: +9007199254740991
  2. Changed5 schema fields changedv0.1.7
    • addedInput schema / properties / callback_url
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / enable_safety_checker
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prompt / type
      Added value: +"string"
    • addedInput schema / properties / seed
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / required
      Added value: +[
      +  "prompt"
      +]
  3. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the async task model by stating that a task id, status, and output URLs are returned, which is real behavioral value. However, it omits auth requirements, cost, and the fact that the default wait=true blocks until completion, leaving meaningful gaps for a creation tool.

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

Conciseness5/5

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

Two tight sentences with no filler, and the core action is front-loaded before the return contract. Every clause earns its place.

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 10-parameter tool with no output schema, the description usefully names the return values (task id, status, output URLs), which stands in for the missing output schema. It falls short on polling/wait semantics and authentication, but is otherwise sufficient to call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 80%, so the schema already documents nearly all 10 parameters. The description adds nothing about seed, aspect_ratio, model, wait, timeout_ms, or callback_url, so it neither compensates for the remaining gap nor enriches the documented ones. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Create a Qwen 2 task on RunAPI') and clarifies the modality with '(text to image)', which separates it from the sibling edit_image. It stops short of explicitly contrasting the two, so the distinction is inferable rather than stated.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no alternatives are named. The mention of a returned task id hints that get_task is the follow-up for polling, but the agent must infer this; nothing tells it when text_to_image is preferable to edit_image.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools