Skip to main content
Glama
beekamai
by beekamai

stream_drop

Discard a finished stream session to free in-memory data while preserving recorded files on disk.

Instructions

Forget a finished stream session (frees its in-memory ring; on-disk files are preserved).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The dropStream function that executes the stream_drop tool logic. It stops the stream via stopStream and then deletes the session from the sessions map.
    export function dropStream(id: string): boolean {
      stopStream(id);
      return sessions.delete(id);
    }
  • src/index.ts:155-163 (registration)
    Tool registration (name, description, inputSchema) for stream_drop in the ListToolsRequestSchema handler. Requires an 'id' string parameter.
    {
      name: "stream_drop",
      description: "Forget a finished stream session (frees its in-memory ring; on-disk files are preserved).",
      inputSchema: {
        type: "object",
        required: ["id"],
        properties: { id: { type: "string" } },
      },
    },
  • The call-site in the CallToolRequestSchema handler that dispatches 'stream_drop' to the dropStream function and returns the result.
    case "stream_drop":
      return text({ id: strArg(args, "id"), dropped: dropStream(strArg(args, "id")) });
  • stopStream is called by dropStream to stop the stream before deleting the session.
    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 };
    }
Behavior4/5

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

With no annotations, the description discloses that the tool frees in-memory ring but preserves on-disk files, providing key behavioral context beyond the tool name.

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 with no wasted words, efficiently conveying the core purpose and behavioral nuance.

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?

While the tool is simple, the description omits important context such as the requirement that the session must be finished before calling this tool, and does not describe return values or error conditions.

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 sole parameter 'id' has no description in the schema (0% coverage) and the description does not elaborate on what 'id' refers to (e.g., session ID), failing to compensate for the low schema coverage.

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 states the action ('Forget a finished stream session') and resource ('in-memory ring'), distinguishing it from sibling tools like stream_start, stream_stop, and stream_list.

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 after a stream session is finished to free memory, but does not explicitly state when not to use or mention alternative tools for other actions.

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