Skip to main content
Glama

channels_listVideos

Retrieve videos from a YouTube channel by providing the channel ID, with options to limit results.

Instructions

Get videos from a specific channel

Input Schema

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

Implementation Reference

  • Core handler logic in ChannelService.listVideos method that performs YouTube API search.list call filtered by channelId to retrieve the channel's videos.
    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)}`); } }
  • MCP tool registration for 'channels_listVideos', including Zod input schema and thin wrapper handler delegating to ChannelService.
    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) }] }; } );
  • TypeScript interface defining input parameters for channel videos listing, used by ChannelService.listVideos.
    export interface ChannelVideosParams { channelId: string; maxResults?: number; }

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