Skip to main content
Glama

Create generation task

create_task
Destructive

Submit an image or video generation task with an approved USD spending cap and idempotency key, reserving balance and returning a taskId to poll until success or failure.

Instructions

Submit one generation task. RESERVES USD BALANCE and calls an upstream provider. Returns a taskId; poll get_task until status is success or fail. Call prepare_generation first and pass its expectedRevision, the approved maxCostUsd and a stable idempotencyKey. Pass maxCostUsd to reject a reservation above the approved budget.

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": {
      "modelId": "<modelId>",
      "inputs": "<inputs>",
      "maxCostUsd": "<maxCostUsd>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "create_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYesModel inputs; see get_model_params.
replayNoReplay an uncertain submission with its original key, inputs and budget.
autoFixNoProvider-specific prompt auto-fix opt-out.
modelIdYesPublic modelId from list_models.
maxCostUsdYesReject the task if the charged USD would exceed this decimal string.
callBackUrlNoOptional webhook URL for completion.
recoveryScopeNoFor a new OAuth submission, enable recovery only within this client connection. Preserve this value on replay.
idempotencyKeyYesStable key for retries of the same logical request.
expectedRevisionNoModel revision returned by prepare_generation. Reject a different published revision.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag openWorldHint=true and destructiveHint=true, and the description goes well beyond them by disclosing the financial side effect (it RESERVES USD BALANCE and charges via an upstream provider), the asynchronous completion model (returns a taskId, poll until success or fail), and that maxCostUsd acts as a server-side budget guard. The idempotencyKey requirement also reconciles with idempotentHint=false by telling the caller how to make retries safe rather than implying the tool is automatically idempotent.

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?

Five short sentences, front-loaded with the action and the money-reservation warning before the procedural details. Every clause carries information an agent needs: side effect, return value, polling target, prerequisites, and budget guard.

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 costly, destructive, async mutation with no output schema, the definition covers the essential contract: what it costs, what it returns, how to wait for completion, and what to prepare first. It stops short of saying what happens to the reserved balance if the task fails or how failures surface in get_task, which is the one gap an agent might care about.

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 100%, so the schema already documents all nine parameters, including expectedRevision, maxCostUsd and idempotencyKey. The description adds useful cross-parameter context (that expectedRevision and maxCostUsd come from prepare_generation and that maxCostUsd rejects an over-budget reservation) but says nothing about inputs, replay, autoFix, callBackUrl or recoveryScope, so the baseline of 3 applies.

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 ("Submit one generation task") and immediately characterizes what that entails: reserving USD balance, calling an upstream provider, and returning a taskId. It also names the two sibling tools that bracket it in the workflow (prepare_generation before, get_task after), so an agent can distinguish it from them without opening any schema.

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

Usage Guidelines4/5

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

Gives a clear prerequisite chain: call prepare_generation first, pass its expectedRevision, an approved maxCostUsd and a stable idempotencyKey, then poll get_task until success or fail. That is strong procedural guidance, but it never states a when-not condition (for example, that a replay retry should use the replay flag and original key rather than a fresh submission), so the exclusion side is left implicit.

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