@0xinsider/mcp 3.7.0 → 3.9.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.
Files changed (66) hide show
  1. package/README.md +16 -1
  2. package/dist/catalog.generated.d.ts +56 -0
  3. package/dist/catalog.generated.d.ts.map +1 -1
  4. package/dist/catalog.generated.js +70 -0
  5. package/dist/catalog.generated.js.map +1 -1
  6. package/dist/client.d.ts +3 -0
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js.map +1 -1
  9. package/dist/constants.d.ts +1 -1
  10. package/dist/constants.js +1 -1
  11. package/dist/product-cli/index.d.ts.map +1 -1
  12. package/dist/product-cli/index.js +21 -2
  13. package/dist/product-cli/index.js.map +1 -1
  14. package/dist/product-cli/operations.d.ts.map +1 -1
  15. package/dist/product-cli/operations.js +19 -2
  16. package/dist/product-cli/operations.js.map +1 -1
  17. package/dist/sdk/client.d.ts +202 -3
  18. package/dist/sdk/client.d.ts.map +1 -1
  19. package/dist/sdk/client.js +217 -3
  20. package/dist/sdk/client.js.map +1 -1
  21. package/dist/sdk/index.d.ts +2 -2
  22. package/dist/sdk/index.d.ts.map +1 -1
  23. package/dist/sdk/index.js.map +1 -1
  24. package/dist/sdk/schema.d.ts +1130 -27
  25. package/dist/sdk/schema.d.ts.map +1 -1
  26. package/dist/server.d.ts.map +1 -1
  27. package/dist/server.js +21 -4
  28. package/dist/server.js.map +1 -1
  29. package/dist/tools/account.d.ts +5 -0
  30. package/dist/tools/account.d.ts.map +1 -0
  31. package/dist/tools/account.js +53 -0
  32. package/dist/tools/account.js.map +1 -0
  33. package/dist/tools/category-leaderboards.d.ts +5 -0
  34. package/dist/tools/category-leaderboards.d.ts.map +1 -0
  35. package/dist/tools/category-leaderboards.js +71 -0
  36. package/dist/tools/category-leaderboards.js.map +1 -0
  37. package/dist/tools/games.d.ts +4 -0
  38. package/dist/tools/games.d.ts.map +1 -1
  39. package/dist/tools/games.js +152 -6
  40. package/dist/tools/games.js.map +1 -1
  41. package/dist/tools/get-leaderboard.d.ts.map +1 -1
  42. package/dist/tools/get-leaderboard.js +31 -4
  43. package/dist/tools/get-leaderboard.js.map +1 -1
  44. package/dist/tools/get-whale-trades.d.ts.map +1 -1
  45. package/dist/tools/get-whale-trades.js +11 -1
  46. package/dist/tools/get-whale-trades.js.map +1 -1
  47. package/dist/tools/market-reads.d.ts +2 -0
  48. package/dist/tools/market-reads.d.ts.map +1 -1
  49. package/dist/tools/market-reads.js +58 -4
  50. package/dist/tools/market-reads.js.map +1 -1
  51. package/dist/tools/pick-of-the-day.d.ts +1 -0
  52. package/dist/tools/pick-of-the-day.d.ts.map +1 -1
  53. package/dist/tools/pick-of-the-day.js +20 -0
  54. package/dist/tools/pick-of-the-day.js.map +1 -1
  55. package/dist/tools/read-parity.d.ts +1 -0
  56. package/dist/tools/read-parity.d.ts.map +1 -1
  57. package/dist/tools/read-parity.js +41 -0
  58. package/dist/tools/read-parity.js.map +1 -1
  59. package/dist/tools/search-markets.js +4 -4
  60. package/dist/tools/search-markets.js.map +1 -1
  61. package/dist/tools/sport-leaderboards.d.ts +5 -0
  62. package/dist/tools/sport-leaderboards.d.ts.map +1 -0
  63. package/dist/tools/sport-leaderboards.js +65 -0
  64. package/dist/tools/sport-leaderboards.js.map +1 -0
  65. package/dist/tools/trader-reads.js +1 -1
  66. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAkMzD,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAEvF;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAkB/C"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AA0NzD,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAEvF;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAkB/C"}
package/dist/server.js CHANGED
@@ -13,13 +13,16 @@ import { registerGetPositions } from "./tools/get-positions.js";
13
13
  import { registerGetPositionTimeline } from "./tools/get-position-timeline.js";
14
14
  import { registerGetLargePositions } from "./tools/get-large-positions.js";
15
15
  import { registerGetTrendingWallets } from "./tools/get-trending-wallets.js";
16
+ import { registerGetLeaderboardLeagues, registerGetSportLeaderboard } from "./tools/sport-leaderboards.js";
17
+ import { registerGetCategoryLeaderboard, registerListCategoryLeaders } from "./tools/category-leaderboards.js";
16
18
  import { registerGetTraderPnl } from "./tools/get-trader-pnl.js";
17
19
  import { registerExploreMarkets } from "./tools/explore-markets.js";
18
- import { registerGetGame, registerListGames } from "./tools/games.js";
19
- import { registerGetPickOfTheDay, registerGetPickOfTheDayArchive, registerGetPickOfTheDayLedgerEntry, } from "./tools/pick-of-the-day.js";
20
- import { registerBatchGetMarketFlow, registerBatchGetMarketIntel, registerBatchGetTraders, registerGetDailyReportSnapshot, registerGetEventReplaySince, registerGetInsiderRadarFlag, registerGetMarketSnapshot, registerGetEdgeHunter, registerGetMonthlyReportSnapshot, registerGetCoverage, registerGetPlatforms, registerGetPositionTimelineById, registerGetSharpMoneyFlows, registerGetReport, registerSearchContent, registerGetSmartMoneyFlows, registerGetTraderExportSnapshot, registerGetWebhook, registerGetWeeklyReportSnapshot, registerGetLargeTrade, registerGetLargeTradesHistory, registerGetWhaleTrade, registerGetWhaleTradesHistory, registerListWebhooks, } from "./tools/read-parity.js";
20
+ import { registerGetGame, registerGetGameHolders, registerGetGameSharpMoney, registerGetGameTrades, registerListGameMarkets, registerListGames } from "./tools/games.js";
21
+ import { registerGetAccount, registerGetUsage } from "./tools/account.js";
22
+ import { registerGetPickOfTheDay, registerGetPickOfTheDayArchive, registerGetPickOfTheDayStats, registerGetPickOfTheDayLedgerEntry, } from "./tools/pick-of-the-day.js";
23
+ import { registerBatchGetMarketFlow, registerBatchGetMarketIntel, registerBatchGetTraders, registerGetDailyReportSnapshot, registerGetEventReplaySince, registerGetInsiderRadarFlag, registerGetMarketSnapshot, registerGetEdgeHunter, registerGetMonthlyReportSnapshot, registerGetResolutionReport, registerGetCoverage, registerGetPlatforms, registerGetPositionTimelineById, registerGetSharpMoneyFlows, registerGetReport, registerSearchContent, registerGetSmartMoneyFlows, registerGetTraderExportSnapshot, registerGetWebhook, registerGetWeeklyReportSnapshot, registerGetLargeTrade, registerGetLargeTradesHistory, registerGetWhaleTrade, registerGetWhaleTradesHistory, registerListWebhooks, } from "./tools/read-parity.js";
21
24
  import { registerGetTraderCategories, registerGetTraderContext, registerGetTraderGradeAt, } from "./tools/trader-reads.js";
22
- import { registerGetMarketCandles, registerGetMarketHolders } from "./tools/market-reads.js";
25
+ import { registerGetMarketCandles, registerGetMarketHolders, registerGetMarketWalletsInOut, registerGetMarketTopHolders, } from "./tools/market-reads.js";
23
26
  import { registerGetCombo, registerGetComboFills, registerGetCombosSummary } from "./tools/combos.js";
24
27
  import { registerGetLargeTradeCounterpartyExecutions, registerGetLargeTradeCounterpartyMakers, } from "./tools/large-trade-counterparties.js";
25
28
  import { registerResources } from "./resources/index.js";
@@ -48,6 +51,10 @@ const TOOL_REGISTRATIONS = {
48
51
  get_edge_hunter: registerGetEdgeHunter,
49
52
  list_games: registerListGames,
50
53
  get_game: registerGetGame,
54
+ list_game_markets: registerListGameMarkets,
55
+ get_game_sharp_money: registerGetGameSharpMoney,
56
+ get_game_trades: registerGetGameTrades,
57
+ get_game_holders: registerGetGameHolders,
51
58
  get_suspicious_trades: registerGetSuspiciousTrades,
52
59
  get_suspicious_trade: registerGetSuspiciousTrade,
53
60
  get_insider_radar: registerGetInsiderRadar,
@@ -64,21 +71,31 @@ const TOOL_REGISTRATIONS = {
64
71
  get_daily_report_snapshot: registerGetDailyReportSnapshot,
65
72
  get_weekly_report_snapshot: registerGetWeeklyReportSnapshot,
66
73
  get_monthly_report_snapshot: registerGetMonthlyReportSnapshot,
74
+ get_resolution_report: registerGetResolutionReport,
67
75
  get_report: registerGetReport,
68
76
  get_trader_export_snapshot: registerGetTraderExportSnapshot,
69
77
  get_coverage: registerGetCoverage,
70
78
  get_platforms: registerGetPlatforms,
79
+ get_usage: registerGetUsage,
80
+ get_account: registerGetAccount,
71
81
  get_large_positions: registerGetLargePositions,
72
82
  get_trending_wallets: registerGetTrendingWallets,
83
+ get_leaderboard_leagues: registerGetLeaderboardLeagues,
84
+ get_sport_leaderboard: registerGetSportLeaderboard,
85
+ list_category_leaders: registerListCategoryLeaders,
86
+ get_category_leaderboard: registerGetCategoryLeaderboard,
73
87
  get_trader_pnl: registerGetTraderPnl,
74
88
  get_pick_of_the_day: registerGetPickOfTheDay,
75
89
  get_pick_of_the_day_archive: registerGetPickOfTheDayArchive,
90
+ get_pick_of_the_day_stats: registerGetPickOfTheDayStats,
76
91
  get_pick_of_the_day_ledger_entry: registerGetPickOfTheDayLedgerEntry,
77
92
  get_trader_context: registerGetTraderContext,
78
93
  get_trader_categories: registerGetTraderCategories,
79
94
  get_trader_grade_at: registerGetTraderGradeAt,
80
95
  get_market_holders: registerGetMarketHolders,
96
+ get_market_top_holders: registerGetMarketTopHolders,
81
97
  get_market_candles: registerGetMarketCandles,
98
+ get_market_wallets_in_out: registerGetMarketWalletsInOut,
82
99
  get_combo_fills: registerGetComboFills,
83
100
  get_combos_summary: registerGetCombosSummary,
84
101
  get_combo: registerGetCombo,
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,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F,CAAC;IACJ,CAAC;IAED,oEAAoE;IACpE,MAAM,KAAK,GAAG,MAAM,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IACxE,wEAAwE;IACxE,0EAA0E;IAC1E,2EAA2E;IAC3E,gCAAgC;IAChC,UAAU,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;QACnC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,gBAAgB,EAAE,KAAK,CAAC;KACzE,CAAC,CAAC;IACH,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,+BAA+B,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
+ import { ApiClient } from "../client.js";
3
+ export declare function registerGetUsage(server: McpServer, client: ApiClient): void;
4
+ export declare function registerGetAccount(server: McpServer, client: ApiClient): void;
5
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/tools/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAezC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAsB3E;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAsB7E"}
@@ -0,0 +1,53 @@
1
+ import { z } from "zod";
2
+ import { fail, ok, withMeta } from "./result.js";
3
+ // The caller's own account over stdio (#32158). They mirror the remote entries
4
+ // in backend/src/mcp/tools/contract.rs; scripts/check-mcp-stdio-contract-parity.mjs
5
+ // compares each advertised body with the remote catalog. Over stdio they call
6
+ // GET /api/v1/usage and GET /api/v1/me, which cost no monthly quota.
7
+ const readAnnotations = {
8
+ readOnlyHint: true,
9
+ destructiveHint: false,
10
+ idempotentHint: true,
11
+ openWorldHint: false,
12
+ };
13
+ export function registerGetUsage(server, client) {
14
+ server.registerTool("get_usage", {
15
+ title: "Get API Usage",
16
+ description: `Read the calling credential's own request budget: the per-minute rate limit (used, limit, remaining, reset_at), today's UTC usage, and the monthly quota (used, limit, remaining, reset_at, binding, pay_as_you_go, ceiling, unavailable_reason). Call it before a long run and slow down or stop before monthly_quota.remaining reaches 0; when binding is true, requests past the limit are refused until reset_at. It costs no monthly quota and no per-minute request: it shares a separate 100 reads/minute inspection allowance with get_account. monthly_quota is null with unavailable_reason when the month's count cannot be read.
17
+
18
+ Args: none
19
+
20
+ Returns: rate_limit, daily_usage and monthly_quota. Times are Unix seconds.`,
21
+ inputSchema: z.object({}),
22
+ annotations: readAnnotations,
23
+ }, async (_args, ctx) => {
24
+ try {
25
+ const response = await client.request("/api/v1/usage", undefined, undefined, { signal: ctx.mcpReq.signal });
26
+ return ok(withMeta(response.data, response.meta));
27
+ }
28
+ catch (error) {
29
+ return fail(error);
30
+ }
31
+ });
32
+ }
33
+ export function registerGetAccount(server, client) {
34
+ server.registerTool("get_account", {
35
+ title: "Get Account Identity",
36
+ description: `Identify the calling account and credential: user_id, credential_id, credential_kind (api_key, oauth_grant or integration_key), credential_status, entitlement (paid_data_access active or lapsed, and the recovery_action when lapsed) and scopes (null for full developer-key access). Use it to confirm which account an agent is spending before a run. It costs no monthly quota and no per-minute request: it shares a separate 100 reads/minute inspection allowance with get_usage. It returns no secret, payment or contact detail.
37
+
38
+ Args: none
39
+
40
+ Returns: user_id, credential_id, credential_kind, credential_status, entitlement and scopes.`,
41
+ inputSchema: z.object({}),
42
+ annotations: readAnnotations,
43
+ }, async (_args, ctx) => {
44
+ try {
45
+ const response = await client.request("/api/v1/me", undefined, undefined, { signal: ctx.mcpReq.signal });
46
+ return ok(withMeta(response.data, response.meta));
47
+ }
48
+ catch (error) {
49
+ return fail(error);
50
+ }
51
+ });
52
+ }
53
+ //# sourceMappingURL=account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/tools/account.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEjD,+EAA+E;AAC/E,oFAAoF;AACpF,8EAA8E;AAC9E,qEAAqE;AAErE,MAAM,eAAe,GAAG;IACtB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACZ,CAAC;AAEX,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,MAAiB;IACnE,MAAM,CAAC,YAAY,CACjB,WAAW,EACX;QACE,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE;;;;4EAIyD;QACtE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,WAAW,EAAE,eAAe;KAC7B,EACD,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACnB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;YAC5G,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,MAAiB,EAAE,MAAiB;IACrE,MAAM,CAAC,YAAY,CACjB,aAAa,EACb;QACE,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE;;;;6FAI0E;QACvF,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,WAAW,EAAE,eAAe;KAC7B,EACD,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACnB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;YACzG,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
+ import { ApiClient } from "../client.js";
3
+ export declare function registerListCategoryLeaders(server: McpServer, client: ApiClient): void;
4
+ export declare function registerGetCategoryLeaderboard(server: McpServer, client: ApiClient): void;
5
+ //# sourceMappingURL=category-leaderboards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category-leaderboards.d.ts","sourceRoot":"","sources":["../../src/tools/category-leaderboards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAezC,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAwBtF;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA2CzF"}
@@ -0,0 +1,71 @@
1
+ import { z } from "zod";
2
+ import { fail, listResult, ok } from "./result.js";
3
+ // Category edge leaderboards over stdio (#32226). They mirror the remote
4
+ // entries in backend/src/mcp/tools/contract.rs; scripts/mcp-catalog-parity.mjs
5
+ // proves the two tool lists match, and the description text is kept in step by
6
+ // hand.
7
+ const readAnnotations = {
8
+ readOnlyHint: true,
9
+ destructiveHint: false,
10
+ idempotentHint: true,
11
+ openWorldHint: false,
12
+ };
13
+ export function registerListCategoryLeaders(server, client) {
14
+ server.registerTool("list_category_leaders", {
15
+ title: "List Category Leaders",
16
+ description: `List every sports and esports category's top three edge leaders, the board the site's categories index shows: in each category, wallets ranked by the 95% lower bound of their edge over the price they paid, counted over independent events. Only wallets whose lower bound is above zero are listed, so a category can carry fewer than three. Rows come by category, then rank; get_category_leaderboard pages one category's full ranking.
17
+
18
+ Args: none
19
+
20
+ Returns: rows (rank, category, id, address, username, platform, grade, edge_lower_bound, independent_events, unresolved_events, n_resolved, win_rate, pnl, as_of).`,
21
+ inputSchema: z.object({}),
22
+ annotations: readAnnotations,
23
+ }, async (_args, ctx) => {
24
+ try {
25
+ const response = await client.request("/api/v1/leaderboard/categories", undefined, undefined, {
26
+ signal: ctx.mcpReq.signal,
27
+ });
28
+ return ok(listResult(response));
29
+ }
30
+ catch (error) {
31
+ return fail(error);
32
+ }
33
+ });
34
+ }
35
+ export function registerGetCategoryLeaderboard(server, client) {
36
+ server.registerTool("get_category_leaderboard", {
37
+ title: "Get Category Leaderboard",
38
+ description: `Get one sports or esports category's edge leaderboard, the board the site's category pages show: wallets ranked by the 95% lower bound of their edge over the price they paid in the category, counted over independent events, best first. Only wallets whose lower bound is above zero are listed; total counts them. active_within keeps wallets that traded in the category within 7d, 30d or 90d, and min_events sets the independent events a wallet needs. Cursor-paginated; a cursor issued before the ranking refreshed returns cursor_expired.
39
+
40
+ A slug outside sports and esports is not_found on slug.
41
+
42
+ Args:
43
+ - slug (string, required): Category slug, e.g. soccer, basketball, tennis, esports
44
+ - active_within (string, optional): all (default), 7d, 30d or 90d
45
+ - min_events (number, optional, default 0): Independent events a wallet needs in the category
46
+ - limit (number, 1-100, default 20): Max results per page
47
+ - cursor (string, optional): Opaque pagination cursor from previous response
48
+
49
+ Returns: rows (rank, category, id, address, username, platform, grade, edge_lower_bound, independent_events, unresolved_events, n_resolved, win_rate, pnl, as_of) and pagination metadata.`,
50
+ inputSchema: z.object({
51
+ slug: z.string().trim().min(1).describe("Category slug, e.g. soccer, basketball, tennis or esports"),
52
+ active_within: z
53
+ .enum(["all", "7d", "30d", "90d"])
54
+ .default("all")
55
+ .describe("Keep wallets that traded in the category within this window"),
56
+ min_events: z.number().int().min(0).default(0).describe("Independent events a wallet needs in the category"),
57
+ limit: z.number().int().min(1).max(100).default(20).describe("Max results per page (1-100, default 20)"),
58
+ cursor: z.string().optional().describe("Opaque pagination cursor from previous response"),
59
+ }),
60
+ annotations: readAnnotations,
61
+ }, async ({ slug, active_within, min_events, limit, cursor }, ctx) => {
62
+ try {
63
+ const response = await client.request(`/api/v1/leaderboard/categories/${encodeURIComponent(slug)}`, { active_within, min_events, limit, cursor }, undefined, { signal: ctx.mcpReq.signal });
64
+ return ok(listResult(response));
65
+ }
66
+ catch (error) {
67
+ return fail(error);
68
+ }
69
+ });
70
+ }
71
+ //# sourceMappingURL=category-leaderboards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category-leaderboards.js","sourceRoot":"","sources":["../../src/tools/category-leaderboards.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEnD,yEAAyE;AACzE,+EAA+E;AAC/E,+EAA+E;AAC/E,QAAQ;AAER,MAAM,eAAe,GAAG;IACtB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACZ,CAAC;AAEX,MAAM,UA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AAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mDAAmD,CAAC;YAC5G,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,0CAA0C,CAAC;YACxG,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;SAC1F,CAAC;QACF,WAAW,EAAE,eAAe;KAC7B,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE;QAChE,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CACnC,kCAAkC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAC5D,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAC5C,SAAS,EACT,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAC9B,CAAC;YACF,OAAO,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -2,4 +2,8 @@ import { McpServer } from "@modelcontextprotocol/server";
2
2
  import { ApiClient } from "../client.js";
3
3
  export declare function registerListGames(server: McpServer, client: ApiClient): void;
4
4
  export declare function registerGetGame(server: McpServer, client: ApiClient): void;
5
+ export declare function registerListGameMarkets(server: McpServer, client: ApiClient): void;
6
+ export declare function registerGetGameSharpMoney(server: McpServer, client: ApiClient): void;
7
+ export declare function registerGetGameTrades(server: McpServer, client: ApiClient): void;
8
+ export declare function registerGetGameHolders(server: McpServer, client: ApiClient): void;
5
9
  //# sourceMappingURL=games.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"games.d.ts","sourceRoot":"","sources":["../../src/tools/games.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAoE5E;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA6B1E"}
1
+ {"version":3,"file":"games.d.ts","sourceRoot":"","sources":["../../src/tools/games.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAWzC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA0E5E;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA6B1E;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAyDlF;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA6BpF;AAID,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAsChF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAsCjF"}
@@ -6,7 +6,8 @@
6
6
  // `backend/src/mcp/tools/schema.rs`, so the remote endpoint and this stdio
7
7
  // server answer the same page for the same arguments.
8
8
  import { z } from "zod";
9
- import { fail, ok, withMeta } from "./result.js";
9
+ import { MAX_BATCH_ITEMS } from "../constants.js";
10
+ import { fail, listResult, ok, withMeta } from "./result.js";
10
11
  const readAnnotations = {
11
12
  readOnlyHint: true,
12
13
  destructiveHint: false,
@@ -16,17 +17,19 @@ const readAnnotations = {
16
17
  export function registerListGames(server, client) {
17
18
  server.registerTool("list_games", {
18
19
  title: "List covered games",
19
- description: `The fixture list: one coherent game per row, so an agent never has to assemble a game from market searches and team-name matching. Each row carries both sides with their provider ids and live scores, the UTC kickoff, the provider's own status, the esports series format, and every linked Polymarket market with its condition_id and outcome token ids. Ordered by kickoff, then event_slug; games whose kickoff the provider has not published sort last.
20
+ description: `The fixture list: one coherent game per row, so an agent never has to assemble a game from market searches and team-name matching. Each row carries both sides with their provider ids and live scores, the UTC kickoff, the provider's own status, the esports series format, and the game's winner markets (the moneyline, or a soccer game's three 1X2 legs) with their condition_id, outcome token ids and provider moneyline prices. A game's spreads, totals and player props are not on the row: list_game_markets lists every market of one event_slug. Ordered by kickoff, then event_slug; games whose kickoff the provider has not published sort last. For what is on now, pass window=now: without it the list is the whole catalog and starts at the oldest game still open, which can be weeks old.
20
21
 
21
22
  Args:
22
23
  - sport (string, optional): canonical bucket, case-insensitive, with - and _ read as a space (table-tennis and Table Tennis are one bucket). Omitted means every covered sport
23
24
  - league (string, optional): league tag as coverage.leagues spells it (nfl, epl, cs2), case-insensitive
24
- - status (string, optional): scheduled, live, paused, ended, postponed, cancelled, suspended, delayed, or unknown
25
+ - status (string, optional): scheduled, live, paused, ended, postponed, cancelled, suspended, delayed, or unknown. ended, cancelled and postponed also list finished games that have left the live board (freshness.source stored) for kickoffs in starts_after..starts_before, by default the 7 days before now; such a page can be short, or empty, while has_more is true, so follow next_cursor until has_more is false
25
26
  - starts_after / starts_before (string, optional): RFC 3339 kickoff bounds; a game with no published kickoff is excluded whenever either bound is set
27
+ - window (string, optional): all (default, the whole catalog) or now: games the provider reports in play, plus any other game whose kickoff was at most 3 hours ago or is still to come, without ended, postponed or cancelled games
26
28
  - limit (number, 1-100, default 20)
27
29
  - cursor (string, optional): opaque gms_v1_ cursor from next_cursor. It pins the page position, not a snapshot: the catalog is live, so a game added or removed between pages moves with it
30
+ - expand (string, optional): sharp_money adds each game's sharp_money, the object get_game_sharp_money returns, read from the sport board's cached aggregate (one board read per sport, so a page stays fast). A game the board did not evaluate reads status not_computed: call get_game_sharp_money for it. A sport whose aggregate could not be read reads status unavailable while the rest of the page is served. Pro and Max
28
31
 
29
- Returns: data, has_more, next_cursor, as_of, coverage and meta. Read coverage before reading an empty page: it names the sports and leagues this deployment serves and any scope whose source was unavailable for this read, so an unserved sport is never confused with a quiet night. A sport or status this deployment does not serve returns an empty page, not an error. status.state keeps postponed, cancelled, suspended and delayed distinct from a plain 'not live', and a kickoff in the past is never read as live on its own. Scores are the provider's own strings, because a set score and a run total are not both integers. Carries no price, no sharp-money split and no holder identity; those stay on get_market_snapshot, get_sharp_money_flows and get_edge_hunter.`,
32
+ Returns: data, has_more, next_cursor, as_of, coverage and meta. Read coverage before reading an empty page: it names the sports and leagues this deployment serves and any scope whose source was unavailable for this read, so an unserved sport is never confused with a quiet night. A sport or status this deployment does not serve returns an empty page, not an error. status.state keeps postponed, cancelled, suspended and delayed distinct from a plain 'not live', and a kickoff in the past is never read as live on its own. Scores are the provider's own strings, because a set score and a run total are not both integers. Carries no sharp-money split unless expand is sharp_money, and no holder identity; holders stay on get_market_holders.`,
30
33
  inputSchema: z.object({
31
34
  sport: z.string().optional()
32
35
  .describe("Canonical sport bucket, case-insensitive, with - and _ read as a space; omitted means every covered sport. A bucket this deployment does not serve returns an empty page"),
@@ -50,12 +53,16 @@ Returns: data, has_more, next_cursor, as_of, coverage and meta. Read coverage be
50
53
  .describe("RFC 3339 instant; keep only games whose kickoff is at or after it"),
51
54
  starts_before: z.string().optional()
52
55
  .describe("RFC 3339 instant; keep only games whose kickoff is at or before it. Must be at or after starts_after"),
56
+ window: z.enum(["all", "now"]).default("all")
57
+ .describe("all lists the whole catalog. now lists what is on now: games the provider reports in play, plus any other game whose kickoff was at most 3 hours ago or is still to come, without ended, postponed or cancelled games"),
53
58
  // `list_games_schema` in `backend/src/mcp/tools/schema.rs` describes
54
59
  // `limit` too (#18083); the two sides must read the same.
55
60
  limit: z.number().int().min(1).max(100).default(20)
56
61
  .describe("Max results (1-100, default 20)"),
57
62
  cursor: z.string().optional()
58
63
  .describe("Opaque gms_v1_ cursor from next_cursor; it pins the page position (kickoff and event_slug), not a snapshot"),
64
+ expand: z.enum(["sharp_money"]).optional()
65
+ .describe("sharp_money: add each game's event-level sharp money (the object get_game_sharp_money returns, from the sport board's cached aggregate), so no per-game call is needed"),
59
66
  }),
60
67
  annotations: readAnnotations,
61
68
  }, async (args, ctx) => {
@@ -81,12 +88,12 @@ Returns: data, has_more, next_cursor, as_of, coverage and meta. Read coverage be
81
88
  export function registerGetGame(server, client) {
82
89
  server.registerTool("get_game", {
83
90
  title: "Get one game",
84
- description: `The same game object list_games returns, for one event_slug: both sides with their provider ids and live scores, the UTC kickoff, the provider's own status, the esports series format, and every linked Polymarket market with its condition_id and outcome token ids. The slug is the identity the live_sports_updated webhook pulse carries, so a receiver can read the full game straight from a pulse.
91
+ description: `The same game object list_games returns, for one event_slug: both sides with their provider ids and live scores, the UTC kickoff, the provider's own status, the esports series format, and the game's winner markets (the moneyline, or a soccer game's three 1X2 legs) with their condition_id, outcome token ids and provider moneyline prices. For the game's spreads, totals and player props, call list_game_markets with the same event_slug. The slug is the identity the live_sports_updated webhook pulse carries, so a receiver can read the full game straight from a pulse.
85
92
 
86
93
  Args:
87
94
  - event_slug (string, required): the game's event slug, for example nfl-buf-nyj-2026-09-22. Matched case-insensitively
88
95
 
89
- Returns: the game object with the envelope's meta. status.state keeps postponed, cancelled, suspended and delayed distinct from a plain 'not live'. Each game's own coverage reports whether scores, competitor provider ids and the schedule were available: when competitors reads labels, do not join on names. A slug outside the published coverage answers 404, including a real Polymarket event in a sport this deployment does not serve; list_games names what is covered. Carries no price, no sharp-money split and no holder identity.`,
96
+ Returns: the game object with the envelope's meta. status.state keeps postponed, cancelled, suspended and delayed distinct from a plain 'not live'. Each game's own coverage reports whether scores, competitor provider ids and the schedule were available: when competitors reads labels, do not join on names. A slug outside the published coverage answers 404, including a real Polymarket event in a sport this deployment does not serve; list_games names what is covered. Carries no sharp-money split and no holder identity.`,
90
97
  inputSchema: z.object({
91
98
  event_slug: z.string().trim().min(1)
92
99
  .describe("The game's event slug, for example nfl-buf-nyj-2026-09-22; matched case-insensitively"),
@@ -102,4 +109,143 @@ Returns: the game object with the envelope's meta. status.state keeps postponed,
102
109
  }
103
110
  });
104
111
  }
112
+ export function registerListGameMarkets(server, client) {
113
+ server.registerTool("list_game_markets", {
114
+ title: "List a game's markets",
115
+ description: `Every stored Polymarket market of one event_slug: the moneyline, spreads, totals, team totals, half and quarter lines, player props and the rest, plus the markets of the event's child events (a soccer game's exact score, halftime result and more-markets events), each with its own event_slug. Each row carries the condition_id, the provider's sports_market_type and groupItemTitle, the provider's typed line and, when stated, the outcome index it belongs to, both outcome labels with their CLOB token ids, and active or closed status. Ordered by sports_market_type, then line, then condition_id. Pass a condition_id to get_market_holders, get_market_flow or get_market_snapshot.
116
+
117
+ Args:
118
+ - event_slug (string, required): the event slug from list_games, get_game or a search_markets result, for example nba-bos-orl-2026-11-01. Matched case-insensitively. Live, upcoming and settled events all answer
119
+ - sports_market_type (string, optional): comma-separated provider market types to keep, case-insensitive (spreads, totals, points, first_half_totals). Omitted keeps every type; an unknown type returns an empty page
120
+ - status (string, optional): active, closed or all (default all)
121
+ - limit (number, 1-100, default 20)
122
+ - cursor (string, optional): opaque gmk_v1_ cursor from next_cursor, sent with the same filters
123
+ - expand (string[], optional): sharp_money adds each row's sharp_money: status (computed, not_computed or unavailable; the first read of a game can be unavailable while its split is built, so retry after a few seconds), trader_count, per-outcome usd and S/A/B wallet counts, and money_as_of, the game page's per-line split
124
+
125
+ Returns: data, has_more, next_cursor, event_slug, families and meta. families lists every market type the event holds with its market and active counts, whatever the filters: read it first to choose a sports_market_type. A slug no stored market carries answers 404; an event outside sports and esports answers 404 with reason market_out_of_scope. Carries no price and no holder identity: get_game_holders reads the holders of several of these markets in one call.`,
126
+ inputSchema: z.object({
127
+ event_slug: z.string().trim().min(1)
128
+ .describe("The game's event slug, for example nba-bos-orl-2026-11-01; matched case-insensitively"),
129
+ sports_market_type: z.string().optional()
130
+ .describe("Comma-separated provider market types to keep, case-insensitive: spreads, totals, points, first_half_totals. Omitted keeps every type; the response's families lists the event's types"),
131
+ status: z.enum(["active", "closed", "all"]).default("all")
132
+ .describe("Keep only active or only closed markets; default all"),
133
+ limit: z.number().int().min(1).max(100).default(20)
134
+ .describe("Max results (1-100, default 20)"),
135
+ cursor: z.string().optional()
136
+ .describe("Opaque gmk_v1_ cursor from next_cursor, used with the same filters"),
137
+ expand: z.array(z.enum(["sharp_money"])).optional()
138
+ .describe("sharp_money adds each row's sharp-money split: side USD and S/A/B wallet counts per outcome (#32155)"),
139
+ }),
140
+ annotations: readAnnotations,
141
+ }, async ({ event_slug, expand, ...query }, ctx) => {
142
+ try {
143
+ const response = await client.request(`/api/v1/games/${encodeURIComponent(event_slug)}/markets`, query, expand && expand.length > 0 ? { expand: [...expand] } : undefined, { signal: ctx.mcpReq.signal });
144
+ // Spread explicitly: `event_slug` and `families` are page-level keys
145
+ // outside the standard list envelope, and `families` is what tells an
146
+ // agent which sports_market_type filter finds the props (#32131).
147
+ return ok({
148
+ data: response.data,
149
+ has_more: response.has_more,
150
+ next_cursor: response.next_cursor,
151
+ ...(response.event_slug === undefined ? {} : { event_slug: response.event_slug }),
152
+ ...(response.families === undefined ? {} : { families: response.families }),
153
+ ...(response.meta === undefined ? {} : { meta: response.meta }),
154
+ });
155
+ }
156
+ catch (error) {
157
+ return fail(error);
158
+ }
159
+ });
160
+ }
161
+ export function registerGetGameSharpMoney(server, client) {
162
+ server.registerTool("get_game_sharp_money", {
163
+ title: "Get game sharp money",
164
+ description: `Where the graded money sits on a whole game, in one read: the S, A and B grade wallets' USD on each side (home, away and, for a 1X2 game, draw) summed across the game's markets, each side's integer share of it, the leader, and wallet counts by grade, plus the backend's verdict on the split. The same aggregate the game page on 0xinsider renders, so the two cannot disagree. Use it instead of paging get_market_holders per market and summing.
165
+
166
+ Args:
167
+ - event_slug (string, required): the game's event slug, for example nba-bos-orl-2026-11-01. Matched case-insensitively
168
+
169
+ Returns: data with event_slug, status, lifecycle, verdict, allocation, total_usd, unallocated_usd, trader_count, holders_partial, outcomes[] (side, label, usd, pct, is_leader, wallets.s/a/b), computed_at and money_as_of, plus meta. Every aggregate field is null unless status is computed; null means unknown, never zero. verdict.kind is no_sharp_money, all_on, split, leans (label, pct), leans_over_price (label, divergence_pts: how many probability points the money share sits above the price), no_clear_lean, unavailable (money exists but cannot be attributed) or withheld (the money is published but no directional claim is supported). When allocation is degraded, outcomes sum to total_usd minus unallocated_usd and carry no pct or leader. holders_partial true means a market's holder list was a capped page, so counts and dollars cover part of the holders. A settled game returns its recap with lifecycle settled. A game whose aggregate is still computing answers 503 read_model_warming with Retry-After; read again then. A slug with no sports market answers 404. Pro and Max. Descriptive analytics, not an order instruction.`,
170
+ inputSchema: z.object({
171
+ event_slug: z.string().trim().min(1)
172
+ .describe("The game's event slug, for example nba-bos-orl-2026-11-01; matched case-insensitively"),
173
+ }),
174
+ annotations: readAnnotations,
175
+ }, async ({ event_slug }, ctx) => {
176
+ try {
177
+ const response = await client.request(`/api/v1/games/${encodeURIComponent(event_slug)}/sharp-money`, undefined, undefined, { signal: ctx.mcpReq.signal });
178
+ return ok(withMeta(response.data, response.meta));
179
+ }
180
+ catch (error) {
181
+ return fail(error);
182
+ }
183
+ });
184
+ }
185
+ // A game's newest fills across every market in it (#32156). Mirrors
186
+ // `get_game_trades` in `backend/src/mcp/tools/contract.rs`.
187
+ export function registerGetGameTrades(server, client) {
188
+ server.registerTool("get_game_trades", {
189
+ title: "List a game's trades",
190
+ description: `A game's newest fills across every market in it, live: the moneyline, spreads, totals and props, player props included, newest first. The same rows the 0xinsider game page's activity rail shows a Pro viewer. Every fill, not only large ones; use get_large_trades with event_slug for the game's large trades with review scores.
191
+
192
+ Args:
193
+ - event_slug (string, required): the game's event slug, for example nba-bos-orl-2026-11-01. Matched case-insensitively
194
+ - limit (number, 1-200, default 100): newest fills to return
195
+
196
+ Returns: data (each fill's id, traded_at, side, outcome, outcome_index, price, shares, size_usd, the signed spread point, the trader's address, display_name and current grade, and the market's condition_id, title, slug and line_label, its name within the game), has_more (always false: poll again rather than page), event_slug, source_stale and meta. source_stale true means the rows are the game's last complete read while its refresh runs. Deduplicate on id across polls. A 503 read_model_warming means the game's first read is still running: retry after Retry-After. An unknown slug answers not_found; an event outside sports and esports answers market_out_of_scope.`,
197
+ inputSchema: z.object({
198
+ event_slug: z.string().trim().min(1)
199
+ .describe("The game's event slug, for example nba-bos-orl-2026-11-01; matched case-insensitively"),
200
+ limit: z.number().int().min(1).max(200).default(100)
201
+ .describe("Newest fills to return (1-200, default 100)"),
202
+ }),
203
+ annotations: readAnnotations,
204
+ }, async ({ event_slug, limit }, ctx) => {
205
+ try {
206
+ const response = await client.request(`/api/v1/games/${encodeURIComponent(event_slug)}/trades`, { limit }, undefined, { signal: ctx.mcpReq.signal });
207
+ // `event_slug` and `source_stale` sit beside the list envelope, as
208
+ // ListMetadata::GameTrades keeps them on the remote endpoint.
209
+ return ok({
210
+ ...listResult(response),
211
+ ...(response.event_slug === undefined ? {} : { event_slug: response.event_slug }),
212
+ ...(response.source_stale === undefined ? {} : { source_stale: response.source_stale }),
213
+ });
214
+ }
215
+ catch (error) {
216
+ return fail(error);
217
+ }
218
+ });
219
+ }
220
+ export function registerGetGameHolders(server, client) {
221
+ server.registerTool("get_game_holders", {
222
+ title: "Get a game's holders",
223
+ description: `The S, A and B graded holders of up to ${MAX_BATCH_ITEMS} markets of one game in one call. Each item is get_market_holders for one market, unfiltered and cut to limit, with its market, scan and totals. Pass condition_ids from list_game_markets; a market that is not one of the game's is that item's not_found. Results preserve request order and duplicate inputs return duplicate rows. Uses the V1 batch item quota, one item per condition_id. A market whose roster is not ready within the request is an item error with reason read_model_warming and retry_at: its scan keeps running, so a retry after that time reads it. Page past limit with get_market_holders.
224
+
225
+ Args:
226
+ - event_slug (string, required): the game's event slug, for example nba-bos-orl-2026-11-01. Matched case-insensitively
227
+ - condition_ids (string[], required): 1-${MAX_BATCH_ITEMS} condition_id values of this game's markets
228
+ - limit (number, 1-100, default 20): holders per market
229
+
230
+ Returns: Ordered batch results with per-item success or error details; an ok item's data carries data (holders), has_more, total, market, scan, totals, computed_at and cached.`,
231
+ inputSchema: z.object({
232
+ event_slug: z.string().trim().min(1)
233
+ .describe("The game's event slug, for example nba-bos-orl-2026-11-01; matched case-insensitively"),
234
+ condition_ids: z.array(z.string().trim().min(1)).min(1).max(MAX_BATCH_ITEMS)
235
+ .describe("condition_id values of this game's markets, from list_game_markets"),
236
+ limit: z.number().int().min(1).max(100).default(20)
237
+ .describe("Max holders per market (1-100, default 20)"),
238
+ }),
239
+ annotations: readAnnotations,
240
+ }, async ({ event_slug, condition_ids, limit }, ctx) => {
241
+ try {
242
+ // The batch envelope is the answer: per-item status, data and error,
243
+ // plus the batch item quota in meta (#32155).
244
+ return ok(await client.request(`/api/v1/games/${encodeURIComponent(event_slug)}/holders`, { limit }, { condition_ids: [...condition_ids] }, { signal: ctx.mcpReq.signal }));
245
+ }
246
+ catch (error) {
247
+ return fail(error);
248
+ }
249
+ });
250
+ }
105
251
  //# sourceMappingURL=games.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"games.js","sourceRoot":"","sources":["../../src/tools/games.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,0EAA0E;AAC1E,sEAAsE;AACtE,EAAE;AACF,0EAA0E;AAC1E,2EAA2E;AAC3E,sDAAsD;AAGtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAA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E,EAAE,GAAG,EAAE,EAAE;QAClD,IAAI,CAAC;YACH,qEAAqE;YACrE,8CAA8C;YAC9C,OAAO,EAAE,CAAC,MAAM,MAAM,CAAC,OAAO,CAC5B,iBAAiB,kBAAkB,CAAC,UAAU,CAAC,UAAU,EACzD,EAAE,KAAK,EAAE,EACT,EAAE,aAAa,EAAE,CAAC,GAAG,aAAa,CAAC,EAAE,EACrC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAC9B,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-leaderboard.d.ts","sourceRoot":"","sources":["../../src/tools/get-leaderboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAmBzC,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAkDjF"}
1
+ {"version":3,"file":"get-leaderboard.d.ts","sourceRoot":"","sources":["../../src/tools/get-leaderboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAmCzC,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA8DjF"}
@@ -15,18 +15,36 @@ const LEADERBOARD_STRATEGIES = [
15
15
  "two_sided",
16
16
  "unclassified",
17
17
  ];
18
+ /**
19
+ * The route's `sort`, `dir` and `activity` values (#32237): `SORT_ENUM`,
20
+ * `DIR_ENUM` and `ACTIVITY_ENUM` in the same handler file, and the spec's enums.
21
+ */
22
+ const LEADERBOARD_SORTS = [
23
+ "rank",
24
+ "grade",
25
+ "volume",
26
+ "predictions",
27
+ "pnl",
28
+ "win_rate",
29
+ "edge",
30
+ ];
31
+ const LEADERBOARD_DIRS = ["asc", "desc"];
32
+ const LEADERBOARD_ACTIVITIES = ["all", "active", "inactive"];
18
33
  export function registerGetLeaderboard(server, client) {
19
34
  server.registerTool("get_leaderboard", {
20
35
  title: "Get Trader Leaderboard",
21
- description: `Get the top-ranked prediction market traders (grades S, A, B only). Sorted by composite score descending. Supports cursor pagination and optional filters.
36
+ description: `Get the top-ranked prediction market traders (grades S, A, B only). By default in the board's own rank order; sort, dir and activity reorder and scope the same wallets as the site's leaderboard does. Supports cursor pagination and optional filters.
22
37
 
23
38
  Args:
24
39
  - limit (number, 1-100, default 20): Max results per page
25
- - cursor (string, optional): Pagination cursor from previous response
40
+ - cursor (string, optional): Pagination cursor from previous response; it is bound to the sort, dir and activity it was read with
26
41
  - category (string, optional): Filter by category slug
27
42
  - strategy (string, optional): Trading style: two_sided, category_focused, high_activity, diversified, mixed, unclassified
43
+ - sort (string, optional): rank (default), grade, volume (sports and esports USD volume), predictions, pnl, win_rate (wallets with at least 5 decided markets), edge (price_edge.edge, wallets whose edge ranks); a missing value sorts lowest
44
+ - dir (string, optional): asc or desc; omitted, rank 1 first for rank and largest first for the rest
45
+ - activity (string, optional): all (default), active (last trade 30 days ago or less) or inactive
28
46
 
29
- Returns: Ranked list of traders with grade, score, P&L, volume, win rate, and strategy.`,
47
+ Returns: Ranked list of traders with grade, score, sports and esports P&L, markets, win rate, edge over the price paid, and strategy.`,
30
48
  inputSchema: z.object({
31
49
  limit: z.number().int().min(1).max(100).default(20)
32
50
  .describe("Max results (1-100, default 20)"),
@@ -36,6 +54,12 @@ Returns: Ranked list of traders with grade, score, P&L, volume, win rate, and st
36
54
  .describe("Filter by category slug"),
37
55
  strategy: z.enum(LEADERBOARD_STRATEGIES).optional()
38
56
  .describe("Filter by strategy type"),
57
+ sort: z.enum(LEADERBOARD_SORTS).optional()
58
+ .describe("Order: rank (default, the board's own order), grade, volume (sports and esports USD volume), predictions, pnl, win_rate (wallets with at least 5 decided markets) or edge (price_edge.edge, wallets whose edge ranks). A missing value sorts lowest"),
59
+ dir: z.enum(LEADERBOARD_DIRS).optional()
60
+ .describe("asc or desc. Omitted: rank 1 first for rank, largest first for the rest"),
61
+ activity: z.enum(LEADERBOARD_ACTIVITIES).optional()
62
+ .describe("all (default), active (last trade 30 days ago or less) or inactive"),
39
63
  }),
40
64
  annotations: {
41
65
  readOnlyHint: true,
@@ -43,13 +67,16 @@ Returns: Ranked list of traders with grade, score, P&L, volume, win rate, and st
43
67
  idempotentHint: true,
44
68
  openWorldHint: false,
45
69
  },
46
- }, async ({ limit, cursor, category, strategy }, ctx) => {
70
+ }, async ({ limit, cursor, category, strategy, sort, dir, activity }, ctx) => {
47
71
  try {
48
72
  const response = await client.request("/api/v1/leaderboard", {
49
73
  limit,
50
74
  cursor,
51
75
  category,
52
76
  strategy,
77
+ sort,
78
+ dir,
79
+ activity,
53
80
  }, undefined, { signal: ctx.mcpReq.signal });
54
81
  const result = listResult(response);
55
82
  return {