Skip to main content
Glama

Save Replay

save_replay
Destructive

Export the last N seconds from an active replay buffer to an MP4 file while continuing to record, letting you preserve recent screen activity without stopping the session.

Instructions

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

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.
overwriteNoAllow replacing an existing file at the output path (default false).
sessionIdYesSession id of a replay buffer.

Output Schema

NameRequiredDescriptionDefault
sessionIdYes
outputPathYes
durationSecYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.47.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent, and the description adds the crucial behavioral fact that 'the buffer keeps running' after a save — i.e., the source buffer is not consumed even though the output file is written. It stops short of warning about overwriting existing files, which the schema covers but the description does not reinforce.

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 front-loaded sentence plus a semicolon clause carrying the one non-obvious behavior. No filler, no restating of the title.

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 five-parameter tool with full schema coverage, an output schema, and rich annotations, the description covers the essential prerequisite and the post-call buffer state. A brief note on overwrite behavior and failure when no buffer exists would make it complete.

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 the schema already explains lastSec, output, reencode, overwrite and sessionId in detail. The description only echoes the 'last N seconds' notion of lastSec and adds no format, default, or interaction detail beyond the structured fields.

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 (save) and resource (last N seconds of a replay buffer) and names the exact artifact produced (mp4). It also ties the tool to the enabling call (start_recording replayBufferSec), so an agent can distinguish it from trim/clip/stop_recording siblings.

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 parenthetical '(start_recording replayBufferSec)' implies a replay buffer must already exist, which is useful usage context. But it never states when to choose this over the many siblings (clip, trim, concat, stop_recording) or what to do if no buffer is running.

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