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.

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": {
      "story_idea": "<story_idea>",
      "episode_length_seconds": "<episode_length_seconds>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "generate_script"
  }
}

Input 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.
video_modelNoVideo model for the project's clips: Seedance 2.5, Seedance 2.0 Fast (cheaper) or Kling 4.0. Defaults to Seedance 2.5.
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. Changed1 schema field changed
    • addedInput schema / properties / video_model
      Added value: +{
      +  "description": "Video model for the project's clips: Seedance 2.5, Seedance 2.0 Fast (cheaper) or Kling 4.0. Defaults to Seedance 2.5.",
      +  "enum": [
      +    "Seedance 2.5",
      +    "Seedance 2.0 Fast",
      +    "Kling 4.0"
      +  ],
      +  "type": "string"
      +}
  2. 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."
  3. 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."
  4. 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."
  5. 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."
  6. 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"
      +  }
      +]
  7. 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"
  8. 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
  9. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that credits are spent, that it seeds characters, locations, episodes, shots and segments, that job.output carries live progress fields (phase, completedEpisodes, totalEpisodes), and that it returns a job id to poll. For a non-destructive but expensive async mutation, that is exactly the context an agent needs before invoking.

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?

Five tight sentences, each carrying distinct information: what it does, what it does not do, live progress, side effects, cost, and next step. The most decision-critical fact (creates a new project) is front-loaded in the second clause.

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?

No output schema exists, yet the description explains the return value (job id), the progress channel (job.output), and the polling tool. Combined with cost and seeding side effects, nothing an agent needs to call this 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 already documents all ten parameters, including the idempotency-key retry semantics and enum meanings. The description adds only the negative constraint ('takes no project_id') and return-value pointer, so the baseline 3 is appropriate.

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 delimits scope: it creates a NEW project rather than editing one, and takes no project_id. That contrast with the edit/read siblings in the tool list is stated outright, so an agent can disambiguate 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 Guidelines4/5

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

Explicitly says when this applies (new project creation) and when it does not (editing an existing project), and tells the agent to follow up with get_job. It stops short of naming a specific alternative tool for post-creation editing, but the exclusion plus the polling hand-off covers the practical routing decisions.

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