{"openapi":"3.0.3","info":{"title":"Gnist Context — TheSportsDB (Sports Data)","description":"Sports data — leagues, teams, players, events, and standings from TheSportsDB.\n\n- **MCP endpoint:** `https://context.gnist.ai/mcp/thesportsdb/`\n- **Toolkit page:** `/toolkits/thesportsdb`\n- **Full API spec:** `/api/openapi.json`\n- **Get an API key:** `/signup`","version":"1.0.0","contact":{"name":"GnistAI","url":"https://gnist.ai"}},"servers":[{"url":"https://context.gnist.ai","description":"Production"}],"paths":{"/rest/thesportsdb/search_teams":{"post":{"tags":["Entertainment"],"summary":"search_teams","description":"Search for sports teams by name across all sports.\n\nReturns matching teams with basic info including sport, league, country,\nand stadium. Use the returned team ID with get_team, get_last_events,\nor get_next_events.\n\nExamples:\n    search_teams(\"Arsenal\") -> Arsenal FC, Arsenal de Sarandi, etc.\n    search_teams(\"Real Madrid\") -> Real Madrid CF","operationId":"thesportsdb_search_teams","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"team_name":{"description":"Team name to search for (e.g. 'Arsenal', 'Barcelona', 'Lakers').","type":"string"}},"required":["team_name"],"type":"object"}}}}}},"/rest/thesportsdb/get_team":{"post":{"tags":["Entertainment"],"summary":"get_team","description":"Get detailed information for a specific team by its ID.\n\nReturns full team profile including stadium details, description, badge URL,\njersey image, website, and league information.\n\nUse search_teams first to find the team ID.","operationId":"thesportsdb_get_team","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"team_id":{"description":"Numeric team ID from TheSportsDB (e.g. '133604' for Arsenal).","type":"string"}},"required":["team_id"],"type":"object"}}}}}},"/rest/thesportsdb/search_players":{"post":{"tags":["Entertainment"],"summary":"search_players","description":"Search for players by team name and/or player name.\n\nAt least one of team_name or player_name must be provided. Returns player\nprofiles including nationality, position, height, weight, and biography.\n\nExamples:\n    search_players(player_name=\"Messi\") -> Lionel Messi\n    search_players(team_name=\"Arsenal\", player_name=\"Saka\") -> Bukayo Saka","operationId":"thesportsdb_search_players","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Team name to filter players by (e.g. 'Arsenal')."},"player_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Player name to search for (e.g. 'Messi', 'LeBron')."}},"type":"object"}}}}}},"/rest/thesportsdb/get_league_table":{"post":{"tags":["Entertainment"],"summary":"get_league_table","description":"Get league standings/table for a given league and season.\n\nReturns the complete standings with points, wins, draws, losses,\ngoals for/against, and goal difference for each team.\n\nCommon league IDs: 4328 (EPL), 4335 (La Liga), 4331 (Bundesliga),\n4332 (Serie A), 4334 (Ligue 1).","operationId":"thesportsdb_get_league_table","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"league_id":{"description":"Numeric league ID (e.g. '4328' for English Premier League).","type":"string"},"season":{"description":"Season in YYYY or YYYY-YYYY format (e.g. '2024-2025').","type":"string"}},"required":["league_id","season"],"type":"object"}}}}}},"/rest/thesportsdb/get_events_by_date":{"post":{"tags":["Entertainment"],"summary":"get_events_by_date","description":"Get sporting events scheduled for a specific date.\n\nReturns events with home/away teams, scores (if completed), venue,\nand status. Optionally filter by sport.\n\nExamples:\n    get_events_by_date(\"2025-03-15\") -> all sports events on that date\n    get_events_by_date(\"2025-03-15\", sport=\"Soccer\") -> only soccer matches","operationId":"thesportsdb_get_events_by_date","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"date":{"description":"Date in YYYY-MM-DD format (e.g. '2025-03-15').","type":"string"},"sport":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Sport filter (e.g. 'Soccer', 'Basketball', 'Ice Hockey'). Omit for all sports."}},"required":["date"],"type":"object"}}}}}},"/rest/thesportsdb/get_last_events":{"post":{"tags":["Entertainment"],"summary":"get_last_events","description":"Get the last 5 completed events for a team.\n\nReturns recent match results including scores, opponents, venue, and date.\nUseful for checking recent form.","operationId":"thesportsdb_get_last_events","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"team_id":{"description":"Numeric team ID (e.g. '133604' for Arsenal). Use search_teams to find it.","type":"string"}},"required":["team_id"],"type":"object"}}}}}},"/rest/thesportsdb/get_next_events":{"post":{"tags":["Entertainment"],"summary":"get_next_events","description":"Get the next 5 upcoming events for a team.\n\nReturns scheduled fixtures with opponents, date, time, and venue.\nUseful for checking upcoming matches.","operationId":"thesportsdb_get_next_events","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"team_id":{"description":"Numeric team ID (e.g. '133604' for Arsenal). Use search_teams to find it.","type":"string"}},"required":["team_id"],"type":"object"}}}}}},"/rest/thesportsdb/report_feedback":{"post":{"tags":["Entertainment"],"summary":"report_feedback","description":"Report a bug, feature request, or general feedback for this data source.\n\nUse this when something doesn't work as expected, when you'd like\na new feature, or when you have suggestions for improvement.\n\nArgs:\n    feedback: Describe the issue or suggestion.\n    feedback_type: One of 'bug', 'feature_request', or 'general'.","operationId":"thesportsdb_report_feedback","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"feedback":{"type":"string"},"feedback_type":{"default":"general","type":"string"}},"required":["feedback"],"type":"object"}}}}}}},"tags":[{"name":"Entertainment","description":"Data sources: Entertainment"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"gnist-api-key","description":"API key passed via request header."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"gnist_api_key","description":"API key passed via query parameter."}}}}