Skip to main content
Glama

Generate the cast's portraits (paid)

generate_cast_portraits
Destructive

BUYS the portraits for a cast draft: one image generation per member that still needs a face, at the chosen image model's rate, then saves every member to the user's character library. The cast's paid step (the webapp's 'Generate cast' button). WHEN: the user has READ the draft from generate_cast, accepted it, and said go to the price. Take the figures from the draft's own portrait_models (per_portrait_tokens, total_tokens), never from memory (a cast portrait prices differently from an ordinary image): 'portraits: 3 on = <total_tokens> T, or at <per_portrait_tokens> each. Go?'. estimate_only: true re-prices against the CURRENT catalog if the draft has sat a while. OFFER THE IMAGE MODEL ONCE, in a line you are already writing (not an interview): name the model that draws the pictures in plain words with its default and price; no preference means the series' default. THE CARD: this call already put the aicut cast card up, each portrait filling in as it generates: do not poll or call show_generation (one get_image read of portrait_image_id if asked). No card (a terminal)? Poll each generating member's portrait_image_id with wait_for_generation (media image) and give the urls. AFTER: portraits generate asynchronously, only for members that needed one. portrait_status: "ready" with a null portrait_image_id was NOT generated and NOT charged (it arrived photographed, or already had a face): not missing. A member whose id is null could not be saved and cannot be a cast_member_id. charged_tokens is what moved. One face wrong: regenerate_cast_portrait; one CHARACTER wrong: describe_cast_member; a fresh generate_cast is a different cast and a new charge. THE DRAFT IS SPENT once this succeeds: a repeat with the same draft_id answers 404 cast_draft_not_found or a 201 with charged_tokens: 0 (nothing bought): report it as 'already done', never as a second purchase. IF IT REFUSES PART WAY (402 or a cap): the portraits already generated WERE charged (partial_cast: true, portraits_minted, charged_tokens): tell the user that number, never 'nothing was charged'. Retrying the SAME draft_id generates and charges only the missing members. A 400 naming draft_id means what you passed is not a cast draft id (a job id, a member id): re-read generate_cast's response; there is no other route to a draft. SPENDS TOKENS: price with estimate_only: true, ask in the SAME message as the price, and wait for a go that names THIS purchase (SPENDING RULES, this server's instructions).

Input Schema

NameRequiredDescriptionDefault
draft_idYesThe `draft_id` from `generate_cast`.
estimate_onlyNoPrice only; creates nothing.
portrait_modelNoOne of the draft's `portrait_models` ids. It draws the faces: name it with the price (see OFFER THE IMAGE MODEL), then omit it if the user has no preference (`default: true` is what the series is tuned for).

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 declare destructive/not-idempotent/openWorld, and the description builds on that with real behavioral context: async generation, per-member charging, partial-charge semantics on 402 (`partial_cast`, `portraits_minted`, `charged_tokens`), the spent-draft 404/201-zero behavior on retry, and the null-`portrait_image_id` non-charge case. This far exceeds what annotations convey and is fully consistent with them.

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?

Purpose is front-loaded and the dense text is largely earned given the billing and partial-failure complexity. It is long and reads as a wall of caps-laden instructions, with some redundancy (the 'never nothing was charged' point restated), but almost every sentence carries operationally necessary information for a paid, destructive tool.

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?

With no output schema and a complex, paid, async, destructive operation, the description covers all an agent needs: return-state semantics (`portrait_status`, null ids, `charged_tokens`), card vs terminal polling, retry/idempotency behavior, and error codes. Nothing essential is missing.

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 baseline is 3; the description adds meaning beyond the schema by explaining that `estimate_only: true` re-prices against the CURRENT catalog and by giving the OFFER-THE-IMAGE-MODEL protocol for `portrait_model` (default if no preference). These sharpen invocation but do not add syntax/format detail the schema lacks.

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 ('BUYS the portraits for a cast draft'), the per-member scope, the pricing basis, and the side effect of saving to the character library. It clearly distinguishes itself from generate_cast (reads the draft) and regenerate_cast_portrait (fixes one face), both named explicitly.

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?

Explicit WHEN precondition (draft read, accepted, user said go to the price), an explicit exclusion from poll/show_generation, and named alternatives for each failure mode: regenerate_cast_portrait for one wrong face, describe_cast_member for a wrong character, fresh generate_cast for a new cast. Nothing is left 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.

Directories

Listed in ChatGPT · aicut

Last observed