Skip to main content
Glama

edit_image

Edit an image using AI by providing a source image URL and an editing instruction. Returns task status and output URLs.

Instructions

Create a Grok Imagine task on RunAPI (edit 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.
promptNoOptional image editing instruction.
timeout_msNo
aspect_ratioNo
callback_urlNoWebhook URL for terminal Task delivery.
mask_indicesNoNot accepted by this model.
source_task_idNoNot accepted by this model.
poll_interval_msNo
source_image_urlNoPublic source image URL.
source_image_urlsNo
enable_safety_checkerNoEnable content safety checks.

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
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / mask_indices
      Added value: +{
      +  "description": "Not accepted by this model."
      +}
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "grok-imagine-edit-image"
      -]New value: +[
      +  "grok-imagine-edit-image",
      +  "grok-imagine-image-2-0"
      +]
    • addedInput schema / properties / poll_interval_ms / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / source_image_urls
      Added value: +{
      +  "items": {},
      +  "type": "array"
      +}
    • addedInput schema / properties / source_task_id
      Added value: +{
      +  "description": "Not accepted by this model."
      +}
    • addedInput schema / properties / timeout_ms / maximum
      Added value: +9007199254740991
    • removedInput schema / required
      Removed value: -[
      -  "source_image_url"
      -]
  2. Changed5 schema fields changedv0.1.11
    • addedInput schema / properties / callback_url
      Added value: +{
      +  "description": "Webhook URL for terminal Task delivery.",
      +  "type": "string"
      +}
    • addedInput schema / properties / enable_safety_checker
      Added value: +{
      +  "description": "Enable content safety checks.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prompt
      Added value: +{
      +  "description": "Optional image editing instruction.",
      +  "type": "string"
      +}
    • addedInput schema / properties / source_image_url
      Added value: +{
      +  "description": "Public source image URL.",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "source_image_url"
      +]
  3. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It does reveal the async task-based nature and the returned fields (task id, status, output URLs), but it does not mention polling, wait behavior, safety checking, or side effects beyond creating a task.

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?

The description is a single, front-loaded sentence with no redundant content. It communicates purpose and return value efficiently.

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 12-parameter tool with no output schema and no annotations, this description is too sparse. It explains what is returned but not how to construct a valid request, which parameters are important for editing, or how the task lifecycle works, leaving the agent with significant ambiguity.

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

Parameters2/5

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

Schema description coverage is 67%, which is not high enough to warrant a baseline 3, and the description adds no parameter semantics. It does not clarify how source_image_url, aspect_ratio, wait, or timeout_ms relate to an edit-image task, so the agent must rely purely on the partial schema.

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?

The description clearly states the tool creates a Grok Imagine task scoped to 'edit image', and notes the return type. It is distinguishable from siblings like text_to_image by the explicit 'edit image' scope, though it does not explicitly contrast itself with alternative tools.

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?

No guidance is given on when to use this tool versus siblings such as text_to_image, upscale_image, or image_to_video. The phrase 'edit image' only implies the use case; it does not state prerequisites or exclusions.

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