Skip to main content
Glama

List Channel Videos

channels_listVideos
Read-onlyIdempotent

List videos from a YouTube channel by providing its channel ID. Optionally specify a maximum number of results to control the output.

Instructions

Get videos from a specific channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelIdYesThe YouTube channel ID
maxResultsNoMaximum number of results to return

Implementation Reference

  • The actual handler logic: ChannelService.listVideos() calls the YouTube Data API v3 search.list endpoint with channelId, sorted by date, filtered to videos only.
    async listVideos({ 
      channelId, 
      maxResults = 50 
    }: ChannelVideosParams): Promise<unknown[]> {
      try {
        this.initialize();
        
        const response = await this.youtube.search.list({
          part: ['snippet'],
          channelId,
          maxResults,
          order: 'date',
          type: ['video']
        });
    
        return response.data.items || [];
      } catch (error) {
        throw new Error(`Failed to list channel videos: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • Tool registration via server.registerTool with name 'channels_listVideos', input schema defined via Zod (channelId required, maxResults optional), and handler that delegates to channelService.listVideos().
    server.registerTool(
        'channels_listVideos',
        {
            title: 'List Channel Videos',
            description: 'Get videos from a specific channel',
            annotations: { readOnlyHint: true, idempotentHint: true },
            inputSchema: {
                channelId: z.string().describe('The YouTube channel ID'),
                maxResults: z.number().optional().describe('Maximum number of results to return'),
            },
        },
        async ({ channelId, maxResults }) => {
            const result = await channelService.listVideos({ channelId, maxResults });
            return {
                content: [{
                    type: 'text',
                    text: JSON.stringify(result, null, 2)
                }]
            };
        }
    );
  • Type definition for ChannelVideosParams interface with channelId (string) and maxResults (optional number).
    export interface ChannelVideosParams {
      channelId: string;
      maxResults?: number;
    }
Behavior2/5

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

Annotations already declare readOnlyHint and idempotentHint. Description adds no behavioral traits beyond rephrasing the resource scope.

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?

Single sentence with 6 words, no redundancy. Highly concise and front-loaded.

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

Completeness4/5

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

Adequate for a simple list operation with annotations indicating safety. Could mention output type or pagination, but not critical given low complexity.

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?

Schema already describes both parameters (channelId, maxResults) with 100% coverage. Description adds no further semantics, meeting baseline.

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?

Verb 'get' and resource 'videos from a specific channel' clearly states purpose. Distinguishes from siblings like channels_getChannel and videos_searchVideos.

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 on when to use vs alternatives like videos_searchVideos. No exclusions or prerequisites provided.

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/sfiorini/youtube-mcp'

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