Skip to main content
Glama
runapi-ai

@runapi.ai/flux-kontext-mcp

by runapi-ai

text_to_image

Turn text prompts into images via a Flux Kontext task on RunAPI, returning task ID, status, and output URLs.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptYesImage description (English only).
watermarkNoWatermark identifier.
timeout_msNo
aspect_ratioNoOutput aspect ratio. Default: 16:9.
callback_urlNoWebhook URL for async notifications.
output_formatNoOutput format. Default: jpeg.
poll_interval_msNo
safety_toleranceNoContent safety threshold. 0-6 for generation, 0-2 for editing. Default: 2.
source_image_urlNoSource image URL for editing mode.
enable_translationNoAuto-translate non-English prompts. Default: true.
enable_prompt_expansionNoExpand the prompt with more detail. Default: false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.1.13
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / aspect_ratio / anyOf
      Added value: +[
      +  {
      +    "const": "21:9",
      +    "type": "string"
      +  },
      +  {
      +    "const": "16:9",
      +    "type": "string"
      +  },
      +  {
      +    "const": "4:3",
      +    "type": "string"
      +  },
      +  {
      +    "const": "1:1",
      +    "type": "string"
      +  },
      +  {
      +    "const": "3:4",
      +    "type": "string"
      +  },
      +  {
      +    "const": "9:16",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / aspect_ratio / enum
      Removed value: -[
      -  "21:9",
      -  "16:9",
      -  "4:3",
      -  "1:1",
      -  "3:4",
      -  "9:16"
      -]
    • removedInput schema / properties / aspect_ratio / type
      Removed value: -"string"
    • addedInput schema / properties / output_format / anyOf
      Added value: +[
      +  {
      +    "const": "jpeg",
      +    "type": "string"
      +  },
      +  {
      +    "const": "png",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / output_format / enum
      Removed value: -[
      -  "jpeg",
      -  "png"
      -]
    • removedInput schema / properties / output_format / type
      Removed value: -"string"
    • addedInput schema / properties / poll_interval_ms / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / timeout_ms / maximum
      Added value: +9007199254740991
  2. Changed9 schema fields changedv0.1.11
    • addedInput schema / properties / aspect_ratio / description
      Added value: +"Output aspect ratio. Default: 16:9."
    • addedInput schema / properties / callback_url / description
      Added value: +"Webhook URL for async notifications."
    • addedInput schema / properties / enable_prompt_expansion / description
      Added value: +"Expand the prompt with more detail. Default: false."
    • addedInput schema / properties / enable_translation / description
      Added value: +"Auto-translate non-English prompts. Default: true."
    • addedInput schema / properties / output_format / description
      Added value: +"Output format. Default: jpeg."
    • addedInput schema / properties / prompt / description
      Added value: +"Image description (English only)."
    • addedInput schema / properties / safety_tolerance / description
      Added value: +"Content safety threshold. 0-6 for generation, 0-2 for editing. Default: 2."
    • addedInput schema / properties / source_image_url / description
      Added value: +"Source image URL for editing mode."
    • addedInput schema / properties / watermark / description
      Added value: +"Watermark identifier."
  3. Changed5 schema fields changedv0.1.2
    • addedInput schema / properties / callback_url / type
      Added value: +"string"
    • addedInput schema / properties / prompt / type
      Added value: +"string"
    • addedInput schema / properties / source_image_url / type
      Added value: +"string"
    • addedInput schema / properties / watermark / type
      Added value: +"string"
    • addedInput schema / required
      Added value: +[
      +  "prompt"
      +]
  4. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden, but it only says it creates a task and returns an id, status, and output URLs. It does not disclose that wait defaults to true and the call polls until terminal, that callback_url enables webhooks, or that source_image_url switches the operation from text-to-image to image editing.

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?

One sentence with no filler: it front-loads the action, names the resource, and lists key return values. It is concise and well-structured, though it sacrifices the additional context that a more complex tool would benefit from.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter asynchronous task API with polling, webhook callbacks, safety controls, translation, prompt expansion, and an editing mode, a one-line description is not complete. There is no output schema to fill the gap, and key orchestrational choices like default wait behavior and using get_task for later retrieval are absent.

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 85%, so the schema already documents 11 of 13 parameters; the description adds no per-parameter information beyond the general return shape. The two unclearly documented numeric parameters, timeout_ms and poll_interval_ms, are not clarified, but the high schema coverage justifies the baseline 3.

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?

The description opens with the specific verb 'Create' and names the exact resource 'Flux Kontext task on RunAPI', then clarifies the use case with '(text to image)'. This clearly separates it from siblings like get_task, check_pricing, and login, which concern retrieval, pricing, and auth respectively.

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

Usage Guidelines3/5

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

The description implies use for generating a text-to-image task, but it does not state when to prefer this over get_task for polling/retrieving results. It also does not mention that providing source_image_url can invoke an editing mode, so the usage context is only partially implied.

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