Skip to main content
Glama

write_script

Write script lines from your own text, full script, or a topic, then place them into film scene shots in order with captions and optional new shots.

Instructions

Put a script in the film, the way Sound and script does. Give your own lines (short, 5-15 words, one shot each), or text (a whole script, cut into lines at sentences), or only a topic (Dinoctor's Claude writes it; uses the person's own Claude Code and can take a few minutes, so say so first). Unless put_in_film is false, lines go into a scene: shots there without a voice take lines in order, and each line left over becomes a new shot sized to it. Captions show a line's words until it has a voice. replace: false adds to the script. One undo step. Returns the lines and shots. To make the voices, call speak next; to give one shot one line, use assign_line.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "write_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
fitNoExisting shots that take a line get the line's length (default true).
textNoA whole script to cut into lines at sentences.
toneNoFor a topic: the tone, like 'funny' or 'calm documentary'.
linesNoYour own lines, in order: plain strings or { text, feeling }.
sceneNoScene index from 0. Default: the scene on screen.
titleNoThe script's title.
topicNoOnly a topic: Dinoctor's Claude writes the script.
replaceNofalse: add to the script instead of replacing it. Default true.
secondsNoFor a topic: how long the film is (default 60).
captionsNoShow captions of the lines (default true).
new_shotsNofalse: leftover lines wait instead of becoming new shots.
put_in_filmNofalse: only keep the lines in the script, don't touch shots. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.1.2
    • addedInput schema / properties / captions / description
      Added value: +"Show captions of the lines (default true)."
    • addedInput schema / properties / lines / description
      Added value: +"Your own lines, in order: plain strings or { text, feeling }."
    • changedInput schema / properties / lines / items / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "feeling": {
      -        "enum": [
      -          "neutral",
      -          "calm",
      -          "warm",
      -          "serious",
      -          "excited",
      -          "playful",
      -          "sad",
      -          "tense"
      -        ],
      -        "type": "string"
      -      },
      -      "text": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "text"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "feeling": {
      +        "description": "How it's said.",
      +        "enum": [
      +          "neutral",
      +          "calm",
      +          "warm",
      +          "serious",
      +          "excited",
      +          "playful",
      +          "sad",
      +          "tense"
      +        ],
      +        "type": "string"
      +      },
      +      "text": {
      +        "description": "The line.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "text"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / put_in_film / description
      Added value: +"false: only keep the lines in the script, don't touch shots. Default true."
    • addedInput schema / properties / replace / description
      Added value: +"false: add to the script instead of replacing it. Default true."
    • addedInput schema / properties / text / description
      Added value: +"A whole script to cut into lines at sentences."
    • addedInput schema / properties / title / description
      Added value: +"The script's title."
    • addedInput schema / properties / tone / description
      Added value: +"For a topic: the tone, like 'funny' or 'calm documentary'."
    • addedInput schema / properties / topic / description
      Added value: +"Only a topic: Dinoctor's Claude writes the script."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Well beyond the annotations, which only declare it a non-idempotent, non-destructive mutation: the description discloses that lines fill voiceless shots in order, leftovers become new shots sized to the line, captions display a line's words until it has a voice, and there is exactly 'One undo step'. The one gap is it doesn't state what a partial failure or undo-of-undo looks like, but the mutation and latency profile is otherwise very clear.

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 nearly every sentence carries load-bearing information (undo, latency warning, caption behavior, alternatives). The style is dense and run-on with parenthetical asides, and the opening qualifier 'the way Sound and script does' adds noise rather than information.

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 12-parameter mutation tool with no output schema, the definition covers purpose, modes, mutation semantics, latency, undo, return payload ('Returns the lines and shots') and next-step siblings. An agent has everything needed to call it correctly and to warn the user about the topic-mode delay.

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 already 100%, yet the description adds cross-parameter behavior the schema cannot express: how put_in_film interacts with existing voiceless shots and overflow new shots, how replace:false appends, and how a line's length drives shot sizing via fit. It says nothing extra about tone or seconds, which the schema already covers 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?

The first sentence names a concrete verb and resource ('Put a script in the film') and the definition immediately enumerates the three supported input modes: own lines, whole text, or topic-only generation. It also distinguishes itself from siblings by naming assign_line for the one-shot-one-line case and speak for voice generation.

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?

It routes the agent explicitly: use this tool for a whole script, use assign_line to give one shot one line, call speak afterwards to produce voices. It also states the pre-call condition for the topic mode ('can take a few minutes, so say so first') and the modifier behavior of replace:false and put_in_film:false.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.