stream_list
List active and completed stream sessions from the screenshot process to monitor and manage ongoing captures.
Instructions
List active and completed stream sessions known to this process.
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": "stream_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/stream.ts:128-139 (handler)The listStreams() function is the handler/implementation for the stream_list tool. It iterates over all stream sessions and returns basic info (id, done, frameCount, remainingMs) for each.
export function listStreams(): Array<{ id: string; done: boolean; frameCount: number; remainingMs: number }> { const out: Array<{ id: string; done: boolean; frameCount: number; remainingMs: number }> = []; for (const s of sessions.values()) { out.push({ id: s.id, done: s.done, frameCount: s.frames.length, remainingMs: Math.max(0, s.stopAt - Date.now()), }); } return out; } - src/index.ts:150-154 (registration)Tool registration: stream_list is registered via ListToolsRequestSchema with name 'stream_list', description, and empty inputSchema (no params).
{ name: "stream_list", description: "List active and completed stream sessions known to this process.", inputSchema: { type: "object", properties: {} }, }, - src/index.ts:236-237 (registration)The stream_list case in CallToolRequestSchema switch dispatches to listStreams() imported from ./stream.js.
case "stream_list": return text(listStreams()); - src/index.ts:21-27 (helper)Import of the listStreams function from ./stream.js at the top of index.ts.
import { startStream, stopStream, snapshotStream, listStreams, dropStream, } from "./stream.js";