Skip to main content
Glama

get_current_stream

Retrieve current stream details including title, status, RTMP URL, and viewer count to monitor active broadcasts across multiple platforms.

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 handler for 'get_current_stream' that delegates to RestreamClient.getCurrentStream() and returns formatted JSON response or 'No active stream' message.
    case 'get_current_stream': { const stream = await restreamClient.getCurrentStream(); return { content: [ { type: 'text', text: stream ? JSON.stringify(stream, null, 2) : 'No active stream', }, ], }; }
  • src/index.ts:92-100 (registration)
    Registration of the 'get_current_stream' tool in the tools array, including 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: [], }, },
  • Core implementation of getCurrentStream method in RestreamClient that makes API call to '/user/stream' and handles 404 as null (no active stream).
    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'); } }
  • TypeScript interface defining the Stream type used as input/output schema for get_current_stream tool.
    export interface Stream { id: string; title: string; isLive: boolean; streamKey?: string; rtmpUrl?: string; viewers?: number; startedAt?: string; }

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