Skip to main content
Glama

Save Replay

save_replay
Destructive

Save the last N seconds of a running replay buffer to an MP4, preserving a recent screen segment while the buffer keeps recording.

Instructions

Save the last N seconds of a replay buffer (start_recording replayBufferSec) to an mp4; the buffer keeps running.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "save_replay"
  }
}

Input Schema

NameRequiredDescriptionDefault
outputNoOutput .mp4 path (default under SCREENCAST_HOME/recordings).
lastSecNoSeconds back from now (default and max: the buffer length).
reencodeNoFrame-exact re-encode. Default: instant stream copy that may hide up to 2 s of earlier frames.
overwriteNoReplace an existing output.
sessionIdYesSession id of a replay buffer.

Output Schema

NameRequiredDescriptionDefault
sessionIdYes
outputPathYes
durationSecYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.54.0
    • changedInput schema / properties / overwrite / description
      Previous value: -"Allow replacing an existing file at the output path (default false)."New value: +"Replace an existing output."
  2. Addedv0.47.0

TDQS

A3.8/5.0
Behavior4/5

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

Adds the non-obvious behavioral detail that the buffer keeps running after saving, which is not conveyed by annotations or schema. It does not restate overwrite/destructive behavior, but annotations already declare destructiveHint=true and the schema documents the overwrite parameter.

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?

A single compact sentence front-loads the action, followed by a parenthetical that clarifies the prerequisite context. There is no redundant wording or unnecessary explanation.

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?

The tool has an output schema, so the description does not need to explain return values. It covers the core action, the important persistence behavior of the buffer, and the relationship to start_recording; remaining safety and default details are handled by annotations and schema.

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%, with all five parameters described in the schema, including output, lastSec, reencode tradeoff, overwrite, and sessionId. The description only reinforces the buffer-length relationship for lastSec, so parameter semantics are adequately handled by the schema rather than the description.

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: save the last N seconds of a replay buffer to an mp4. The parenthetical ties it to start_recording replayBufferSec, making the applicable context clear. It does not explicitly name alternatives, but the core action is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The mention of start_recording replayBufferSec implies that an active replay buffer is required, which is useful context. However, there is no explicit when-not-to-use guidance, prerequisite statement, or comparison to related tools like clip or export.

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