Skip to main content
Glama
beekamai
by beekamai

stream_stop

Stop an active screenshot stream by providing its ID. Frames already on disk are preserved.

Instructions

Stop a running stream early. Frames already on disk remain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The handler for the 'stream_stop' tool: extracts the 'id' argument and calls stopStream() from the stream module, returning the result as text.
    case "stream_stop":
      return text(stopStream(strArg(args, "id")));
  • The core logic: looks up the stream session by ID, clears its interval ticker, marks it as done, and returns the frame count.
    export function stopStream(id: string): { id: string; frameCount: number; stopped: boolean } {
      const sess = sessions.get(id);
      if (!sess) return { id, frameCount: 0, stopped: false };
      if (sess.ticker) clearInterval(sess.ticker);
      sess.ticker = undefined;
      sess.done = true;
      return { id, frameCount: sess.frames.length, stopped: true };
    }
  • src/index.ts:141-149 (registration)
    Tool registration for 'stream_stop' in the ListToolsRequestSchema handler, defining the tool name, description, and input schema requiring a string 'id'.
    {
      name: "stream_stop",
      description: "Stop a running stream early. Frames already on disk remain.",
      inputSchema: {
        type: "object",
        required: ["id"],
        properties: { id: { type: "string" } },
      },
    },
  • The StartStreamArgs interface defines the input schema for stream_start; stream_stop only uses a simple string 'id' argument (no dedicated interface needed, handled inline).
    export interface StartStreamArgs {
      intervalSeconds: number;
      durationSeconds: number;
      cursorRadius?: number;
      format?: "png" | "jpeg" | "webp";
      quality?: number;
      maxEdge?: number;
      ringCapacity?: number;
      outDir: string;
    }
Behavior3/5

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

The description discloses that frames remain on disk, but with no annotations, it lacks details on side effects (e.g., resource cleanup), reversibility, or error states. It covers the core behavior minimally.

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?

Two short sentences, front-loaded with the primary action and a key behavioral note. No redundancy or extraneous content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema or annotations, the description is adequate for a simple stop operation but lacks details on return values, error handling, and state prerequisites, which would help completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter 'id' has no description in the schema (0% coverage), and the description does not elaborate on its meaning (e.g., stream ID) or expected format, leaving the agent to infer.

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?

The description clearly specifies the action ('Stop a running stream early') and distinguishes from sibling tools like stream_start, stream_status, and stream_drop by focusing on early termination and noting that frames are preserved.

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 description implies usage for early stopping but does not provide explicit guidance on when to use this versus alternatives (e.g., stream_drop for removing frames) or mention prerequisites like the stream must be running.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/beekamai/mcp-screenshot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server