Skip to main content
Glama

get_teams

Retrieve paginated lists of FIRST Robotics Competition teams from The Blue Alliance API to access comprehensive team data.

Instructions

Get list of teams with pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_numYesPage number (0-indexed)

Implementation Reference

  • The handler logic for the 'get_teams' tool. It validates the input page_num, fetches paginated teams from the TBA API endpoint `/teams/${page_num}`, parses the response using TeamSchema, and returns the JSON-stringified list of teams.
    case 'get_teams': { const { page_num } = z .object({ page_num: z.number().min(0) }) .parse(args); const data = await makeApiRequest(`/teams/${page_num}`); const teams = z.array(TeamSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(teams, null, 2), }, ], }; }
  • The tool definition including name, description, and input schema for 'get_teams'. This is part of the tools array registered with the MCP server.
    { name: 'get_teams', description: 'Get list of teams with pagination', inputSchema: { type: 'object', properties: { page_num: { type: 'number', description: 'Page number (0-indexed)', minimum: 0, }, }, required: ['page_num'], }, },
  • src/index.ts:45-47 (registration)
    Registration of all tools with the MCP server via ListToolsRequestSchema handler, which returns the tools array including 'get_teams'.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • Definition of TeamSchema used for output validation in the get_teams handler. (Note: full schema spans multiple lines.)
    export const TeamSchema = z.object({

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