Skip to main content
Glama

get_team_media

Retrieve media content for FIRST Robotics Competition teams by specifying a team key and competition year to access photos, videos, and related materials.

Instructions

Get media for a team in a specific year

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_keyYesTeam key in format frcXXXX (e.g., frc86)
yearYesCompetition year

Implementation Reference

  • The main handler logic for the 'get_team_media' tool. It validates the input arguments using Zod schemas (TeamKeySchema and YearSchema), makes an API request to The Blue Alliance (TBA) endpoint `/team/{team_key}/media/{year}`, parses the media array response with MediaSchema, and returns the JSON-formatted media data as text content.
    case 'get_team_media': { const { team_key, year } = z .object({ team_key: TeamKeySchema, year: YearSchema, }) .parse(args); const data = await makeApiRequest(`/team/${team_key}/media/${year}`); const media = z.array(MediaSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(media, null, 2), }, ], }; }
  • The input schema and tool metadata (name and description) for 'get_team_media', defining the expected parameters: team_key (string with pattern) and year (number within range). This is part of the tools array exported and used for MCP tool listing and validation.
    name: 'get_team_media', description: 'Get media for a team in a specific year', inputSchema: { type: 'object', properties: { team_key: { type: 'string', description: 'Team key in format frcXXXX (e.g., frc86)', pattern: '^frc\\d+$', }, year: { type: 'number', description: 'Competition year', minimum: 1992, maximum: new Date().getFullYear() + 1, }, }, required: ['team_key', 'year'], },
  • src/index.ts:45-47 (registration)
    Registration of the tools list handler in the MCP server, which responds to listTools requests by returning the array of all tools (including 'get_team_media') imported from tools.ts.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/withinfocus/tba'

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