read_script
Script is the editing surface for transcript-based editing: use it whenever the spoken words or their meaning decide what plays, is removed, kept, or reordered. That includes deleting spoken words, fillers, or verbal habits (e.g. [s1] 过去~~呢~~一个月); cutting or compressing a specific pause; removing failed retakes or duplicates; clips, highlights, short or multiple versions ("keep the part about pricing", "make a 30s version"); and pulling library transcript onto the timeline.
Not for: fixing ASR text (manage_transcript action fix); B-roll, MG, overlays, effects, transitions, or positions (edit_item); mechanical whole-track filler and pause cleanup (clean_script); timestamps for placing objects (find_transcript); read-only transcript excerpts or frames (inspect_asset). Do not use find_transcript + split_item / edit_item as a shortcut for a transcript-based cut.
This tool materializes timeline.md (the current cut of one speech track) and library/<filename>.md (full source transcripts). Workspace surfaces write them to disk: read and edit them with Read / Edit / Write (Codex plugin sessions: read_workspace_file / edit_workspace_file), then call apply_script(). External surfaces without a workspace get them returned inline: edit the text yourself and pass the full content back via apply_script({timelineMd}). The timelineMd parameter of apply_script defines the file format and edit syntax.
Loop: read_script → edit timeline.md (related replacements in one Edit; fix validation diagnostics in place) → apply_script → the file is re-materialized clean. Call read_script again after a stale-script error, to change track scope or showSilence; add refreshCache when the source transcript changed. Middle deletions or moves split clips; that is expected, so cover visible jump cuts afterwards if needed.
In chat, describe edits by their spoken content, never by [sN], [cN], [gap], or other internal addresses the user cannot see.
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": "read_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track | No | Optional timeline track alias/id. Omit for normal use so read_script picks the default speech track. Do not pass A1 just because the content has audio; use A1 only if preview_timeline shows an actual audio track alias. | |
| projectId | No | Project for this call (full ID or unambiguous prefix). Explicit-timeline calls never change the target of later calls; legacy project selection applies otherwise. | |
| timelineId | No | ||
| showSilence | No | Opt-in: include `[silence=Ns]` markers in the materialized files for precise manual pause edits. Default false. Hidden silence markers do not prevent batch pause cleanup: use `clean_script` for whole-track or bulk silence compression/restoration. Turn this on only when you need to inspect or manually adjust specific pause durations. | |
| refreshCache | No | Bypass and replace the task-local transcript cache before materializing Script. Use after transcript data changed or when explicitly checking fresh ASR data. |