Skip to main content
Glama

Fit a script to a length

fit_to_duration
Read-only

Plan how to hit a target script length: get a word budget, words to cut or add, per-section timing, and ranked cut candidates with seconds saved. Does not rewrite content.

Instructions

Plan how to hit a target length (e.g. 15, 30, 60 or 90 seconds): word budget, how many words to cut or add, a per-section budget, the pace that would fit as-is, and ranked cut candidates — filler words, wordy phrases and the longest sentences — with the seconds each would save. Does not rewrite creative content; use trim_fillers for safe automatic cuts.

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": {
      "target_seconds": "<target_seconds>"
    },
    "name": "fit_to_duration"
  }
}

Input Schema

NameRequiredDescriptionDefault
wpmNoCustom words per minute (overrides pace). Measure yours with estimate_duration + actual_seconds.
paceNoslow 130 · conversational 150 · energetic 170 (typical Reels/TikTok) · fast 190 words per minute.energetic
pathNoOr a local .txt / .md file. ~ is expanded.
textNoThe script text.
keep_sectionsNoSections that must not be cut (e.g. ["Hook", "CTA"]); their time is reserved first.
target_secondsYesTarget length in seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior3/5

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

readOnlyHint=true, so the mutation-behavior bar is essentially satisfied by the caller's schema, freeing the description to spend its words defining output. The width of the response makes up for the missing overview. That said, the return-value description is complete enough.

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?

Front-loaded with the verb and a list of outputs, then a final exclusion sentence: both earn their place. No hedging, no restated parameter definitions.

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 read-only tool with no output schema and six fully documented parameters, this covers the return shape, scope, and the sibling split. An agent could call it correctly from this definition alone.

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 coverage is 100%, so parameter meaning is already well documented (pace enum incl. numeric WPMs, wpm override, keep_sections reserving time). Baseline 3 is therefore sufficient and acceptable; adding a sentence on how to interpret the planner's output would push it higher.

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+resource: 'Plan how to hit a target length', then enumerates exactly what the plan contains (word budget, cut/add counts, per-section budget, pace that fits as-is, ranked cut candidates). The scope ('e.g. 15, 30, 60 or 90 seconds') and the negative clause 'Does not rewrite creative content' separate it cleanly from trim_fillers.

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?

Explicit when-not plus named alternative: 'Does not rewrite creative content; use trim_fillers for safe automatic cuts.' Combined with the logistics/rewrite distinction, an agent can pick between this planner and the fixer sibling without ambiguity. The only gap is it doesn't contrast with estimate_duration, a minor omission.

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