Skip to main content
Glama

Write a story cast (free draft)

generate_cast

Writes the CAST for an AI Video Story series (named characters, each with a role and a one-line description) as a DRAFT for the user to read. FREE: it spends no tokens, generates no portraits and saves nothing to the character library. WHEN: as soon as the episode idea is settled, on a series whose cast.required is true (or whose user wants custom characters). Do NOT ask permission. Never call it for a cast.writer_owned series, which casts itself. WHAT IT RUNS: a showrunner model reads the series and your idea and answers with the cast that idea needs; IT DOES NOT WRITE THE STORY. The response's idea is the one you sent, unchanged (translated if needed); with NO idea the call authors a logline and returns that, which the user has not seen: show it and ask whether to keep it. AFTER: show the roster and handle a dislike as the story-episode recipe, step 5 says (a re-draft is free and replaces it); never present their own idea back as news. THE PRICE OF THE NEXT STEP RIDES THIS RESPONSE: portraits_needed (the members whose needs_portrait is true; a preset-bound member arrives photographed and costs nothing) and portrait_models, each with per_portrait_tokens and the roster's total_tokens (default: true is what the series is tuned for). Use those figures verbatim; never multiply anything yourself. generate_cast_portraits with this draft_id is the money step (the draft stays redeemable about two hours). WEBAPP-ONLY: renaming a member, adding your own, adding one from a photo. Never re-draft the whole cast for one member: once portraits are bought, describe_cast_member changes what one member IS. A 400 invalid_request for a series that ships its own FIXED cast, casts itself or has no cast-first flow means: go straight to generate_story_video without a cast. A 429 utility_rate_limited is the free AI-writing allowance shared with the webapp: wait the retry-after, never top up tokens.

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": {
      "series_id": "<series_id>"
    },
    "name": "generate_cast"
  }
}

Input Schema

NameRequiredDescriptionDefault
ideaNoThe episode idea the cast should serve, one short paragraph: pass the user's idea whenever there is one. Only when omitted does the writer author a logline.
worldNoThe visual world for the cast (`fruits`, `humans`, `animals`). Unset lets the writer pick.
languageNoOmit unless the user asked for another language (the series' `defaults.language` is used). Pass the SAME language to `generate_story_video`.
series_idYesThe series id, exactly as `list_series` returns it.

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?

Goes far beyond the annotations: it discloses that the call is free, spends no tokens, generates no portraits and saves nothing to the character library, that a showrunner model reads the series plus the idea, and that the draft stays redeemable for about two hours. It also surfaces rate-limit and error semantics (utility_rate_limited shared with the webapp) that no annotation field conveys. The free-draft framing is consistent with readOnlyHint=false, since a draft resource is still created.

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 purpose, then WHEN, WHAT IT RUNS, AFTER, cost figures, and failure modes, using caps labels that make it skimmable. It is dense and covers many topics (pricing, webapp-only limits, two error codes), but nearly every clause is actionable rather than filler.

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?

There is no output schema, yet the description explains the response shape: the echoed 'idea', 'portraits_needed', 'portrait_models' with per_portrait_tokens and total_tokens, and the 'draft_id' needed for the paid next step. Combined with the post-call workflow guidance, an agent has everything required to call it and act on the result.

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 the baseline is 3, but the description adds real meaning: it explains the consequence of omitting 'idea' (a logline is authored and returned unseen, which must be shown to the user) and that the language must match the one passed to generate_story_video. The 'world' and 'language' behavior is left to the schema, which already documents it adequately.

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 ('Writes the CAST for an AI Video Story series'), defines what a cast is (named characters with role and one-line description), and scopes the output as a DRAFT. It is immediately distinguishable from siblings like generate_cast_portraits, describe_cast_member and generate_story_video, which are all named in the text.

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 trigger conditions ('as soon as the episode idea is settled, on a series whose cast.required is true'), an explicit exclusion ('Never call it for a cast.writer_owned series'), and a permission instruction ('Do NOT ask permission'). It also routes failure cases: a 400 invalid_request means skip the cast and call generate_story_video, and a 429 means wait the retry-after rather than topping up tokens.

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.