Skip to main content
Glama

Generate script

generate_script

Write a full multi-episode script from a story premise. This CREATES A NEW PROJECT — it does not edit an existing one, and it takes no project_id. While the job runs, job.output carries live progress (phase, completedEpisodes, totalEpisodes). On success the new project also has its characters, locations, episodes, shots and segments seeded, ready for the other tools. Spends credits. Returns a job id — poll it with get_job.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
genreNoGenre label. Omit to let the story set it.
languageNoLanguage for dialogue, voiceover and on-screen text. Omit to use the language the story asks for.
story_ideaYesThe story premise to write from.
screen_ratioNoAspect ratio.9:16
visual_styleNoVisual style. Defaults to Realistic TV Drama.
episode_countNoHow many episodes to write. null to let the model choose.
idempotency_keyYesStable key identifying this generation request. Reuse the SAME key when retrying the same request — the original job is returned and no second charge is made. Use a NEW key when you deliberately want another generation.
target_platformNoPlatform the episodes are cut for.TikTok
episode_length_secondsYesTarget length of each episode, in seconds. null to let the model choose.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / language / default
      Removed value: -"English"
    • changedInput schema / properties / language / description
      Previous value: -"Language to write in."New value: +"Language for dialogue, voiceover and on-screen text. Omit to use the language the story asks for."
  2. Changed2 schema fields changed
    • removedInput schema / properties / genre / default
      Removed value: -"Vertical Drama"
    • changedInput schema / properties / genre / description
      Previous value: -"Genre label."New value: +"Genre label. Omit to let the story set it."
  3. Changed2 schema fields changed
    • addedInput schema / properties / genre / default
      Added value: +"Vertical Drama"
    • changedInput schema / properties / genre / description
      Previous value: -"Genre label. Omit to let the story set it."New value: +"Genre label."
  4. Changed2 schema fields changed
    • removedInput schema / properties / genre / default
      Removed value: -"Vertical Drama"
    • changedInput schema / properties / genre / description
      Previous value: -"Genre label."New value: +"Genre label. Omit to let the story set it."
  5. Changed1 schema field changed
    • changedInput schema / properties / episode_length_seconds / anyOf
      Previous value: -[
      -  {
      -    "exclusiveMinimum": 0,
      -    "maximum": 600,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 300,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  6. Changed10 schema fields changed
    • addedInput schema / properties / episode_count / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 3,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / episode_count / description
      Previous value: -"How many episodes to write."New value: +"How many episodes to write. null to let the model choose."
    • removedInput schema / properties / episode_count / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / episode_count / maximum
      Removed value: -3
    • removedInput schema / properties / episode_count / type
      Removed value: -"integer"
    • addedInput schema / properties / episode_length_seconds / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 600,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / episode_length_seconds / description
      Previous value: -"Target length of each episode, in seconds."New value: +"Target length of each episode, in seconds. null to let the model choose."
    • removedInput schema / properties / episode_length_seconds / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / episode_length_seconds / maximum
      Removed value: -600
    • removedInput schema / properties / episode_length_seconds / type
      Removed value: -"integer"
  7. Changed2 schema fields changed
    • changedInput schema / properties / episode_count / default
      Previous value: -10New value: +3
    • changedInput schema / properties / episode_count / maximum
      Previous value: -60New value: +3
  8. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, destructive=false). It discloses cost ('Spends credits'), a side effect ('characters, locations, episodes, shots and segments seeded'), live progress via job.output fields (phase, completedEpisodes, totalEpisodes), and the async return contract (job id). This is rich behavioral context.

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?

Every sentence earns its place: creation semantics, progress reporting, seeding of dependent entities, cost, and return contract. Front-loaded with the core purpose and no 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?

Although there is no output schema, the description explains the return value (a job id), how to poll it, and what the job surfaces during and after execution. For a credit-spending async generator, nothing an agent needs to invoke and follow up correctly is missing.

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 fully documents all nine parameters including the detailed idempotency_key semantics. The description adds only the negative constraint ('no project_id') and doesn't enrich parameter meaning further, so the baseline 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 ('Write a full multi-episode script from a story premise') and immediately clarifies the scope change versus siblings: it CREATES a new project rather than editing one. An agent can distinguish it from update_* and get_project tools without opening a 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 explicit when-to-use (writing a script from a premise), when-not-to-use ('does not edit an existing one, takes no project_id'), and routes the agent to the correct follow-up tool ('poll it with get_job'). This is exactly the routing an agent needs.

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