Skip to main content
Glama
jdoliveirasa

erickwendel-contributions-mcp

by jdoliveirasa

get_videos

Retrieve a list of videos filtered by ID, title, or language, with pagination controls for skip and limit.

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 MCP tool definition for 'get_videos' including the handler function that calls fetchVideos and formats the response as text.
    export const getVideosTool = {
      name: TOOL_CONFIG.videos.name,
      description: TOOL_CONFIG.videos.description,
      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')
      },
      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}`)
        }
      }
    }
  • The fetchVideos service function that executes the GraphQL query against the API to retrieve videos with optional filtering and pagination.
    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
    }
  • Type definitions for VideosResponse (the GraphQL response shape) and Video (individual video fields).
    export interface VideosResponse {
      getVideos: {
        totalCount: number;
        retrieved: number;
        processedIn: number;
        videos: Video[];
      } | null;
    }
  • VideosParams type definition for the input parameters accepted by the tool.
    export interface VideosParams {
      id?: string;
      title?: string;
      language?: string;
      skip?: number;
      limit?: number;
    }
  • src/index.ts:36-41 (registration)
    Registration of the getVideosTool as an MCP server tool using server.tool().
    server.tool(
      getVideosTool.name,
      getVideosTool.description,
      getVideosTool.parameters,
      getVideosTool.handler
    )
  • TOOL_CONFIG entry defining the tool name 'get_videos' and its description.
    videos: {
      name: 'get_videos',
      description: 'Get a list of videos with optional filtering and pagination.'
    },
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It only mentions 'optional filtering and pagination', but omits details about authentication, rate limits, or what happens with empty results. The read-only nature is implied but not explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise but lacks detail. It is not overly verbose, but could be more informative without being wordy.

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

Completeness2/5

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

With no output schema and no annotations, the description should cover return format, default sort order, and error handling. It only mentions filtering and pagination, leaving the agent to infer behavior. Incomplete for a 5-parameter tool.

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 coverage is 100%, with each parameter described. The description adds 'optional filtering and pagination' but does not provide additional semantics beyond the schema. Baseline 3 is appropriate.

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?

The description clearly states 'Get a list of videos', specifying the verb (Get) and resource (videos), and distinguishes from sibling tools like get_posts and get_talks by resource type.

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 this tool vs alternatives like check_status, get_posts, or get_talks. Does not specify prerequisites or scenarios where this tool is appropriate.

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

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