{"openapi":"3.1.0","info":{"title":"BALLDONTLIE MLB (BYOK) API","version":"0.1.0","description":"BALLDONTLIE MLB (BYOK) lets an AI assistant read your own BALLDONTLIE MLB data through the BALLDONTLIE MLB API with a key you supply (BALLDONTLIE API key). Read-only: 9 tools (list_teams, list_players, get_player, list_games, get_game, get_standings, list_player_game_stats, list_player_season_stats, list_team_season_stats). The BYOK key travels with each request, is used for that one call only...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-balldontlie-mlb.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-balldontlie-mlb/docs"},"termsOfService":"https://connectorbay.com/byok-balldontlie-mlb/terms"},"servers":[{"url":"https://byok-balldontlie-mlb.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-balldontlie-mlb/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_teams":{"post":{"operationId":"list_teams","summary":"List MLB teams with abbreviation, name, league and division, optionally filtered by league or division. Use for \"Which M","description":"List MLB teams with abbreviation, name, league and division, optionally filtered by league or division. Use for \"Which MLB teams are in the AL East\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"league":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"League: American or National.","title":"League"},"division":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Division: East, Central or West.","title":"Division"}},"title":"list_teamsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_players":{"post":{"operationId":"list_players","summary":"List or search MLB players by name or team with position, bats and throws, size, age and debut year; 100 per page at mos","description":"List or search MLB players by name or team with position, bats and throws, size, age and debut year; 100 per page at most. Use for \"Find the MLB player Shohei Ohtani\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Part of a player name to search for.","title":"Search"},"first_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Exact first name filter.","title":"First Name"},"last_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Exact last name filter.","title":"Last Name"},"team_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only players of this team id.","title":"Team Id"},"cursor":{"anyOf":[{"maximum":100000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer's meta.","title":"Cursor"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100).","title":"Per Page"}},"title":"list_playersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_player":{"post":{"operationId":"get_player","summary":"Get one MLB player by id with position, bats and throws, size, age, debut year and current team. Use for \"Show MLB playe","description":"Get one MLB player by id with position, bats and throws, size, age, debut year and current team. Use for \"Show MLB player 1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"BALLDONTLIE player id, for example 1.","minimum":1,"title":"Id","type":"integer"}},"required":["id"],"title":"get_playerArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_games":{"post":{"operationId":"list_games","summary":"List MLB games filtered by date, season, team or game type with team names, venue, attendance and status. Use for \"What ","description":"List MLB games filtered by date, season, team or game type with team names, venue, attendance and status. Use for \"What MLB games were played on 2025-07-04\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only games on this date, YYYY-MM-DD.","title":"Date"},"season":{"anyOf":[{"maximum":2100,"minimum":1900,"type":"integer"},{"type":"null"}],"default":null,"description":"Season year, for example 2025.","title":"Season"},"team_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only games of this team id.","title":"Team Id"},"season_type":{"anyOf":[{"enum":["spring_training","regular","postseason"],"type":"string"},{"type":"null"}],"default":null,"description":"Season type: spring_training, regular or postseason.","title":"Season Type"},"cursor":{"anyOf":[{"maximum":100000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer's meta.","title":"Cursor"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100).","title":"Per Page"}},"title":"list_gamesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_game":{"post":{"operationId":"get_game","summary":"Get one MLB game by id with team names, venue, attendance and status. Use for \"Show MLB game 1\".","description":"Get one MLB game by id with team names, venue, attendance and status. Use for \"Show MLB game 1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"BALLDONTLIE game id, for example 1.","minimum":1,"title":"Id","type":"integer"}},"required":["id"],"title":"get_gameArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_standings":{"post":{"operationId":"get_standings","summary":"Get MLB standings for a season with wins, losses, win percentage, games behind, streak, runs scored and allowed and divi","description":"Get MLB standings for a season with wins, losses, win percentage, games behind, streak, runs scored and allowed and division rank. Use for \"Show the MLB standings for 2025\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"season":{"description":"Season year, for example 2025.","maximum":2100,"minimum":1900,"title":"Season","type":"integer"}},"required":["season"],"title":"get_standingsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_player_game_stats":{"post":{"operationId":"list_player_game_stats","summary":"List per-game MLB player stat lines (batting and pitching) filtered by player, game or season. Use for \"How many hits di","description":"List per-game MLB player stat lines (batting and pitching) filtered by player, game or season. Use for \"How many hits did player 1 get in 2025 games\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"player_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only lines of this player id.","title":"Player Id"},"game_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only lines of this game id.","title":"Game Id"},"season":{"anyOf":[{"maximum":2100,"minimum":1900,"type":"integer"},{"type":"null"}],"default":null,"description":"Season year.","title":"Season"},"cursor":{"anyOf":[{"maximum":100000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer's meta.","title":"Cursor"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100).","title":"Per Page"}},"title":"list_player_game_statsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_player_season_stats":{"post":{"operationId":"list_player_season_stats","summary":"List MLB player season totals (batting, pitching, WAR) for one season, optionally for one team or sorted by a field. Use","description":"List MLB player season totals (batting, pitching, WAR) for one season, optionally for one team or sorted by a field. Use for \"Who hit the most home runs in 2025\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"season":{"description":"Season year, for example 2025.","maximum":2100,"minimum":1900,"title":"Season","type":"integer"},"team_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only players of this team id.","title":"Team Id"},"season_type":{"anyOf":[{"enum":["spring_training","regular","postseason"],"type":"string"},{"type":"null"}],"default":null,"description":"Season type: spring_training, regular or postseason.","title":"Season Type"},"sort_by":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Field to sort by, for example batting_hr.","title":"Sort By"},"sort_order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"asc or desc.","title":"Sort Order"},"cursor":{"anyOf":[{"maximum":100000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer's meta.","title":"Cursor"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 100).","title":"Per Page"}},"required":["season"],"title":"list_player_season_statsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_team_season_stats":{"post":{"operationId":"list_team_season_stats","summary":"List MLB team season totals (batting, pitching, fielding) for one season, optionally for one team. Use for \"Which team h","description":"List MLB team season totals (batting, pitching, fielding) for one season, optionally for one team. Use for \"Which team had the best ERA in 2025\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"season":{"description":"Season year, for example 2025.","maximum":2100,"minimum":1900,"title":"Season","type":"integer"},"team_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this team id.","title":"Team Id"},"season_type":{"anyOf":[{"enum":["spring_training","regular","postseason"],"type":"string"},{"type":"null"}],"default":null,"description":"Season type: spring_training, regular or postseason.","title":"Season Type"}},"required":["season"],"title":"list_team_season_statsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}