$npx -y skills add machina-sports/sports-skills --skill metadataSports metadata via TheSportsDB free API (key=3). Team logos and badges, player photos, stadium info, league info, and biographical data across 100+ leagues. No API key required, zero config. Use when: user asks for a team logo, crest, badge, banner, jersey, kit, player photo or
| 1 | # Sports Metadata |
| 2 | |
| 3 | Wraps the free [TheSportsDB](https://www.thesportsdb.com) API for team logos, player photos, and stadium info. No API key, no signup. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | ```bash |
| 8 | sports-skills metadata get_team_logo --team_name="Arsenal" |
| 9 | sports-skills metadata get_team_info --team_name="Real Madrid" |
| 10 | sports-skills metadata get_player_photo --player_name="Messi" |
| 11 | sports-skills metadata search_teams --query="Manchester" |
| 12 | sports-skills metadata search_players --query="LeBron" |
| 13 | ``` |
| 14 | |
| 15 | Python SDK: |
| 16 | |
| 17 | ```python |
| 18 | from sports_skills import metadata |
| 19 | |
| 20 | metadata.get_team_logo(team_name="Arsenal") |
| 21 | metadata.get_team_info(team_name="Real Madrid") |
| 22 | metadata.get_player_photo(player_name="Messi") |
| 23 | metadata.search_teams(query="Manchester") |
| 24 | metadata.search_players(query="LeBron") |
| 25 | ``` |
| 26 | |
| 27 | ## CRITICAL: Before Any Query |
| 28 | |
| 29 | CRITICAL: Before calling any metadata command, verify: |
| 30 | - Team names use the **full official name** — especially for NBA (e.g., `"Los Angeles Lakers"`, **not** `"Lakers"`). |
| 31 | - For `get_team_logo`, the `sport` parameter defaults to `"Soccer"`. Pass `sport="Basketball"`, `"American Football"`, `"Baseball"`, `"Ice Hockey"`, `"Motorsport"`, or `"Cricket"` when the team is not a soccer team — otherwise the lookup falls back to "first result regardless of sport," which may return the wrong team. |
| 32 | - Player searches use just the player name (e.g., `"Messi"`, `"LeBron James"`, `"Tiger Woods"`). |
| 33 | |
| 34 | ## Coverage |
| 35 | |
| 36 | **Teams (logos, banners, stadium info):** |
| 37 | - Soccer: 100+ leagues worldwide (Premier League, La Liga, Bundesliga, Serie A, MLS, and many more) |
| 38 | - NFL (American Football) |
| 39 | - NBA (Basketball) — requires full team names |
| 40 | - MLB (Baseball) |
| 41 | - NHL (Ice Hockey) |
| 42 | - F1 (Motorsport) |
| 43 | - Cricket (IPL, international) |
| 44 | |
| 45 | **Players (photos, bios):** |
| 46 | - All team sports above |
| 47 | - Tennis (ATP/WTA players) |
| 48 | - Golf (PGA/LPGA players) |
| 49 | |
| 50 | **Not covered:** MMA/UFC, Rugby, Esports, Boxing. |
| 51 | |
| 52 | ## Commands |
| 53 | |
| 54 | | Command | Required | Optional | Description | |
| 55 | |---|---|---|---| |
| 56 | | `get_team_logo` | team_name | sport | Team logo / badge URL | |
| 57 | | `get_team_info` | team_name | | Full team info: stadium, description, social links, banner | |
| 58 | | `get_player_photo` | player_name | | Player photo URL | |
| 59 | | `search_teams` | query | | Fuzzy search for teams across sports | |
| 60 | | `search_players` | query | | Fuzzy search for players across sports | |
| 61 | |
| 62 | ## Workflows |
| 63 | |
| 64 | ### Enrich a Standings Response |
| 65 | |
| 66 | 1. Call the sport-specific skill (e.g., `football get_season_standings`) for the standings table. |
| 67 | 2. For each team in the standings, call `get_team_logo --team_name=<name>` to attach a badge URL. |
| 68 | 3. Render the standings with logos alongside team names. |
| 69 | |
| 70 | ### Build a Team Profile Page |
| 71 | |
| 72 | 1. Call `get_team_info --team_name="<name>"` for stadium, description, founding year, social links. |
| 73 | 2. The same response includes `badge` and `banner` URLs — no second call needed. |
| 74 | |
| 75 | ### Resolve an Ambiguous Team Name |
| 76 | |
| 77 | 1. Call `search_teams --query="<partial-name>"` to disambiguate. |
| 78 | 2. Use the exact `name` field from the result for follow-up `get_team_info` calls. |
| 79 | |
| 80 | ## Examples |
| 81 | |
| 82 | Example 1: Get a Premier League team logo |
| 83 | User says: "What does the Arsenal logo look like?" |
| 84 | Actions: |
| 85 | 1. Call `get_team_logo(team_name="Arsenal")` — `sport` defaults to "Soccer", which is correct here. |
| 86 | Result: Logo URL, sport, league, and country. |
| 87 | |
| 88 | Example 2: NBA team — full name required |
| 89 | User says: "Get the Lakers logo" |
| 90 | Actions: |
| 91 | 1. Call `get_team_logo(team_name="Los Angeles Lakers", sport="Basketball")` — both the full name AND the sport filter are needed. |
| 92 | Result: Lakers badge from the NBA branch of TheSportsDB. |
| 93 | |
| 94 | Example 3: Player photo |
| 95 | User says: "Show me a photo of Messi" |
| 96 | Actions: |
| 97 | 1. Call `get_player_photo(player_name="Messi")`. |
| 98 | Result: Player photo URL, sport, team, and nationality. |
| 99 | |
| 100 | Example 4: Disambiguate "Manchester" |
| 101 | User says: "Find me Manchester teams" |
| 102 | Actions: |
| 103 | 1. Call `search_teams(query="Manchester")`. |
| 104 | Result: List of teams matching "Manchester" — Manchester United, Manchester City, etc. — each with sport, leagu |