Skip to main content
Glama

Edit a segment

segment_edit
Destructive

Change one segment without losing renders. 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; every part keeps the prompts and renders (copies, so each part can be changed and rendered on its own), and nothing is rendered or rewritten. Later segments renumber: read the storyboard again before more edits.

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": {
      "action": "<action>",
      "project_id": "<project_id>",
      "segment_number": "<segment_number>"
    },
    "name": "segment_edit"
  }
}

Input 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
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
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. Changed2 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"set_prompts: image_prompt, video_prompt and/or media_queries; set_continuation: continues_from; rollback: what, optional index; split: offsets_ms, optional inherit_index"New value: +"set_prompts: image_prompt, video_prompt and/or media_queries; set_continuation: continues_from; rollback: what, optional index; split: offsets_ms"
    • removedInput schema / properties / inherit_index
      Removed value: -{
      -  "default": 0,
      -  "description": "split: the part (0-based) that keeps the prompts and renders",
      -  "type": "integer"
      -}
  2. Added

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description discloses exactly what is and isn't destroyed: prompts are written verbatim with no AI rewrite, renders are preserved until re-rendered, split copies prompts and renders rather than deleting them, rollback is itself undoable, and later segments renumber. That is substantial behavioral context layered on top of the annotations.

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 in the first sentence, and the rest is action-by-action. Some per-action clauses run together (the split note is appended to the rollback line), making it denser than ideal, but no sentence is filler.

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 a 10-parameter mutation tool with no output schema, the description covers what each action does, what state is preserved, and the renumbering side effect, and it briefly notes 'Returns the changed segments.' It doesn't describe the returned structure in any detail, but the core decision-relevant information is present.

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 still adds meaning: 'write prompts verbatim, no AI rewrite', 'an EARLIER segment number; 0 clears the link', '1-3 ascending cut points, in ms'. These clarify intent rather than restate field types, though a few fields (media_queries, index) are left partly to the schema.

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 and resource ('Change one segment') plus a key guarantee ('without losing renders'), then enumerates the four actions it performs. It never names a sibling such as segment_restructure or storyboard_edit, so an agent must infer whether 'split' belongs here or there, which keeps it below a 5.

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 comes with its condition and follow-up ('set_prompts: ... render the segment again'; 'set_continuation: ... render the image again'; 'rollback: restore one of the last 5 renders'), and it warns to re-read the storyboard after a split. It stops short of explicit when-not-to-use guidance or directing the agent to a specific alternative sibling.

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