Skip to main content
Glama

Generate image or video

generate

Starts a job and reserves its credits; they are refunded in full if the job fails or is blocked. Call get_price first. prompt_mode "auto" (default) lets Tevyon write the prompt for the model from the user's idea; "exact" sends your own finished prompt unchanged (up to the model's maxLength in list_models). Pass wait_seconds to wait for the result in this call, else poll get_job. idempotency_key is required: a new unique string (e.g. a UUID) per intended job, the same one only to retry it, so that a retried call never starts or charges a job twice. Pass max_credits (the credits from get_price) so the job only starts at the price you showed the user.

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": {
      "job_type": "<job_type>",
      "params": "<params>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsYesParameters by the model's schema from list_models; prompt is required.
based_onNoId of a draft job (or the first format of a set) whose written prompt this job reuses, so the final keeps the draft's look.
job_typeYesFrom list_models.
consent_idNoJobs with real people (Face Swap, Character Swap, talking photo, Lip-Sync with an own photo): the consent_id from request_consent, after the user confirmed in Tevyon.
max_creditsNoThe credits from get_price. The job does not start if it now costs more.
prompt_modeNoauto
webhook_urlNoAn https address that gets the finished job as a POST (job.finished, signed with webhook_secret from get_account), instead of polling get_job.
wait_secondsNoSeconds to wait for the job to finish (0 to 50).
idempotency_keyYesA new unique string per intended job, e.g. a UUID. Reuse it only to retry that job.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: credits are reserved and refunded in full on failure or block, max_credits prevents a job starting at a higher price than quoted, and the idempotency key prevents double-start/double-charge on retry. These are real operational traits (billing, retry safety, price drift) not derivable from readOnlyHint/destructiveHint/idempotentHint flags. Nothing contradicts the annotations — the key-based retry safety is consistent with idempotentHint=false meaning the tool is not naturally idempotent without the supplied key.

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?

Front-loads the most consequential fact (credit reservation and refund policy) in the first sentence, then sequences prerequisites, mode choice, result delivery, idempotency, and price guard. Dense but with zero filler — every clause communicates a distinct constraint the caller must respect.

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 9-parameter, credit-consuming, nested-params mutation with no output schema, the description covers the failure modes that matter most: cost, prerequisites, retry safety, and result retrieval. It leaves based_on, consent_id, and webhook_url to the schema, which documents them adequately at 89% coverage. Slightly incomplete in not summarizing what a successful call returns (a job id to feed to get_job), which the caller must infer.

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 89%, so the schema already carries most parameter documentation; the description still adds genuine meaning for the highest-risk parameters. It explains prompt_mode's 'auto' vs 'exact' semantics and the maxLength constraint, the idempotency_key reuse rule, max_credits as a price guard, and wait_seconds as an alternative to polling. It does not cover based_on or consent_id, but the schema descriptions for those are already detailed.

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?

Opens with a specific verb and effect: 'Starts a job and reserves its credits', and the surrounding sentences (prompt_mode, model maxLength, list_models) make clear this is the model-driven image/video generation entry point. It is distinguishable from siblings like get_price, get_job, and list_models because it names them as separate steps. It stops short of explicitly naming images/videos in the description text (that lives in the title), so it is clear rather than maximally self-contained.

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 an explicit prerequisite ('Call get_price first'), explicit alternatives for receiving the result ('Pass wait_seconds to wait for the result in this call, else poll get_job', plus webhook_url in the schema), and explicit selection guidance for prompt_mode ('auto' default vs 'exact'). It also explains the required idempotency_key contract — a new key per intended job, reuse only to retry — which is exactly the kind of when-to-use rule an agent would otherwise get wrong.

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