Skip to main content
Glama
ErickWendel

Erick Wendel Contributions MCP

by ErickWendel

get_videos

Retrieve a list of videos with filters for ID, title, or language, and control results using pagination with skip and limit parameters.

Instructions

Get a list of videos with optional filtering and pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoFilter videos by ID
languageNoFilter videos by language
limitNoMaximum number of videos to return
skipNoNumber of videos to skip
titleNoFilter videos by title

Implementation Reference

  • The handler function for the 'get_videos' tool. It calls fetchVideos service, processes the result, and returns a formatted text response with JSON.stringify of the videos data.
    handler: async (params: VideosParams): Promise<McpResponse> => { try { const result = await fetchVideos(params); if (!result.getVideos) { throw new Error('No results returned from API'); } const content: McpTextContent = { type: "text", text: `Videos Results:\n\n${JSON.stringify(result.getVideos, null, 2)}` }; return { content: [content], }; } catch (error) { throw new Error(`Failed to fetch videos: ${error.message}`); } }
  • src/index.ts:35-40 (registration)
    Registration of the getVideosTool in the MCP server using server.tool().
    server.tool( getVideosTool.name, getVideosTool.description, getVideosTool.parameters, getVideosTool.handler );
  • Zod schema defining the input parameters for the get_videos tool.
    parameters: { id: z.string().optional().describe("Filter videos by ID"), title: z.string().optional().describe("Filter videos by title"), language: z.string().optional().describe("Filter videos by language"), skip: z.number().optional().default(0).describe("Number of videos to skip"), limit: z.number().optional().default(10).describe("Maximum number of videos to return"), },
  • Helper function fetchVideos that performs the actual GraphQL query to retrieve videos data, called by the tool handler.
    export async function fetchVideos(params: { id?: string; title?: string; language?: string; skip?: number; limit?: number; }): Promise<VideosResponse> { const { id, title, language, skip, limit } = params; const languageCode = getLanguageCode(language); return await client.query({ getVideos: { __args: { _id: id, title, language: languageCode, skip, limit, }, totalCount: true, retrieved: true, processedIn: true, videos: { _id: true, title: true, abstract: true, type: true, link: true, additionalLinks: true, tags: true, language: true, date: true, }, }, }) as VideosResponse; }
  • Configuration defining the name and description for the get_videos tool.
    videos: { name: "get_videos", description: "Get a list of videos with optional filtering and pagination."

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/ErickWendel/erickwendel-contributions-mcp'

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