Skip to main content
Glama

Render one job (spends credits)

run_job
DestructiveIdempotent

Renders one pending or failed job on its own (from create_job, or get_batch_jobs), spending its creditCost when it succeeds; failed renders are not charged, so a failed job can be run again. It renders at once and the answer waits up to 30 seconds for the file; a job still rendering then comes back with status processing, and get_job a few seconds later gets its file. A job already rendering, rendered or cancelled is refused, so repeating the call does not render or charge twice; get_job reports it. To render a whole batch use run_batch. Run it only after the user agrees to the cost. Needs batches:create on the connection and renders:create in the user's workspace role.

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": {
      "jobId": "<jobId>"
    },
    "name": "run_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYesJob ID from create_job or get_batch_jobs

Output Schema

NameRequiredDescriptionDefault
jobsYes
statusYesprocessing while any job renders (get_job a few seconds later), pending while any waits for run_job, done when each has finished

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • removedOutput schema / properties / batchId
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "format": "uuid",
      -      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "The batch it joined; null for a job on its own"
      -}
    • removedOutput schema / properties / creditCost
      Removed value: -{
      -  "description": "Credits the render spends when it succeeds",
      -  "maximum": 9007199254740991,
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • removedOutput schema / properties / error
      Removed value: -{
      -  "description": "Why the render failed",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / flowId
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "format": "uuid",
      -      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • removedOutput schema / properties / id
      Removed value: -{
      -  "description": "jobId for run_job and get_job",
      -  "format": "uuid",
      -  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
      -  "type": "string"
      -}
    • addedOutput schema / properties / jobs
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "batch": {
      +        "anyOf": [
      +          {
      +            "format": "uuid",
      +            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The batch it is in; null for a job on its own"
      +      },
      +      "creditCost": {
      +        "description": "Credits the render spends when it succeeds",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "error": {
      +        "description": "Why the render failed",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "file": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "contentType": {
      +                "type": "string"
      +              },
      +              "creativeId": {
      +                "format": "uuid",
      +                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
      +                "type": "string"
      +              },
      +              "fileName": {
      +                "type": "string"
      +              },
      +              "height": {
      +                "anyOf": [
      +                  {
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "sizeBytes": {
      +                "maximum": 9007199254740991,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "url": {
      +                "description": "Link to the rendered file",
      +                "type": "string"
      +              },
      +              "width": {
      +                "anyOf": [
      +                  {
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "creativeId",
      +              "url",
      +              "fileName",
      +              "contentType",
      +              "sizeBytes",
      +              "width",
      +              "height"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The rendered file; null until the job succeeds"
      +      },
      +      "flow": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "id": {
      +                "type": "string"
      +              },
      +              "name": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "name"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The flow it renders as a video, if it does"
      +      },
      +      "id": {
      +        "description": "jobId for run_job, get_job and update_job",
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
      +        "type": "string"
      +      },
      +      "modifications": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The values it renders, by layer; null for a job made in the Kalpana app"
      +      },
      +      "output": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "format": {
      +            "description": "File format the job renders to",
      +            "enum": [
      +              "png",
      +              "jpeg",
      +              "webp",
      +              "pdf",
      +              "mp4",
      +              "gif",
      +              "webm",
      +              "mov"
      +            ],
      +            "type": "string"
      +          },
      +          "kind": {
      +            "description": "image for still renders (png, jpeg, webp, pdf); video for mp4, gif, webm or mov",
      +            "enum": [
      +              "image",
      +              "video"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "format",
      +          "kind"
      +        ],
      +        "type": "object"
      +      },
      +      "page": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "id": {
      +                "type": "string"
      +              },
      +              "name": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "name"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The page it renders; null for a video"
      +      },
      +      "status": {
      +        "description": "pending waits for run_batch, processing is rendering, success has rendered, failed has a render error, cancelled was stopped by cancel_batch or cancel_job (final, not charged)",
      +        "enum": [
      +          "pending",
      +          "processing",
      +          "success",
      +          "failed",
      +          "cancelled"
      +        ],
      +        "type": "string"
      +      },
      +      "template": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "id": {
      +                "type": "string"
      +              },
      +              "name": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "name"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "status",
      +      "template",
      +      "page",
      +      "flow",
      +      "batch",
      +      "modifications",
      +      "output",
      +      "creditCost",
      +      "error",
      +      "file"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / output
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": false,
      -      "properties": {
      -        "contentType": {
      -          "type": "string"
      -        },
      -        "creativeId": {
      -          "format": "uuid",
      -          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
      -          "type": "string"
      -        },
      -        "fileName": {
      -          "type": "string"
      -        },
      -        "height": {
      -          "anyOf": [
      -            {
      -              "maximum": 9007199254740991,
      -              "minimum": -9007199254740991,
      -              "type": "integer"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "sizeBytes": {
      -          "maximum": 9007199254740991,
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "url": {
      -          "description": "Link to the rendered file",
      -          "type": "string"
      -        },
      -        "width": {
      -          "anyOf": [
      -            {
      -              "maximum": 9007199254740991,
      -              "minimum": -9007199254740991,
      -              "type": "integer"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        }
      -      },
      -      "required": [
      -        "creativeId",
      -        "url",
      -        "fileName",
      -        "contentType",
      -        "sizeBytes",
      -        "width",
      -        "height"
      -      ],
      -      "type": "object"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "The rendered file; null until the job succeeds"
      -}
    • removedOutput schema / properties / outputFormat
      Removed value: -{
      -  "description": "File format the job renders to",
      -  "enum": [
      -    "png",
      -    "jpeg",
      -    "webp",
      -    "pdf",
      -    "mp4",
      -    "gif",
      -    "webm",
      -    "mov"
      -  ],
      -  "type": "string"
      -}
    • removedOutput schema / properties / outputKind
      Removed value: -{
      -  "description": "image for still renders (png, jpeg, webp, pdf); video for mp4, gif, webm or mov",
      -  "enum": [
      -    "image",
      -    "video"
      -  ],
      -  "type": "string"
      -}
    • removedOutput schema / properties / pageId
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "format": "uuid",
      -      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • changedOutput schema / properties / status / description
      Previous value: -"pending waits for run_batch, processing is rendering, success has rendered, failed has a render error, cancelled was stopped by cancel_batch or cancel_job (final, not charged)"New value: +"processing while any job renders (get_job a few seconds later), pending while any waits for run_job, done when each has finished"
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "pending",
      -  "processing",
      -  "success",
      -  "failed",
      -  "cancelled"
      -]New value: +[
      +  "processing",
      +  "pending",
      +  "done"
      +]
    • removedOutput schema / properties / templateId
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "format": "uuid",
      -      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "id",
      -  "status",
      -  "batchId",
      -  "templateId",
      -  "pageId",
      -  "flowId",
      -  "outputKind",
      -  "outputFormat",
      -  "creditCost",
      -  "error",
      -  "output"
      -]New value: +[
      +  "status",
      +  "jobs"
      +]
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the billing model (creditCost charged on success only, failures free and retryable), the 30-second synchronous wait with a 'processing' fallback, and the idempotency/refusal behavior that prevents double charging. It also names the two required permissions, which the annotations cannot express.

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 action and scope, then cost, then timing, then refusal behavior, then prerequisites. It is dense and nearly every clause carries a distinct fact, though get_job is referenced twice with overlapping intent, which could be tightened.

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?

Covers the mutation's cost, timing, retry safety, blocking/async boundary, and authorization requirements, which is everything an agent needs for a spend-credits write tool. Since an output schema exists, the description is not obligated to enumerate return fields, and it still flags the 'processing' status.

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?

The single jobId parameter is already documented at 100% schema coverage with the same provenance note. The description adds real meaning by constraining which IDs are valid (pending or failed jobs only) and explaining that other states are rejected, which the schema does not say.

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 and resource with scope: 'Renders one pending or failed job on its own (from create_job, or get_batch_jobs).' It explicitly contrasts with run_batch, so an agent can separate the single-job and batch paths without opening either 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?

Gives explicit when-to-use rules and alternatives: use run_batch for a whole batch, use get_job after a 30-second timeout, and only call after the user agrees to the cost. It also states the exclusion case (already rendering/rendered/cancelled is refused), leaving little to inference.

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