Skip to main content
Glama

Edit a segment

segment_edit

Change one segment without losing renders; only split spends credits. Returns the changed segments.

set_prompts: write prompts verbatim, no AI rewrite. The renders stay as they are: render the segment again to apply the new prompts. set_continuation: make this segment's image continue an earlier one's (same composition, only the change); render the image again. rollback: restore one of the last 5 renders of the image or clip; the current one takes its place, so it can be undone, and the prompt editor's model stays as it is. split: cut into 2-4 parts; the inheriting part keeps the prompts and renders; the others start empty and get prompts written from their narration in the background (spends credits), or give them prompts with set_prompts. Later segments renumber: read the storyboard again before more edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
whatNorollback: restore the image or the clip
indexNorollback: which earlier render, 0 = the latest
actionYesset_prompts: image_prompt, video_prompt and/or media_queries; set_continuation: continues_from; rollback: what, optional index; split: offsets_ms, optional inherit_index
offsets_msNosplit: 1-3 ascending cut points, in ms from the segment's start; word timings: voiceover_read action=blocks include_subtitle_data=true
project_idYesProject id
image_promptNoset_prompts: the image prompt
video_promptNoset_prompts: the motion used when the image is animated
inherit_indexNosplit: the part (0-based) that keeps the prompts and renders
media_queriesNoset_prompts: searches for a real photo or B-roll
continues_fromNoset_continuation: an EARLIER segment number; 0 clears the link
segment_numberYesSegment number (1-based, from storyboard_read)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the annotations: 'only split spends credits', set_prompts leaves renders unchanged until re-rendered, rollback is itself undoable and preserves the prompt-editor model, split leaves non-inheriting parts empty and auto-writes prompts from narration (spending credits), and later segments renumber requiring a fresh storyboard read. That is exactly the side-effect and cost disclosure an agent needs.

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?

The lead sentence front-loads the key constraint (no render loss except split) and the 'Returns the changed segments' clause covers the absent output schema. The action paragraphs are dense but each earns its place; a bulleted structure would read better than the current run-on lines.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter, four-action mutation tool with no output schema, the description covers costs, reversibility, ordering side effects (renumbering), and the return value. The main omission is any routing guidance versus segment_restructure and storyboard_edit.

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 100%, so baseline is 3, but the description adds meaning the schema does not: it links each action to its parameters conceptually (e.g., the inherited part keeping prompts for inherit_index, continuation meaning 'same composition, only the change') and clarifies that split inheritors 'start empty' until prompts are written.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Change one segment') and then enumerates four distinct actions (set_prompts, set_continuation, rollback, split) with their effects, so an agent understands the tool's scope well. It does not differentiate itself from the sibling segment_restructure, which is the only real gap.

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?

Each action carries its own when-to-use context: set_prompts for verbatim prompt writes with unchanged renders, set_continuation for chaining an earlier image, rollback for undoing to one of the last 5 renders, split for cutting into 2-4 parts. It never names an alternative sibling tool or states when NOT to use this one, so it falls short of a 5.

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