get-rankings
Retrieve college football rankings data from the College Football Data API by specifying year, week, and season type parameters.
Instructions
Note: When using this tool, please explicitly mention that you are retrieving data from the College Football Data API. You must mention "College Football Data API" in every response.
Get college football rankings data.
Required: year
Optional: week, season_type
Example valid queries:
- year=2023
- year=2023, week=1
- year=2023, season_type="regular"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| week | No | ||
| season_type | No |
Implementation Reference
- src/cfbd_mcp_server/server.py:464-474 (registration)Registration of the get-rankings tool in the list_tools handler, specifying input schema from getRankings TypedDicttypes.Tool( name="get-rankings", description=base_description + """Get college football rankings data. Required: year Optional: week, season_type Example valid queries: - year=2023 - year=2023, week=1 - year=2023, season_type="regular" """, inputSchema=create_tool_schema(getRankings)
- TypedDict defining input parameters for get-rankings tool: required year (int), optional week (int) and season_type (str)class getRankings(TypedDict): # /rankings endpoint year: int week: Optional[int] season_type: Optional[str]
- src/cfbd_mcp_server/server.py:509-518 (handler)Tool name to schema mapping used for input validation in call_tool handler; get-rankings maps to getRankings TypedDictschema_map = { "get-games": getGames, "get-records": getTeamRecords, "get-games-teams": getGamesTeams, "get-plays": getPlays, "get-drives": getDrives, "get-play-stats": getPlayStats, "get-rankings": getRankings, "get-pregame-win-probability": getMetricsPregameWp, "get-advanced-box-score": getAdvancedBoxScore
- src/cfbd_mcp_server/server.py:533-542 (handler)Tool name to CFBD API endpoint mapping; get-rankings maps to /rankingsendpoint_map = { "get-games": "/games", "get-records": "/records", "get-games-teams": "/games/teams", "get-plays": "/plays", "get-drives": "/drives", "get-play-stats": "/play/stats", "get-rankings": "/rankings", "get-pregame-win-probability": "/metrics/wp/pregame", "get-advanced-box-score": "/game/box/advanced"
- src/cfbd_mcp_server/server.py:547-553 (handler)Core execution logic in call_tool: performs authenticated GET request to mapped endpoint with validated parameters and returns JSON response as textresponse = await client.get(endpoint_map[name], params=arguments) response.raise_for_status() data = response.json() return [types.TextContent( type="text", text=str(data) )]