Skip to main content
Glama

channels_listVideos

Retrieve videos from a specific YouTube channel by providing the channel ID and optional max results. Ideal for accessing and managing YouTube content programmatically.

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 function implementing the channels_listVideos tool using YouTube Data API v3 search.list to retrieve videos from a channel.
    async listVideos({ channelId, maxResults = 50 }: ChannelVideosParams): Promise<any[]> { 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)}`); } }
  • src/server.ts:212-219 (registration)
    Dispatch handler in MCP CallToolRequestHandler that calls the ChannelService.listVideos method.
    case 'channels_listVideos': { const result = await channelService.listVideos(args as unknown as ChannelVideosParams); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
  • src/server.ts:113-130 (registration)
    Tool registration in ListToolsRequestHandler including name, description, and JSON input schema.
    { name: 'channels_listVideos', description: 'Get videos from a specific channel', inputSchema: { type: 'object', properties: { channelId: { type: 'string', description: 'The YouTube channel ID', }, maxResults: { type: 'number', description: 'Maximum number of results to return', }, }, required: ['channelId'], }, },
  • TypeScript interface defining the input parameters (ChannelVideosParams) used by the handler and schema.
    export interface ChannelVideosParams { channelId: string; maxResults?: number; }

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