Skip to main content
Glama
ErickWendel

Erick Wendel Contributions MCP

by ErickWendel

get_videos

Retrieve videos from Erick Wendel's content library with filtering by ID, title, or language and pagination controls for efficient browsing.

Instructions

Get a list of videos with optional filtering and pagination.

Input Schema

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

Implementation Reference

  • The main handler function for the 'get_videos' tool. It fetches videos using the fetchVideos service, formats the result as a JSON text response, and handles errors.
    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}`); } }
  • 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"), },
  • src/index.ts:35-40 (registration)
    Registration of the getVideosTool (named 'get_videos') with the MCP server.
    server.tool( getVideosTool.name, getVideosTool.description, getVideosTool.parameters, getVideosTool.handler );
  • Helper function that performs the actual GraphQL query to fetch videos from the API.
    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 of the get_videos tool.
    videos: { name: "get_videos", description: "Get a list of videos with optional filtering and pagination." },

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