Skip to main content
Glama

get_stream_info

Retrieve live stream details from Twitch, including viewer count, game, and status, by providing a channel name.

Instructions

配信情報を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelNameYesTwitchチャンネル名

Implementation Reference

  • The handler function that implements the get_stream_info tool logic, fetching the stream status and details for a given Twitch channel using the Twitch API.
    export async function handleGetStreamInfo(apiClient: ApiClient, args: { channelName: string }) {
      const user = await getUserByName(apiClient, args.channelName);
      const stream = await apiClient.streams.getStreamByUserId(user.id);
    
      if (!stream) {
        return formatResponse({
          status: 'offline',
          message: `${user.displayName} is currently offline`,
          lastOnline: null
        });
      }
    
      return formatResponse({
        status: 'online',
        title: stream.title,
        game: stream.gameName,
        viewers: stream.viewers,
        startedAt: stream.startDate,
        language: stream.language,
        thumbnailUrl: stream.thumbnailUrl,
        tags: stream.tags,
      });
    }
  • The tool schema definition for get_stream_info, specifying the input schema with channelName parameter.
      name: 'get_stream_info',
      description: '配信情報を取得します',
      inputSchema: {
        type: 'object',
        properties: {
          channelName: {
            type: 'string',
            description: 'Twitchチャンネル名',
          },
        },
        required: ['channelName'],
      },
    },
  • src/index.ts:91-94 (registration)
    The registration in the tool dispatch switch statement, mapping the tool name to its handler function.
    case 'get_stream_info':
      return await handleGetStreamInfo(this.apiClient, {
        channelName: args.channelName as string
      });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action ('get stream information') without describing any traits such as read-only vs. destructive nature, authentication requirements, rate limits, or response format. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Japanese, making it appropriately concise. However, it is under-specified rather than optimally concise, as it lacks necessary details. It is front-loaded but does not earn its place fully due to the minimal content.

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

Completeness2/5

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

Given the complexity (a tool to retrieve stream information), lack of annotations, and no output schema, the description is incomplete. It does not explain what 'stream information' includes, how results are returned, or any behavioral aspects. This leaves the agent with insufficient context to use the tool effectively.

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

Parameters3/5

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

The input schema has 100% description coverage, with 'channelName' clearly documented as a Twitch channel name. The description adds no additional meaning beyond what the schema provides, as it does not mention parameters at all. Baseline is 3 because the schema does the heavy lifting, but the description fails to compensate or enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '配信情報を取得します' (Get stream information) states the basic action but is vague about what 'stream information' specifically entails. It distinguishes from siblings like 'get_channel_info' or 'get_streams' only by name, not by clarifying scope or content differences. The purpose is clear at a high level but lacks specificity about what data is retrieved.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_streams' or 'get_channel_info'. The description does not mention any context, prerequisites, or exclusions for usage. It leaves the agent to infer based on tool names alone, which is insufficient for reliable selection.

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/mtane0412/twitch-mcp-server'

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