propline-mcp 0.51.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,6 +31,9 @@ The model uses these tools transparently:
31
31
  | `propline_get_odds_history` | Hobby+: snapshot history per outcome; supports `period` (q1/h1/…) plus time-window filters (from/to, relative_from/relative_to, interval, changes_only) |
32
32
  | `propline_get_odds_closing` | Hobby+: opening **and** closing line per (book, market, outcome) — CLV helper. Accepts `period` to scope to a specific game period. |
33
33
  | `propline_grade_clv` | Hobby+: grade **placed** bets against their closing lines. Returns closing price, de-vigged closing fair (`fair_source` = sharpest book at close, not yours), `clv_pct` (price-vs-price, vig-blind) **and** `ev_vs_close_pct` (the honest number), plus the graded result once the game settles. Fail-closed matching; unstarted events come back `closing_is_final: false` and are excluded from the averages. `devig`: multiplicative or shin. |
34
+ | `propline_settle_bets` | Hobby+: settle **placed** bets, singles or parlays: won / lost / push / void / half_won / half_lost, with the stat each settled on, payout and profit. Works at books and lines PropLine never stored (`source: computed`); quarter lines settle as two half-stakes; `pending` until graded. |
35
+ | `propline_price_parlay` | Hobby+: fair price of a parlay across games from the no-vig lines, each leg's best price, every book's product price, EV% of an offered price. Same-game legs flagged. |
36
+ | `propline_lookup_event_ids` | Free: find PropLine's event (with result) from a sportsbook's own event id, an ESPN id or an MLB gamePk. |
34
37
  | `propline_price_sgp` | Hobby+: price a same-game parlay at the **book's own** correlated odds (FanDuel, DraftKings, BetOnline, LowVig — or `bookmaker: "all"` for every book side by side with `best_bookmaker`). Returns `sgp_price`, `independent_price` (product of the live single-leg prices) and `correlation_factor` (their ratio). Legs are named exactly as `/odds` names an outcome; matching is fail-closed. |
35
38
  | `propline_export_odds_history` | Backfill-pass / Enterprise: bulk line-movement tick history (every snapshot, per book) for a sport. Requires a `since`/`until` window; result capped to 200 rows (use the REST endpoint directly for the full file). |
36
39
  | `propline_get_futures` | Season-long futures — championship/division/conference winners, MVP + awards, season win totals — across Bovada/FanDuel/DraftKings/Pinnacle/Kalshi (free) |
@@ -45,6 +48,10 @@ The model uses these tools transparently:
45
48
  | `propline_get_golf_tournaments` | Golf tournaments with round data, by tour and season (free) |
46
49
  | `propline_get_injuries` | Current injury report for NFL, NCAAF, NBA, WNBA, NHL, MLB (free) |
47
50
  | `propline_get_injury_history` | Injury status changes over the last 1-90 days (free) |
51
+ | `propline_get_referees` | Referee card stats — cards per match, last and next match (32 soccer leagues, free) |
52
+ | `propline_get_referee_matches` | One referee's matches with each team's cards (32 soccer leagues, free) |
53
+ | `propline_get_market_coverage` | Every market each book prices on upcoming games, and on how many (free) |
54
+ | `propline_get_history_coverage` | When each book's odds history starts, per sport (free) |
48
55
  | `propline_get_event_stats` | Raw box-score stats (free, book-agnostic) |
49
56
  | `propline_get_event_context` | Game conditions a prop settles under — probable pitchers, lineup flag, home-plate umpire, first-pitch weather (free) |
50
57
  | `propline_get_event_movement` | Line movement + steam detection (sharp-money signal across all books) from the tick history (Hobby+). `since` (e.g. `-6h`) measures from a moment; `include_book_ids` adds book ids. |
@@ -62,7 +69,7 @@ The model uses these tools transparently:
62
69
 
63
70
  ## Hosted endpoint (no install)
64
71
 
65
- The same 36 tools are served over **Streamable HTTP** at
72
+ The same 41 tools are served over **Streamable HTTP** at
66
73
 
67
74
  ```
68
75
  https://mcp.prop-line.com/mcp
package/dist/http.js CHANGED
@@ -170,6 +170,14 @@ var PropLineClient = class {
170
170
  const qs = devig ? `?devig=${encodeURIComponent(devig)}` : "";
171
171
  return this.postRequest(`/v1/clv/grade${qs}`, bets);
172
172
  }
173
+ /** Settle placed bets (singles or parlays). Hobby+. */
174
+ settleBets(bets) {
175
+ return this.postRequest(`/v1/bets/settle`, bets);
176
+ }
177
+ /** Fair price of a parlay across games. Hobby+. */
178
+ priceParlay(body) {
179
+ return this.postRequest(`/v1/parlay/price`, body);
180
+ }
173
181
  /**
174
182
  * Price a same-game parlay at the book's own correlated odds (FanDuel
175
183
  * today). Hobby+. See the propline_price_sgp tool description.
@@ -241,6 +249,9 @@ var PropLineClient = class {
241
249
  getEventIds(sportKey) {
242
250
  return this.request(`/v1/sports/${sportKey}/ids`);
243
251
  }
252
+ lookupEventIds(opts) {
253
+ return this.request(`/v1/ids/lookup`, opts);
254
+ }
244
255
  getBookAccuracy(opts = {}) {
245
256
  return this.request(`/v1/books/accuracy`, {
246
257
  days: opts.days,
@@ -273,6 +284,29 @@ var PropLineClient = class {
273
284
  player: opts.player
274
285
  });
275
286
  }
287
+ getReferees(sportKey, opts = {}) {
288
+ return this.request(`/v1/sports/${encodeURIComponent(sportKey)}/referees`, {
289
+ search: opts.search,
290
+ since: opts.since,
291
+ until: opts.until
292
+ });
293
+ }
294
+ getRefereeMatches(sportKey, name, opts = {}) {
295
+ return this.request(
296
+ `/v1/sports/${encodeURIComponent(sportKey)}/referees/${encodeURIComponent(name)}/matches`,
297
+ { since: opts.since, until: opts.until, limit: opts.limit }
298
+ );
299
+ }
300
+ getMarketCoverage(sportKey, opts = {}) {
301
+ return this.request(`/v1/coverage/markets`, {
302
+ sport: sportKey,
303
+ days: opts.days,
304
+ periods: opts.periods === void 0 ? void 0 : opts.periods ? "true" : "false"
305
+ });
306
+ }
307
+ getHistoryCoverage(sportKey) {
308
+ return this.request(`/v1/coverage/history`, { sport: sportKey });
309
+ }
276
310
  getFutures(sportKey) {
277
311
  return this.request(`/v1/sports/${sportKey}/futures`);
278
312
  }
@@ -379,7 +413,7 @@ var PropLineClient = class {
379
413
  };
380
414
 
381
415
  // src/server.ts
382
- var VERSION = "0.51.0";
416
+ var VERSION = "0.55.0";
383
417
  var DEMO_KEY = "be2b8487fcfacb1fbc292a8aa925a84c";
384
418
  var apiKey = process.env.PROPLINE_API_KEY;
385
419
  var baseUrl = process.env.PROPLINE_BASE_URL;
@@ -693,6 +727,86 @@ var tools = [
693
727
  },
694
728
  handler: (args) => client().gradeClv(args.bets, args.devig)
695
729
  },
730
+ {
731
+ name: "propline_settle_bets",
732
+ title: "Settle placed bets (won / lost / push / void)",
733
+ description: "Hobby+ endpoint. Settles PLACED bets, singles or parlays, against final results: each comes back won, lost, push, void, half_won or half_lost, with actual_value (the stat or score it settled on), payout (stake included) and profit, plus a summary. The book and the line are free: a bet at a book PropLine does not carry, or at a line nobody posted, is graded by running PropLine's grader at that line (source='computed'); a named bookmaker whose outcome was stored at that exact line uses its own grade (source='stored'). Asian quarter lines (2.75, -0.25) settle as two half-stakes. result 'pending' means the game is not graded yet \u2014 say so, do not guess. 'unmatched' carries a reason (event_not_found, no_market_for_key, no_outcome_for_selection, ambiguous_selection, cannot_compute_at_line, invalid_bet): surface those rows. For a parlay pass legs (each with its own price); any lost leg loses it and pushed/voided legs drop out. Use propline_list_events or propline_get_scores to find event_id. Max 200 bets. Stateless. Free tier returns results as 'redacted'.",
734
+ inputSchema: {
735
+ type: "object",
736
+ properties: {
737
+ bets: {
738
+ type: "array",
739
+ maxItems: 200,
740
+ description: "Bets to settle. A single bet uses the leg fields directly; a parlay sets legs.",
741
+ items: {
742
+ type: "object",
743
+ properties: {
744
+ ref: { type: "string", description: "Echoed back." },
745
+ stake: { type: "number", description: "Defaults to 1." },
746
+ sport_key: { type: "string" },
747
+ event_id: { type: ["string", "number"] },
748
+ market: { type: "string" },
749
+ selection: {
750
+ type: "string",
751
+ description: "Player for a prop, team for a game line, 'Over'/'Under' for a game total."
752
+ },
753
+ side: { type: "string", description: "Over/Under/Yes/No for two-way markets." },
754
+ point: { type: "number", description: "The bettor's line." },
755
+ period: { type: "string", description: "Canonical period code (q1, h1, f5). Omit for full game." },
756
+ team: { type: "string", description: "Scope a totals bet to one team's total." },
757
+ bookmaker: { type: "string", description: "Optional book the bet was placed at." },
758
+ price: { type: "number", description: "American odds taken. Needed for payout." },
759
+ legs: {
760
+ type: "array",
761
+ maxItems: 20,
762
+ description: "Parlay legs; each has the single-bet fields above.",
763
+ items: { type: "object" }
764
+ }
765
+ },
766
+ additionalProperties: false
767
+ }
768
+ }
769
+ },
770
+ required: ["bets"],
771
+ additionalProperties: false
772
+ },
773
+ handler: (args) => client().settleBets(args.bets)
774
+ },
775
+ {
776
+ name: "propline_price_parlay",
777
+ title: "Price a parlay across games",
778
+ description: "Hobby+ endpoint. Fair price of a parlay across games (2-15 legs), from the same no-vig fair lines as propline_get_event_ev. Returns fair_price for the parlay, each leg's fair_price and best price + book, best_legs_price, books (every book that prices all the legs: the product of its leg prices, with ev_pct), and offered_ev_pct when price is given. The fair price ASSUMES INDEPENDENT LEGS: legs on the same event are flagged same_game \u2014 say so, and use propline_price_sgp for same-game parlays. A leg that matches no fair line returns a reason and the parlay is not priced. Never present the EV as a profit guarantee.",
779
+ inputSchema: {
780
+ type: "object",
781
+ properties: {
782
+ legs: {
783
+ type: "array",
784
+ minItems: 2,
785
+ maxItems: 15,
786
+ items: {
787
+ type: "object",
788
+ properties: {
789
+ sport_key: { type: "string" },
790
+ event_id: { type: ["string", "number"] },
791
+ market: { type: "string" },
792
+ selection: { type: "string", description: "Team, player, or Over/Under for a game total." },
793
+ side: { type: "string" },
794
+ point: { type: "number" },
795
+ team: { type: "string", description: "For a team total." },
796
+ price: { type: "number", description: "Offered price for this leg." }
797
+ },
798
+ required: ["sport_key", "event_id", "market", "selection"],
799
+ additionalProperties: false
800
+ }
801
+ },
802
+ price: { type: "number", description: "Parlay price offered (American)." },
803
+ devig: { type: "string", enum: ["multiplicative", "shin"] }
804
+ },
805
+ required: ["legs"],
806
+ additionalProperties: false
807
+ },
808
+ handler: (args) => client().priceParlay({ legs: args.legs, price: args.price, devig: args.devig })
809
+ },
696
810
  {
697
811
  name: "propline_price_sgp",
698
812
  title: "Price a same-game parlay at the book's own odds",
@@ -903,6 +1017,27 @@ var tools = [
903
1017
  },
904
1018
  handler: (args) => client().getEventIds(args.sport_key)
905
1019
  },
1020
+ {
1021
+ name: "propline_lookup_event_ids",
1022
+ title: "Find an event by a book, ESPN or MLB id",
1023
+ description: "Free-tier endpoint. Reverse id lookup: give a sportsbook's own event id (book + book_event_id, e.g. book='pinnacle'), an ESPN event id or an MLB gamePk and get PropLine's event back with its full id crosswalk, status, completed flag and final score. Any date. Up to 50 comma-separated ids; misses come back in not_found. Useful for: 'what was the result of Pinnacle event 1612345678', 'which PropLine event is this ESPN game'.",
1024
+ inputSchema: {
1025
+ type: "object",
1026
+ properties: {
1027
+ book: { type: "string", description: "Book key, e.g. pinnacle, draftkings, kalshi." },
1028
+ book_event_id: { type: "string", description: "That book's event id(s), comma-separated." },
1029
+ espn_event_id: { type: "string" },
1030
+ mlb_game_pk: { type: "string" }
1031
+ },
1032
+ additionalProperties: false
1033
+ },
1034
+ handler: (args) => client().lookupEventIds({
1035
+ book: args.book,
1036
+ book_event_id: args.book_event_id,
1037
+ espn_event_id: args.espn_event_id,
1038
+ mlb_game_pk: args.mlb_game_pk
1039
+ })
1040
+ },
906
1041
  {
907
1042
  name: "propline_get_book_accuracy",
908
1043
  title: "Get sportsbook accuracy report",
@@ -1015,6 +1150,82 @@ var tools = [
1015
1150
  player: args.player
1016
1151
  })
1017
1152
  },
1153
+ {
1154
+ name: "propline_get_referees",
1155
+ title: "Get referee card stats",
1156
+ description: "Free-tier endpoint. Card stats per referee: graded matches, yellow and red cards, cards per match, last match and next appointment. 32 soccer leagues (Premier League, La Liga, Serie A, Bundesliga, Ligue 1, MLS, Championship, Eredivisie, Liga MX, Brasileirao, UEFA cups, Libertadores, Sudamericana and others); other sports 404 with available_sports. Useful for: 'which EPL referee gives the most cards', 'who is refereeing Arsenal next' \u2014 check it before a cards prop.",
1157
+ inputSchema: {
1158
+ type: "object",
1159
+ properties: {
1160
+ sport_key: { type: "string", description: "A soccer league key, e.g. soccer_epl, soccer_la_liga, soccer_mls." },
1161
+ search: { type: "string", description: "Optional referee name (substring match)." },
1162
+ since: { type: "string", description: "Optional start date, YYYY-MM-DD." },
1163
+ until: { type: "string", description: "Optional end date, YYYY-MM-DD." }
1164
+ },
1165
+ required: ["sport_key"],
1166
+ additionalProperties: false
1167
+ },
1168
+ handler: (args) => client().getReferees(args.sport_key, {
1169
+ search: args.search,
1170
+ since: args.since,
1171
+ until: args.until
1172
+ })
1173
+ },
1174
+ {
1175
+ name: "propline_get_referee_matches",
1176
+ title: "Get a referee's matches",
1177
+ description: "Free-tier endpoint. One referee's summary plus their matches, newest first, with each team's yellow and red cards (null until graded) and upcoming appointments. Same 32 soccer leagues as propline_get_referees. Get exact names from propline_get_referees.",
1178
+ inputSchema: {
1179
+ type: "object",
1180
+ properties: {
1181
+ sport_key: { type: "string", description: "A soccer league key, e.g. soccer_epl, soccer_la_liga, soccer_mls." },
1182
+ name: { type: "string", description: "Referee name, e.g. Michael Oliver." },
1183
+ since: { type: "string", description: "Optional start date, YYYY-MM-DD." },
1184
+ until: { type: "string", description: "Optional end date, YYYY-MM-DD." },
1185
+ limit: { type: "number", description: "1-500. Defaults to 100." }
1186
+ },
1187
+ required: ["sport_key", "name"],
1188
+ additionalProperties: false
1189
+ },
1190
+ handler: (args) => client().getRefereeMatches(args.sport_key, args.name, {
1191
+ since: args.since,
1192
+ until: args.until,
1193
+ limit: args.limit
1194
+ })
1195
+ },
1196
+ {
1197
+ name: "propline_get_market_coverage",
1198
+ title: "Get market coverage by book",
1199
+ description: "Free-tier endpoint. Every market each book is pricing on a sport's games in the next N days, and on how many of those games. Returns the game count and, per book, game_lines and props entries {market, period, events, markets, last_update}. Useful for: 'which books have NFL player props posted', 'does FanDuel price this market yet'. Books post props at different times, so a low events count means not posted on every game yet.",
1200
+ inputSchema: {
1201
+ type: "object",
1202
+ properties: {
1203
+ sport_key: { type: "string", description: "e.g. football_nfl, baseball_mlb." },
1204
+ days: { type: "number", description: "Games starting in the next N days, 1-7. Defaults to 3." },
1205
+ periods: { type: "boolean", description: "Include quarter / half / inning markets. Defaults to false." }
1206
+ },
1207
+ required: ["sport_key"],
1208
+ additionalProperties: false
1209
+ },
1210
+ handler: (args) => client().getMarketCoverage(args.sport_key, {
1211
+ days: args.days,
1212
+ periods: args.periods
1213
+ })
1214
+ },
1215
+ {
1216
+ name: "propline_get_history_coverage",
1217
+ title: "Get odds history coverage by book",
1218
+ description: "Free-tier endpoint. When each book's odds history starts for a sport: history_start, game_lines_start, props_start, latest_event, event count, and whether the book is retired. Useful for: 'how far back do we have Fanatics MLB props'.",
1219
+ inputSchema: {
1220
+ type: "object",
1221
+ properties: {
1222
+ sport_key: { type: "string", description: "e.g. baseball_mlb." }
1223
+ },
1224
+ required: ["sport_key"],
1225
+ additionalProperties: false
1226
+ },
1227
+ handler: (args) => client().getHistoryCoverage(args.sport_key)
1228
+ },
1018
1229
  {
1019
1230
  name: "propline_get_event_stats",
1020
1231
  title: "Get event stats",