Skip to main content
Glama

Run a preset

run_preset

Starts a preset on the user's photo and reserves its credits; they are refunded in full if the job fails or is blocked. The photo must be the user's own upload (create_upload or import_image). If people are shown in it, ask the user first whether everyone shown agreed to appear in the clip; pass consent true only then (it is always required). Pass max_credits (the credits from list_presets or ask_director) so the job only starts at the price you showed. idempotency_key is required: a new unique string per intended run, the same one only to retry it. Pass wait_seconds or poll get_job; clips take minutes.

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": {
      "preset_id": "<preset_id>",
      "image": "<image>",
      "consent": "<consent>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "run_preset"
  }
}

Input Schema

NameRequiredDescriptionDefault
wishNoA short extra wish in the user's words, e.g. «with a red cape». Required for a preset with line: the exact words spoken in the clip (up to 120 characters).
imageYesThe user's photo: the path from create_upload or import_image (/api/media/uploads/…).
consentYestrue only if the user confirmed that everyone shown in the photo agreed to appear in the clip (or nobody is shown).
preset_idYesFrom list_presets or a preset proposal of ask_director.
max_creditsNoThe credits from list_presets. The job does not start if it now costs more.
wait_secondsNoSeconds to wait for the job to finish (0 to 50).
idempotency_keyYesA new unique string per intended run, e.g. a UUID. Reuse it only to retry that run.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only state it is not read-only, not destructive, and not idempotent; the description goes well beyond them by disclosing the credit reservation and full-refund policy on failure or blocking, the consent gate, the cost-ceiling behavior of max_credits, and the minutes-long latency. Those are exactly the side-effect and timing facts an agent needs before committing credits.

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?

Dense and front-loaded: the action and credit consequence come first, then the photo/consent preconditions, then pricing and retry semantics, then latency. Every sentence carries a constraint the agent would otherwise get wrong; there is no filler.

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 seven-parameter credit-spending mutation with no output schema, the description covers preconditions, safety consent, cost capping, retry semantics, and duration. The one gap is that it never states what is returned (presumably a job identifier), which matters because it tells the agent to poll get_job without saying what to poll with.

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?

Schema coverage is 100%, so parameters are already documented, but the description adds workflow meaning the schema lacks: max_credits should be the figure shown to the user so the job only starts at that price, and idempotency_key must be new per run and reused only for retries. The consent and image-origin constraints are reinforced rather than new, which keeps it below a 5.

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?

Opens with a precise verb and resource: 'Starts a preset on the user's photo and reserves its credits.' It also implicitly separates itself from list_presets (price lookup) and ask_director (preset proposal) by naming them as sources of preset_id/credits, so an agent can route 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 Guidelines5/5

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

Gives concrete when-to-use prerequisites: the photo must come from create_upload or import_image, and the agent must ask the user about consent before passing consent=true. It also prescribes the alternative to waiting ('Pass wait_seconds or poll get_job'), covering the main branching decision in the workflow.

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