{"tools":[{"name":"start_here","description":"CALL THIS FIRST. Returns the LUMA guide (LUMA.md): every table and column, conventions (seasons, heights, positions, per-100, traded players), worked SQL recipes, what is NOT available, and the rules for crediting the data. Read it before writing sql.","inputSchema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"describe","description":"What a table, column or metric MEANS: definition, unit, which way is good, stability, flags. Pass a table (players, games, box_game, box_season, arc_season, arc_live, loki, loki_release, onoff_season, lineups, wowy, channels, xpts_rapm, player_seasons, pac_season, skills_season) or a metric id (e.g. sk_playmaking, ocreated, o_sel_rim, xq_d). Pass nothing for the conventions (units, seasons, sample sizes).","inputSchema":{"type":"object","properties":{"table":{"type":"string"},"column":{"type":"string"},"metric":{"type":"string"}},"additionalProperties":false}},{"name":"search_players","description":"Find players by (part of) name, accent-insensitive. Returns pid, name, first/last season, position group (G/W/B).","inputSchema":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"integer"}},"required":["query"],"additionalProperties":false}},{"name":"player","description":"One-stop player profile for a season (owner 2026-10-25: show everything). ARC 2-season and 1-season (net, O, D, shot value SV, possession value PV), the full SV / PV tree (selection, conversion, retention, generation, O and D), SV by zone, ARC individual-skill view (a separate slicing of the same total), PAC, xPTS-RAPM, creation lens, top skills, LOKI, raw on/off, top WOWY partners, box score. Default season = the last full season until about the All-Star break of the season in progress (the response says so); pass season for the current one (2027 = 2026-27).","inputSchema":{"type":"object","properties":{"player":{"type":"string","description":"name or pid"},"season":{"type":"integer","description":"end year, e.g. 2026 = 2025-26"}},"required":["player"],"additionalProperties":false}},{"name":"leaderboard","description":"Ranked list from one source. source: arc_season | arc_live | loki | loki_release | onoff_season | box_season | xpts_rapm | pac_season | skills_season (e.g. sk_switchability_pct) | channels (metric = a metric id from describe, e.g. sk_playmaking, ocreated, xq_d; window 1-5, LOKI channels have one value per season). metric must be a column of that source. Filters: season, window (arc_season 1-5), release (loki R1-R4, or weekly for the in-progress season; default R1, newest for the in-progress season), min_poss, pos (G/W/B), team, per (box_season: total|per_game).","inputSchema":{"type":"object","properties":{"source":{"type":"string","enum":["arc_season","arc_live","loki_release","loki","onoff_season","box_season","xpts_rapm","pac_season","skills_season","channels"]},"metric":{"type":"string"},"season":{"type":"integer"},"window":{"type":"integer"},"release":{"type":"string"},"min_poss":{"type":"integer"},"pos":{"type":"string"},"team":{"type":"string"},"per":{"type":"string","enum":["total","per_game"]},"ascending":{"type":"boolean"},"limit":{"type":"integer"}},"required":["source"],"additionalProperties":false}},{"name":"compare","description":"Side-by-side comparison of 2-6 players for one season. source: all (default: ARC net / O / D / SV / PV, the SV / PV tree, SV by zone, individual-skill view, PAC, xPTS-RAPM, skills, LOKI, on/off, box in one answer) | arc_season | arc_svpv | arc_zones | arc_skill | pac_season | xpts_rapm | skills_season | loki_release | onoff_season | box_season. window = ARC window, default 2.","inputSchema":{"type":"object","properties":{"players":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":6},"season":{"type":"integer"},"source":{"type":"string","enum":["all","arc_season","arc_svpv","arc_zones","arc_skill","pac_season","xpts_rapm","skills_season","onoff_season","box_season","loki_release"]},"window":{"type":"integer"}},"required":["players"],"additionalProperties":false}},{"name":"game_log","description":"Box-score game log for a player and season (regular season or playoffs). last_n limits to the most recent games.","inputSchema":{"type":"object","properties":{"player":{"type":"string"},"season":{"type":"integer"},"season_type":{"type":"string","enum":["regular","playoffs"]},"last_n":{"type":"integer"}},"required":["player"],"additionalProperties":false}},{"name":"onoff","description":"Raw on/off splits for a player across seasons: team ratings and shot diet with him on vs off (games he played) plus the NBA.com-style tenure version. Unadjusted -- depends on teammates and opponents. season = one season; or from_season / to_season. No possession minimum: check on_poss / off_poss.","inputSchema":{"type":"object","properties":{"player":{"type":"string"},"season":{"type":"integer"},"from_season":{"type":"integer"},"to_season":{"type":"integer"}},"required":["player"],"additionalProperties":false}},{"name":"wowy","description":"With-or-without-you for teammates in a team-season: team ratings with both on, only A, only B, neither. Give two players, or one player to list his partners. No possession minimum: check poss_together (small states are noise).","inputSchema":{"type":"object","properties":{"player":{"type":"string"},"with":{"type":"string"},"season":{"type":"integer"},"limit":{"type":"integer"}},"required":["player"],"additionalProperties":false}},{"name":"lineups","description":"Lineup groups (2-5 players together) for a team-season, or the groups a player is in. size 2-5 (default 5). No possession minimum (default sort = possessions; use min_poss to filter). sort: poss | net | ortg | drtg.","inputSchema":{"type":"object","properties":{"team":{"type":"string"},"player":{"type":"string"},"season":{"type":"integer"},"size":{"type":"integer"},"sort":{"type":"string","enum":["poss","net","ortg","drtg"]},"min_poss":{"type":"integer"},"limit":{"type":"integer"}},"additionalProperties":false}},{"name":"game_ratings","description":"LUMA game ratings (the lumahoops.org/games page): every NBA regular-season game of 2025-26 and 2026-27, each player's Game ARC (points he added to his team's margin vs an average player in the same possessions), Game ARC per 100 possessions, the four ARC channels (shot value offense / defense, possession value gained / retained), the 0-10 game rating (6.6 = a typical game), PAC and his box score. level: players (default) or teams (team totals, average rating, channels). Filters: date (YYYY-MM-DD, or \"latest\" = the latest rated day; the default when no other filter is given), from, to, game_id, team, player (name), min_minutes. decomposition: true (players level) adds the full Game ARC decomposition: each channel split into its counted parts, shot parts by zone (rim, paint, mid, three) and free throws, attempts and makes per zone, plus one lineup number per channel; parts + lineup = the channel. Updated daily. Up to 5,000 rows per call; use offset for more.","inputSchema":{"type":"object","properties":{"level":{"type":"string","enum":["players","teams"]},"date":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"game_id":{"type":"string"},"team":{"type":"string"},"player":{"type":"string"},"min_minutes":{"type":"number"},"decomposition":{"type":"boolean"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"additionalProperties":false}},{"name":"docs","description":"Map of the LUMA agent docs (agent-to-agent): house rules, what each model is, every column defined, how to read ARC, published test results, FAQ, and the public pages to read for more. Read once per session, before explaining any LUMA model to a user.","inputSchema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"read_doc","description":"Read one LUMA agent doc. ids: README, boundary, concepts, how-to-read-arc, metrics, validation, faq. boundary = house rules (read before quoting numbers); concepts = the models; metrics = every column; how-to-read-arc = what an ARC number means; validation = test results; faq.","inputSchema":{"type":"object","properties":{"id":{"type":"string","enum":["README","boundary","concepts","how-to-read-arc","metrics","validation","faq"]}},"required":["id"],"additionalProperties":false}},{"name":"explain","description":"Explain one LUMA term (e.g. \"ARC\", \"LOKI\", \"shot value\", \"retention\", \"lineups\", \"Team FE\", \"cRAPM\", \"PAC\", \"p_top10\"): the matching definitions from the agent docs plus any metric channels with that name. Use it when a user asks what something means.","inputSchema":{"type":"object","properties":{"term":{"type":"string"}},"required":["term"],"additionalProperties":false}},{"name":"read_page","description":"Read a public LUMA page as text (lumahoops.org), for when the agent docs point to a page: e.g. /luma/arc/about, /luma/loki/about, /luma/pac, /luma/rapm, /luma/wins, /luma/changelog, /luma/papers/pac-working-paper-v1.pdf, /luma/research/possession-by-possession-fundamentalism. Long pages come in chunks: pass offset to continue.","inputSchema":{"type":"object","properties":{"url":{"type":"string","description":"lumahoops.org URL or path"},"offset":{"type":"integer"}},"required":["url"],"additionalProperties":false}},{"name":"sql","description":"Read-only SQL (DuckDB dialect) over the warehouse views: players, player_seasons (listed position / height by season), games, box_game, box_season, arc_season, arc_live, loki, loki_release, pac_season, skills_season (19 skill groups + season percentiles), onoff_season and lineups (incl. four factors and rebound shares), wowy, channels, xpts_rapm. One SELECT only, max 200 rows; PIVOT is not allowed (use max(x) filter (where ...)); quote \"window\" and \"asof\"; write every column alias with AS (a bare alias like load / value / rows / minutes is a syntax error). Use other tools first; call describe for column meanings.","inputSchema":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"integer"}},"required":["query"],"additionalProperties":false}}]}