Skip to main content
Glama

channels_getChannel

Retrieve detailed information about a YouTube channel by providing its channel ID using the YouTube MCP Server interface.

Instructions

Get information about a YouTube channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelIdYesThe YouTube channel ID

Implementation Reference

  • The main handler function in ChannelService that fetches YouTube channel details using the YouTube Data API v3.
    async getChannel({ 
      channelId 
    }: ChannelParams): Promise<any> {
      try {
        this.initialize();
        
        const response = await this.youtube.channels.list({
          part: ['snippet', 'statistics', 'contentDetails'],
          id: [channelId]
        });
    
        return response.data.items?.[0] || null;
      } catch (error) {
        throw new Error(`Failed to get channel: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • src/server.ts:99-112 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining the tool name, description, and input schema.
    {
        name: 'channels_getChannel',
        description: 'Get information about a YouTube channel',
        inputSchema: {
            type: 'object',
            properties: {
                channelId: {
                    type: 'string',
                    description: 'The YouTube channel ID',
                },
            },
            required: ['channelId'],
        },
    },
  • Dispatch handler in the CallToolRequestSchema switch that calls the ChannelService.getChannel and formats the response.
    case 'channels_getChannel': {
        const result = await channelService.getChannel(args as unknown as ChannelParams);
        return {
            content: [{
                type: 'text',
                text: JSON.stringify(result, null, 2)
            }]
        };
    }
  • TypeScript interface defining the input parameters for the channels_getChannel tool.
    export interface ChannelParams {
      channelId: string;
    }
Behavior2/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 states the tool retrieves information (implying a read-only operation) but doesn't specify what information is returned (e.g., metadata, statistics, content details), whether there are rate limits, authentication requirements, or error conditions. This leaves significant gaps in understanding how the tool behaves.

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, clear sentence that directly states the tool's purpose with zero unnecessary words. It is front-loaded and efficiently communicates the core functionality without any fluff or redundancy.

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?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'information' is returned (e.g., channel name, subscriber count, video list), leaving the agent to guess the output structure. Given the lack of structured data, the description should provide more context about the tool's behavior and results.

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 schema description coverage is 100%, with the single parameter 'channelId' clearly documented as 'The YouTube channel ID'. The description adds no additional semantic context about the parameter (e.g., format examples, where to find channel IDs, or validation rules), so it meets the baseline for high schema coverage without adding value.

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 verb ('Get information') and resource ('about a YouTube channel'), making the purpose immediately understandable. However, it doesn't distinguish this tool from potential sibling tools that might also retrieve channel information, such as if there were a 'channels_getChannelDetails' or 'channels_getChannelStatistics' tool.

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 sibling tools like 'channels_listVideos' (which might list videos from a channel) or 'videos_searchVideos' (which might search across channels), leaving the agent to infer usage context from tool names alone.

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

Related 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/ZubeidHendricks/youtube-mcp-server'

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