Skip to main content
Glama

get_current_stream

Retrieve details of the active live stream, including title, status, RTMP URL, and viewer count, for monitoring and management.

Instructions

Get information about the current/active stream including title, status, RTMP URL, and viewer count

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool execution handler for 'get_current_stream' that delegates to RestreamClient.getCurrentStream() and formats the response as MCP content.
    case 'get_current_stream': {
      const stream = await restreamClient.getCurrentStream();
      return {
        content: [
          {
            type: 'text',
            text: stream ? JSON.stringify(stream, null, 2) : 'No active stream',
          },
        ],
      };
    }
  • Core implementation of getCurrentStream() method in RestreamClient that fetches the current stream from the Restream API endpoint '/user/stream', handling 404 as null.
    async getCurrentStream(): Promise<Stream | null> {
      try {
        const response = await this.axiosInstance.get<Stream>('/user/stream');
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error) && error.response?.status === 404) {
          return null; // No active stream
        }
        throw this.handleError(error, 'Failed to fetch current stream');
      }
    }
  • src/index.ts:92-100 (registration)
    Registration of the 'get_current_stream' tool in the MCP tools list, including name, description, and empty input schema.
    {
      name: 'get_current_stream',
      description: 'Get information about the current/active stream including title, status, RTMP URL, and viewer count',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • Type definition for Stream, used as the return type for getCurrentStream, defining the structure of stream information.
    export interface Stream {
      id: string;
      title: string;
      isLive: boolean;
      streamKey?: string;
      rtmpUrl?: string;
      viewers?: number;
      startedAt?: string;
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly indicates this is a read operation ('Get information'), which is helpful. However, it doesn't mention potential behavioral aspects like authentication requirements, rate limits, error conditions, or whether the data is real-time vs cached. The description adds basic context but lacks comprehensive behavioral details.

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?

The description is a single, efficient sentence that front-loads the core purpose ('Get information about the current/active stream') followed by specific attributes. There's zero wasted language, and every word contributes to understanding what the tool does.

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 the tool's simplicity (0 parameters, no output schema, no annotations), the description is reasonably complete for a basic read operation. It specifies what information will be retrieved. However, for a tool without annotations or output schema, it could benefit from mentioning the return format or data structure since the agent won't know what to expect from the response.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the parameter situation. The description appropriately doesn't discuss parameters since none exist. It earns a baseline 4 because when there are no parameters, the description doesn't need to compensate for schema gaps.

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?

The description clearly states the tool's purpose: 'Get information about the current/active stream' with specific attributes listed (title, status, RTMP URL, viewer count). It uses a specific verb ('Get') and identifies the resource ('current/active stream'), but doesn't explicitly differentiate from sibling tools like 'get_stream_analytics' or 'get_channel'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate compared to siblings like 'get_stream_analytics' (which might provide more detailed metrics) or 'get_channel' (which might provide broader channel information). No exclusions or prerequisites are stated.

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/shaktech786/restream-mcp-server'

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