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.Vertical Drama
languageNoLanguage to write in.English
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. 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"
  2. 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
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and destructiveHint=false, but the description adds substantial behavioral context: it spends credits, returns a job id to poll with get_job, streams live progress (phase, completedEpisodes, totalEpisodes) in job.output, and seeds the new project with characters, locations, episodes, shots, and segments. No contradiction with annotations; the description goes well beyond them.

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?

Three sentences, no filler. The description front-loads the primary purpose, then quickly clarifies the creation vs. editing distinction, then covers async behavior, side effects, cost, and return. Every sentence earns its place and the flow is logical.

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?

For a tool with 9 parameters, async behavior, and side effects that seed an entire project, the description is remarkably complete: it explains the creation semantics, the job lifecycle (progress and polling), the seeded entities, the credit cost, and the return value. Nothing an agent needs to call it correctly is missing, and the rich schema covers parameter details.

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 all nine parameters are already described in the schema. The description adds little parameter-specific meaning beyond what the schema provides—it mentions 'story premise' (matching story_idea) and the absence of project_id, but does not elaborate on the semantics of idempotency_key, episode_length_seconds, or visual_style beyond the schema. Given the high coverage, 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?

The description states a specific verb and resource ('Write a full multi-episode script from a story premise') and immediately distinguishes it from editing existing projects ('This CREATES A NEW PROJECT — it does not edit an existing one'). It clearly differentiates from sibling generation tools (image, music, clip generators) which do not create scripts.

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?

The description explicitly says it creates a new project and takes no project_id, which tells an agent when to use this tool (new script creation) vs. when not (editing an existing project). It does not name specific alternative tools, but the sibling list makes the distinction clear. The note 'ready for the other tools' implies downstream usage, which is helpful context.

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