@0xinsider/mcp 2.1.3 → 2.4.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 +25 -12
- package/dist/catalog.generated.d.ts +42 -6
- package/dist/catalog.generated.d.ts.map +1 -1
- package/dist/catalog.generated.js +51 -6
- package/dist/catalog.generated.js.map +1 -1
- package/dist/cli-lib.d.ts +7 -0
- package/dist/cli-lib.d.ts.map +1 -1
- package/dist/cli-lib.js +83 -17
- package/dist/cli-lib.js.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/product-cli/index.d.ts.map +1 -1
- package/dist/product-cli/index.js +3 -1
- package/dist/product-cli/index.js.map +1 -1
- package/dist/prompts/index.js +2 -2
- package/dist/sdk/client.d.ts +186 -18
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/client.js +232 -9
- package/dist/sdk/client.js.map +1 -1
- package/dist/sdk/errors.d.ts +7 -1
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +20 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.d.ts +33 -3
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/pagination.d.ts +7 -7
- package/dist/sdk/pagination.d.ts.map +1 -1
- package/dist/sdk/pagination.js.map +1 -1
- package/dist/sdk/schema.d.ts +879 -309
- package/dist/sdk/schema.d.ts.map +1 -1
- package/dist/sdk/stream.d.ts +12 -7
- package/dist/sdk/stream.d.ts.map +1 -1
- package/dist/sdk/stream.js +82 -3
- package/dist/sdk/stream.js.map +1 -1
- package/dist/sdk/webhooks.d.ts +86 -9
- package/dist/sdk/webhooks.d.ts.map +1 -1
- package/dist/sdk/webhooks.js +9 -3
- package/dist/sdk/webhooks.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/games.d.ts +5 -0
- package/dist/tools/games.d.ts.map +1 -0
- package/dist/tools/games.js +103 -0
- package/dist/tools/games.js.map +1 -0
- package/dist/tools/get-insider-radar.d.ts.map +1 -1
- package/dist/tools/get-insider-radar.js +10 -32
- package/dist/tools/get-insider-radar.js.map +1 -1
- package/dist/tools/get-leaderboard.d.ts.map +1 -1
- package/dist/tools/get-leaderboard.js +20 -2
- package/dist/tools/get-leaderboard.js.map +1 -1
- package/dist/tools/get-suspicious-trades.d.ts +26 -0
- package/dist/tools/get-suspicious-trades.d.ts.map +1 -0
- package/dist/tools/get-suspicious-trades.js +91 -0
- package/dist/tools/get-suspicious-trades.js.map +1 -0
- package/dist/tools/get-whale-trades.d.ts +2 -0
- package/dist/tools/get-whale-trades.d.ts.map +1 -1
- package/dist/tools/get-whale-trades.js +18 -6
- package/dist/tools/get-whale-trades.js.map +1 -1
- package/dist/tools/read-parity.d.ts +8 -0
- package/dist/tools/read-parity.d.ts.map +1 -1
- package/dist/tools/read-parity.js +91 -35
- package/dist/tools/read-parity.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-insider-radar.d.ts","sourceRoot":"","sources":["../../src/tools/get-insider-radar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-insider-radar.d.ts","sourceRoot":"","sources":["../../src/tools/get-insider-radar.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzC,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA6BlF"}
|
|
@@ -1,51 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Deprecated alias of get_suspicious_trades (#16301). It keeps calling the
|
|
2
|
+
// deprecated /api/v1/insider-radar path and shares the canonical tool's schema
|
|
3
|
+
// and wording, so an existing client keeps working unchanged.
|
|
4
|
+
import { fail, listResult, ok } from "./result.js";
|
|
5
|
+
import { SUSPICIOUS_TRADES_DESCRIPTION, suspiciousTradesInputSchema, } from "./get-suspicious-trades.js";
|
|
3
6
|
export function registerGetInsiderRadar(server, client) {
|
|
4
7
|
server.registerTool("get_insider_radar", {
|
|
5
8
|
title: "Get Insider Radar Flags",
|
|
6
|
-
description: `
|
|
7
|
-
|
|
8
|
-
Each flag includes:
|
|
9
|
-
- suspicion_score (0-100)
|
|
10
|
-
- severity (flag or watch)
|
|
11
|
-
- Sub-scores: timing, edge, size, fresh_wallet
|
|
12
|
-
- Evidence JSON with details
|
|
13
|
-
|
|
14
|
-
Args:
|
|
15
|
-
- limit (number, 1-100, default 20): Max results per page
|
|
16
|
-
- cursor (string, optional): Pagination cursor from previous response
|
|
17
|
-
- min_suspicion (number, 0-100, default 0): Minimum suspicion score
|
|
18
|
-
- severity (string, optional): Filter by severity: "flag" or "watch"
|
|
19
|
-
|
|
20
|
-
Returns: List of radar flags with trader, market, scores, and evidence.`,
|
|
21
|
-
inputSchema: {
|
|
22
|
-
limit: z.number().int().min(1).max(100).default(20)
|
|
23
|
-
.describe("Max results (1-100, default 20)"),
|
|
24
|
-
cursor: z.string().optional()
|
|
25
|
-
.describe("Pagination cursor from previous response"),
|
|
26
|
-
min_suspicion: z.number().min(0).max(100).default(0)
|
|
27
|
-
.describe("Minimum suspicion score (0-100)"),
|
|
28
|
-
severity: z.enum(["flag", "watch"]).optional()
|
|
29
|
-
.describe("Filter by severity level"),
|
|
30
|
-
},
|
|
9
|
+
description: `Deprecated alias of get_suspicious_trades (#16301), kept live; it calls the deprecated /api/v1/insider-radar path. ${SUSPICIOUS_TRADES_DESCRIPTION}`,
|
|
10
|
+
inputSchema: suspiciousTradesInputSchema,
|
|
31
11
|
annotations: {
|
|
32
12
|
readOnlyHint: true,
|
|
33
13
|
destructiveHint: false,
|
|
34
14
|
idempotentHint: true,
|
|
35
15
|
openWorldHint: false,
|
|
36
16
|
},
|
|
37
|
-
}, async ({ limit, cursor, min_suspicion, severity }) => {
|
|
17
|
+
}, async ({ limit, cursor, min_suspicion, severity, mode }) => {
|
|
38
18
|
try {
|
|
39
19
|
const response = await client.request("/api/v1/insider-radar", {
|
|
40
20
|
limit,
|
|
41
21
|
cursor,
|
|
42
22
|
min_suspicion,
|
|
43
23
|
severity,
|
|
24
|
+
mode,
|
|
44
25
|
});
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
48
|
-
};
|
|
26
|
+
return ok(listResult(response));
|
|
49
27
|
}
|
|
50
28
|
catch (error) {
|
|
51
29
|
return fail(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-insider-radar.js","sourceRoot":"","sources":["../../src/tools/get-insider-radar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-insider-radar.js","sourceRoot":"","sources":["../../src/tools/get-insider-radar.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,+EAA+E;AAC/E,8DAA8D;AAI9D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,4BAA4B,CAAC;AAEpC,MAAM,UAAU,uBAAuB,CAAC,MAAiB,EAAE,MAAiB;IAC1E,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB;QACE,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,sHAAsH,6BAA6B,EAAE;QAClK,WAAW,EAAE,2BAA2B;QACxC,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE;QACzD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE;gBAC7D,KAAK;gBACL,MAAM;gBACN,aAAa;gBACb,QAAQ;gBACR,IAAI;aACL,CAAC,CAAC;YACH,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"}
|
|
@@ -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,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"get-leaderboard.d.ts","sourceRoot":"","sources":["../../src/tools/get-leaderboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAsBzC,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAkDjF"}
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { fail, listResult } from "./result.js";
|
|
3
|
+
/**
|
|
4
|
+
* The strategies `GET /api/v1/leaderboard` accepts (`STRATEGY_ENUM` in
|
|
5
|
+
* `backend/src/api_v1/handlers/leaderboard.rs`, the spec's enum, and the SDK's
|
|
6
|
+
* `LEADERBOARD_STRATEGIES`). Any other value is a 400 at the route, so the
|
|
7
|
+
* schema refuses it first (#16548).
|
|
8
|
+
*/
|
|
9
|
+
const LEADERBOARD_STRATEGIES = [
|
|
10
|
+
"accumulator",
|
|
11
|
+
"algo_trader",
|
|
12
|
+
"arbitrageur",
|
|
13
|
+
"directional",
|
|
14
|
+
"event_driven",
|
|
15
|
+
"market_maker",
|
|
16
|
+
"momentum",
|
|
17
|
+
"scalper",
|
|
18
|
+
"speculator",
|
|
19
|
+
"swing_trader",
|
|
20
|
+
];
|
|
3
21
|
export function registerGetLeaderboard(server, client) {
|
|
4
22
|
server.registerTool("get_leaderboard", {
|
|
5
23
|
title: "Get Trader Leaderboard",
|
|
@@ -9,7 +27,7 @@ Args:
|
|
|
9
27
|
- limit (number, 1-100, default 20): Max results per page
|
|
10
28
|
- cursor (string, optional): Pagination cursor from previous response
|
|
11
29
|
- category (string, optional): Filter by category slug
|
|
12
|
-
- strategy (string, optional):
|
|
30
|
+
- strategy (string, optional): One of accumulator, algo_trader, arbitrageur, directional, event_driven, market_maker, momentum, scalper, speculator, swing_trader
|
|
13
31
|
|
|
14
32
|
Returns: Ranked list of traders with grade, score, P&L, volume, win rate, and strategy.`,
|
|
15
33
|
inputSchema: {
|
|
@@ -19,7 +37,7 @@ Returns: Ranked list of traders with grade, score, P&L, volume, win rate, and st
|
|
|
19
37
|
.describe("Pagination cursor from previous response"),
|
|
20
38
|
category: z.string().optional()
|
|
21
39
|
.describe("Filter by category slug"),
|
|
22
|
-
strategy: z.
|
|
40
|
+
strategy: z.enum(LEADERBOARD_STRATEGIES).optional()
|
|
23
41
|
.describe("Filter by strategy type"),
|
|
24
42
|
},
|
|
25
43
|
annotations: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-leaderboard.js","sourceRoot":"","sources":["../../src/tools/get-leaderboard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,UAAU,sBAAsB,CAAC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ared by the canonical list tool and its deprecated alias. */
|
|
5
|
+
export declare const suspiciousTradesInputSchema: {
|
|
6
|
+
readonly limit: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
readonly cursor: z.ZodOptional<z.ZodString>;
|
|
8
|
+
readonly min_suspicion: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
readonly severity: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
flag: "flag";
|
|
11
|
+
watch: "watch";
|
|
12
|
+
}>>;
|
|
13
|
+
readonly mode: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
live: "live";
|
|
15
|
+
stable: "stable";
|
|
16
|
+
}>>;
|
|
17
|
+
};
|
|
18
|
+
/** Shared by the canonical by-ID tool and its deprecated alias. */
|
|
19
|
+
export declare const suspiciousTradeInputSchema: {
|
|
20
|
+
readonly id: z.ZodString;
|
|
21
|
+
};
|
|
22
|
+
export declare const SUSPICIOUS_TRADES_DESCRIPTION = "Stored trades whose recorded suspicion score meets the live flag threshold. Cursor-paginated by suspicion score (highest first). Use mode=stable when a walk must stay on one published scoring generation; restart when it returns cursor_expired.\n\nEach suspicious trade includes:\n- suspicion_score (60-100)\n- severity (currently flag)\n- Sub-scores: size and fresh_wallet when recorded; timing and edge are null\n- Evidence JSON with the scorer's stored signals\n\nArgs:\n - limit (number, 1-100, default 20): Max results per page\n - cursor (string, optional): Pagination cursor from previous response\n - min_suspicion (number, 0-100, default 0): Minimum score; the live floor of 60 also applies\n - severity (string, optional): \"flag\" selects live rows; \"watch\" returns none because no live watch policy exists\n - mode (string, optional): \"live\" (default) uses fresh cached pages; \"stable\" pins the walk to one published scoring generation\n\nReturns: List of suspicious trades with trader, market, scores, and evidence.";
|
|
23
|
+
export declare const SUSPICIOUS_TRADE_DESCRIPTION = "Read one suspicious trade by ID. Accepts the rf_ ID returned by list responses or the raw numeric whale_alerts.id.\n\nArgs:\n - id (string, required): Suspicious trade ID such as rf_123 or 123\n\nReturns: One suspicious trade with trader, market, suspicion scores, and evidence.";
|
|
24
|
+
export declare function registerGetSuspiciousTrades(server: McpServer, client: ApiClient): void;
|
|
25
|
+
export declare function registerGetSuspiciousTrade(server: McpServer, client: ApiClient): void;
|
|
26
|
+
//# sourceMappingURL=get-suspicious-trades.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-suspicious-trades.d.ts","sourceRoot":"","sources":["../../src/tools/get-suspicious-trades.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,kEAAkE;AAClE,eAAO,MAAM,2BAA2B;aACtC,KAAK;aAEL,MAAM;aAEN,aAAa;aAEb,QAAQ;;;;aAER,IAAI;;;;CAEI,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,0BAA0B;aACrC,EAAE;CACM,CAAC;AAEX,eAAO,MAAM,6BAA6B,mhCAeoC,CAAC;AAE/E,eAAO,MAAM,4BAA4B,4RAK0C,CAAC;AAEpF,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAwBtF;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAoBrF"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Canonical "suspicious trades" tools (#16301, epic #16300). The wording and
|
|
2
|
+
// the argument list mirror `backend/src/mcp/tools/contract.rs`, so the remote
|
|
3
|
+
// endpoint and this stdio server describe the same surface. The older
|
|
4
|
+
// get_insider_radar / get_insider_radar_flag tools stay registered as
|
|
5
|
+
// deprecated aliases on the deprecated /api/v1/insider-radar paths.
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { fail, listResult, ok, withMeta } from "./result.js";
|
|
8
|
+
const readAnnotations = {
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: false,
|
|
13
|
+
};
|
|
14
|
+
/** Shared by the canonical list tool and its deprecated alias. */
|
|
15
|
+
export const suspiciousTradesInputSchema = {
|
|
16
|
+
limit: z.number().int().min(1).max(100).default(20)
|
|
17
|
+
.describe("Max results (1-100, default 20)"),
|
|
18
|
+
cursor: z.string().optional()
|
|
19
|
+
.describe("Pagination cursor from previous response"),
|
|
20
|
+
min_suspicion: z.number().min(0).max(100).default(0)
|
|
21
|
+
.describe("Minimum suspicion score (0-100); the live floor of 60 also applies"),
|
|
22
|
+
severity: z.enum(["flag", "watch"]).optional()
|
|
23
|
+
.describe('"flag" selects live rows; "watch" returns none because no live watch policy exists'),
|
|
24
|
+
mode: z.enum(["live", "stable"]).optional()
|
|
25
|
+
.describe('"live" (default) uses fresh cached pages; "stable" pins the walk to one published scoring generation'),
|
|
26
|
+
};
|
|
27
|
+
/** Shared by the canonical by-ID tool and its deprecated alias. */
|
|
28
|
+
export const suspiciousTradeInputSchema = {
|
|
29
|
+
id: z.string().trim().min(1).describe("Suspicious trade ID such as rf_123 or 123"),
|
|
30
|
+
};
|
|
31
|
+
export const SUSPICIOUS_TRADES_DESCRIPTION = `Stored trades whose recorded suspicion score meets the live flag threshold. Cursor-paginated by suspicion score (highest first). Use mode=stable when a walk must stay on one published scoring generation; restart when it returns cursor_expired.
|
|
32
|
+
|
|
33
|
+
Each suspicious trade includes:
|
|
34
|
+
- suspicion_score (60-100)
|
|
35
|
+
- severity (currently flag)
|
|
36
|
+
- Sub-scores: size and fresh_wallet when recorded; timing and edge are null
|
|
37
|
+
- Evidence JSON with the scorer's stored signals
|
|
38
|
+
|
|
39
|
+
Args:
|
|
40
|
+
- limit (number, 1-100, default 20): Max results per page
|
|
41
|
+
- cursor (string, optional): Pagination cursor from previous response
|
|
42
|
+
- min_suspicion (number, 0-100, default 0): Minimum score; the live floor of 60 also applies
|
|
43
|
+
- severity (string, optional): "flag" selects live rows; "watch" returns none because no live watch policy exists
|
|
44
|
+
- mode (string, optional): "live" (default) uses fresh cached pages; "stable" pins the walk to one published scoring generation
|
|
45
|
+
|
|
46
|
+
Returns: List of suspicious trades with trader, market, scores, and evidence.`;
|
|
47
|
+
export const SUSPICIOUS_TRADE_DESCRIPTION = `Read one suspicious trade by ID. Accepts the rf_ ID returned by list responses or the raw numeric whale_alerts.id.
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
- id (string, required): Suspicious trade ID such as rf_123 or 123
|
|
51
|
+
|
|
52
|
+
Returns: One suspicious trade with trader, market, suspicion scores, and evidence.`;
|
|
53
|
+
export function registerGetSuspiciousTrades(server, client) {
|
|
54
|
+
server.registerTool("get_suspicious_trades", {
|
|
55
|
+
title: "Get suspicious trades",
|
|
56
|
+
description: SUSPICIOUS_TRADES_DESCRIPTION,
|
|
57
|
+
inputSchema: suspiciousTradesInputSchema,
|
|
58
|
+
annotations: readAnnotations,
|
|
59
|
+
}, async ({ limit, cursor, min_suspicion, severity, mode }) => {
|
|
60
|
+
try {
|
|
61
|
+
const response = await client.request("/api/v1/suspicious-trades", {
|
|
62
|
+
limit,
|
|
63
|
+
cursor,
|
|
64
|
+
min_suspicion,
|
|
65
|
+
severity,
|
|
66
|
+
mode,
|
|
67
|
+
});
|
|
68
|
+
return ok(listResult(response));
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
return fail(error);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
export function registerGetSuspiciousTrade(server, client) {
|
|
76
|
+
server.registerTool("get_suspicious_trade", {
|
|
77
|
+
title: "Get suspicious trade",
|
|
78
|
+
description: SUSPICIOUS_TRADE_DESCRIPTION,
|
|
79
|
+
inputSchema: suspiciousTradeInputSchema,
|
|
80
|
+
annotations: readAnnotations,
|
|
81
|
+
}, async ({ id }) => {
|
|
82
|
+
try {
|
|
83
|
+
const response = await client.request(`/api/v1/suspicious-trades/${encodeURIComponent(id)}`);
|
|
84
|
+
return ok(withMeta(response.data, response.meta));
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
return fail(error);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=get-suspicious-trades.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-suspicious-trades.js","sourceRoot":"","sources":["../../src/tools/get-suspicious-trades.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,8EAA8E;AAC9E,sEAAsE;AACtE,sEAAsE;AACtE,oEAAoE;AAGpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,eAAe,GAAG;IACtB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACZ,CAAC;AAEX,kEAAkE;AAClE,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SAChD,QAAQ,CAAC,iCAAiC,CAAC;IAC9C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC1B,QAAQ,CAAC,0CAA0C,CAAC;IACvD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;SACjD,QAAQ,CAAC,oEAAoE,CAAC;IACjF,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EA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C,MAAiB,EAAE,MAAiB;IAC7E,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,4BAA4B;QACzC,WAAW,EAAE,0BAA0B;QACvC,WAAW,EAAE,eAAe;KAC7B,EACD,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;QACf,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CACnC,6BAA6B,kBAAkB,CAAC,EAAE,CAAC,EAAE,CACtD,CAAC;YACF,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"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { ApiClient } from "../client.js";
|
|
3
|
+
export declare function registerGetLargeTrades(server: McpServer, client: ApiClient): void;
|
|
4
|
+
/** Deprecated spelling of get_large_trades (#16304). */
|
|
3
5
|
export declare function registerGetWhaleTrades(server: McpServer, client: ApiClient): void;
|
|
4
6
|
//# sourceMappingURL=get-whale-trades.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-whale-trades.d.ts","sourceRoot":"","sources":["../../src/tools/get-whale-trades.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"get-whale-trades.d.ts","sourceRoot":"","sources":["../../src/tools/get-whale-trades.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAmEzC,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAEjF;AAED,wDAAwD;AACxD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAOjF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { fail, listResult } from "./result.js";
|
|
3
|
-
|
|
4
|
-
server.registerTool(
|
|
5
|
-
title:
|
|
6
|
-
description: `Get recent large trades from graded prediction market traders. Each trade includes signal scoring, trader grade, and market context. Cursor-paginated, newest first.
|
|
3
|
+
function registerTradeList(server, client, tool) {
|
|
4
|
+
server.registerTool(tool.name, {
|
|
5
|
+
title: tool.title,
|
|
6
|
+
description: `${tool.deprecatedOf ? `Deprecated alias of ${tool.deprecatedOf} (#16304), kept live; it calls the deprecated ${tool.path} path. ` : ""}Get recent large trades from graded prediction market traders. Each trade includes signal scoring, trader grade, and market context. Cursor-paginated, newest first.
|
|
7
7
|
|
|
8
8
|
Args:
|
|
9
9
|
- limit (number, 1-100, default 20): Max results per page
|
|
@@ -13,7 +13,7 @@ Args:
|
|
|
13
13
|
- min_grade (string, optional): Minimum trader grade (S, A, B, C, D, F)
|
|
14
14
|
- suspicious_only (boolean, optional): Keep only persisted suspicion_score >= 60; false preserves the current result set
|
|
15
15
|
|
|
16
|
-
Returns: List of
|
|
16
|
+
Returns: List of large trades with trader info, market context, size, side, price, current signal_score and trader grade, point-in-time recorded_signal_score (null before 2026-08-03) and trader grade_at_trade with grade_at_trade_status (unknown before 2026-09-19), optional suspicion_score, and optional suspicion_track. A null suspicion track means the persisted legacy row has no track label.`,
|
|
17
17
|
inputSchema: {
|
|
18
18
|
limit: z.number().int().min(1).max(100).default(20)
|
|
19
19
|
.describe("Max results (1-100, default 20)"),
|
|
@@ -36,7 +36,7 @@ Returns: List of whale trades with trader info, market context, size, side, pric
|
|
|
36
36
|
},
|
|
37
37
|
}, async ({ limit, cursor, min_size, category, min_grade, suspicious_only }) => {
|
|
38
38
|
try {
|
|
39
|
-
const response = await client.request(
|
|
39
|
+
const response = await client.request(tool.path, {
|
|
40
40
|
limit,
|
|
41
41
|
cursor,
|
|
42
42
|
min_size,
|
|
@@ -54,4 +54,16 @@ Returns: List of whale trades with trader info, market context, size, side, pric
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
+
export function registerGetLargeTrades(server, client) {
|
|
58
|
+
registerTradeList(server, client, { name: "get_large_trades", title: "List large trades", path: "/api/v1/large-trades" });
|
|
59
|
+
}
|
|
60
|
+
/** Deprecated spelling of get_large_trades (#16304). */
|
|
61
|
+
export function registerGetWhaleTrades(server, client) {
|
|
62
|
+
registerTradeList(server, client, {
|
|
63
|
+
name: "get_whale_trades",
|
|
64
|
+
title: "List Whale Trades",
|
|
65
|
+
path: "/api/v1/whale-trades",
|
|
66
|
+
deprecatedOf: "get_large_trades",
|
|
67
|
+
});
|
|
68
|
+
}
|
|
57
69
|
//# sourceMappingURL=get-whale-trades.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-whale-trades.js","sourceRoot":"","sources":["../../src/tools/get-whale-trades.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE/C,
|
|
1
|
+
{"version":3,"file":"get-whale-trades.js","sourceRoot":"","sources":["../../src/tools/get-whale-trades.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE/C,SAAS,iBAAiB,CACxB,MAAiB,EACjB,MAAiB,EACjB,IAA0E;IAE1E,MAAM,C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Q,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,EAAE;QAC1E,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE;gBAC/C,KAAK;gBACL,MAAM;gBACN,QAAQ;gBACR,QAAQ;gBACR,SAAS;gBACT,eAAe;aAChB,CAAC,CAAC;YAEH,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YAEpC,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aAC5E,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,MAAiB,EAAE,MAAiB;IACzE,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC,CAAC;AAC5H,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,sBAAsB,CAAC,MAAiB,EAAE,MAAiB;IACzE,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,sBAAsB;QAC5B,YAAY,EAAE,kBAAkB;KACjC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { ApiClient } from "../client.js";
|
|
3
3
|
export declare function registerBatchGetTraders(server: McpServer, client: ApiClient): void;
|
|
4
|
+
export declare function registerGetLargeTradesHistory(server: McpServer, client: ApiClient): void;
|
|
5
|
+
/** Deprecated spelling of get_large_trades_history (#16304). */
|
|
4
6
|
export declare function registerGetWhaleTradesHistory(server: McpServer, client: ApiClient): void;
|
|
7
|
+
export declare function registerGetLargeTrade(server: McpServer, client: ApiClient): void;
|
|
8
|
+
/** Deprecated spelling of get_large_trade (#16304). */
|
|
5
9
|
export declare function registerGetWhaleTrade(server: McpServer, client: ApiClient): void;
|
|
6
10
|
export declare function registerBatchGetMarketIntel(server: McpServer, client: ApiClient): void;
|
|
7
11
|
export declare function registerGetSmartMoneyFlows(server: McpServer, client: ApiClient): void;
|
|
@@ -19,6 +23,10 @@ export declare function registerGetTraderExportSnapshot(server: McpServer, clien
|
|
|
19
23
|
export declare function registerGetPlatforms(server: McpServer, client: ApiClient): void;
|
|
20
24
|
export declare function registerSearchContent(server: McpServer, client: ApiClient): void;
|
|
21
25
|
export declare function registerGetReport(server: McpServer, client: ApiClient): void;
|
|
26
|
+
export declare function registerGetPreGameSideObservations(server: McpServer, client: ApiClient): void;
|
|
27
|
+
/** Deprecated spelling of get_pre_game_side_observations (#16310). */
|
|
22
28
|
export declare function registerGetSportsEdgeObservations(server: McpServer, client: ApiClient): void;
|
|
29
|
+
export declare function registerGetPreGameSides(server: McpServer, client: ApiClient): void;
|
|
30
|
+
/** Deprecated spelling of get_pre_game_sides (#16310). */
|
|
23
31
|
export declare function registerGetSportsEdgeSignals(server: McpServer, client: ApiClient): void;
|
|
24
32
|
//# sourceMappingURL=read-parity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-parity.d.ts","sourceRoot":"","sources":["../../src/tools/read-parity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"read-parity.d.ts","sourceRoot":"","sources":["../../src/tools/read-parity.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
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { fail, listResult, ok, withMeta } from "./result.js";
|
|
3
|
+
import { SUSPICIOUS_TRADE_DESCRIPTION, suspiciousTradeInputSchema, } from "./get-suspicious-trades.js";
|
|
3
4
|
import { MAX_BATCH_ITEMS } from "../constants.js";
|
|
4
5
|
const readAnnotations = {
|
|
5
6
|
readOnlyHint: true,
|
|
@@ -34,10 +35,10 @@ Returns: Ordered batch trader results with per-item success or error details.`,
|
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
-
server.registerTool(
|
|
39
|
-
title:
|
|
40
|
-
description: `Replay historical
|
|
38
|
+
function registerTradeHistory(server, client, tool) {
|
|
39
|
+
server.registerTool(tool.name, {
|
|
40
|
+
title: tool.title,
|
|
41
|
+
description: `${tool.deprecatedOf ? `Deprecated alias of ${tool.deprecatedOf} (#16304), kept live; it calls the deprecated ${tool.path} path. ` : ""}Replay historical large trades from the local record. Supports cursor pagination plus condition, trader, category, grade, platform, and RFC3339 from/to filters.
|
|
41
42
|
|
|
42
43
|
Args:
|
|
43
44
|
- limit (number, 1-100, default 20)
|
|
@@ -51,7 +52,7 @@ Args:
|
|
|
51
52
|
- platform (string, optional): polymarket or all
|
|
52
53
|
- from/to (string, optional): RFC3339 traded_at bounds
|
|
53
54
|
|
|
54
|
-
Returns: Historical
|
|
55
|
+
Returns: Historical large trades with replay metadata, current signal_score and trader grade, point-in-time recorded_signal_score (null before 2026-08-03) and trader grade_at_trade with grade_at_trade_status (unknown before 2026-09-19), optional suspicion_score, and optional suspicion_track. A null suspicion track means the persisted legacy row has no track label.`,
|
|
55
56
|
inputSchema: {
|
|
56
57
|
limit: z.number().int().min(1).max(100).default(20),
|
|
57
58
|
cursor: z.string().optional(),
|
|
@@ -68,7 +69,7 @@ Returns: Historical whale trades with replay metadata, current signal_score and
|
|
|
68
69
|
annotations: readAnnotations,
|
|
69
70
|
}, async (args) => {
|
|
70
71
|
try {
|
|
71
|
-
const response = await client.request(
|
|
72
|
+
const response = await client.request(tool.path, args);
|
|
72
73
|
return ok(listResult(response));
|
|
73
74
|
}
|
|
74
75
|
catch (error) {
|
|
@@ -76,22 +77,34 @@ Returns: Historical whale trades with replay metadata, current signal_score and
|
|
|
76
77
|
}
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
|
-
export function
|
|
80
|
-
server
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
export function registerGetLargeTradesHistory(server, client) {
|
|
81
|
+
registerTradeHistory(server, client, { name: "get_large_trades_history", title: "Replay historical large trades", path: "/api/v1/large-trades/history" });
|
|
82
|
+
}
|
|
83
|
+
/** Deprecated spelling of get_large_trades_history (#16304). */
|
|
84
|
+
export function registerGetWhaleTradesHistory(server, client) {
|
|
85
|
+
registerTradeHistory(server, client, {
|
|
86
|
+
name: "get_whale_trades_history",
|
|
87
|
+
title: "Replay Historical Whale Trades",
|
|
88
|
+
path: "/api/v1/whale-trades/history",
|
|
89
|
+
deprecatedOf: "get_large_trades_history",
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function registerTradeDetail(server, client, tool) {
|
|
93
|
+
server.registerTool(tool.name, {
|
|
94
|
+
title: tool.title,
|
|
95
|
+
description: `${tool.deprecatedOf ? `Deprecated alias of ${tool.deprecatedOf} (#16304), kept live; it calls the deprecated ${tool.path} path. ` : ""}Read one large trade by ID. Accepts either the wt_ ID returned by large-trade list/history responses or the raw numeric id.
|
|
83
96
|
|
|
84
97
|
Args:
|
|
85
|
-
- id (string, required):
|
|
98
|
+
- id (string, required): Large trade ID such as wt_123 or 123
|
|
86
99
|
|
|
87
|
-
Returns: One
|
|
100
|
+
Returns: One large trade with trader info, market context, size, side, price, current signal_score and trader grade, point-in-time recorded_signal_score (null before 2026-08-03) and trader grade_at_trade with grade_at_trade_status (unknown before 2026-09-19), optional suspicion_score, and optional suspicion_track. A null suspicion track means the persisted legacy row has no track label.`,
|
|
88
101
|
inputSchema: {
|
|
89
|
-
id: z.string().trim().min(1).describe("
|
|
102
|
+
id: z.string().trim().min(1).describe("Large trade ID such as wt_123 or 123"),
|
|
90
103
|
},
|
|
91
104
|
annotations: readAnnotations,
|
|
92
105
|
}, async ({ id }) => {
|
|
93
106
|
try {
|
|
94
|
-
const response = await client.request(
|
|
107
|
+
const response = await client.request(`${tool.path}/${encodeURIComponent(id)}`);
|
|
95
108
|
return ok(withMeta(response.data, response.meta));
|
|
96
109
|
}
|
|
97
110
|
catch (error) {
|
|
@@ -99,6 +112,18 @@ Returns: One whale trade with trader info, market context, size, side, price, cu
|
|
|
99
112
|
}
|
|
100
113
|
});
|
|
101
114
|
}
|
|
115
|
+
export function registerGetLargeTrade(server, client) {
|
|
116
|
+
registerTradeDetail(server, client, { name: "get_large_trade", title: "Get large trade", path: "/api/v1/large-trades" });
|
|
117
|
+
}
|
|
118
|
+
/** Deprecated spelling of get_large_trade (#16304). */
|
|
119
|
+
export function registerGetWhaleTrade(server, client) {
|
|
120
|
+
registerTradeDetail(server, client, {
|
|
121
|
+
name: "get_whale_trade",
|
|
122
|
+
title: "Get Whale Trade",
|
|
123
|
+
path: "/api/v1/whale-trades",
|
|
124
|
+
deprecatedOf: "get_large_trade",
|
|
125
|
+
});
|
|
126
|
+
}
|
|
102
127
|
export function registerBatchGetMarketIntel(server, client) {
|
|
103
128
|
server.registerTool("batch_get_market_intel", {
|
|
104
129
|
title: "Batch Market Intelligence",
|
|
@@ -260,15 +285,10 @@ Returns: List of position timeline events with pagination metadata.`,
|
|
|
260
285
|
export function registerGetInsiderRadarFlag(server, client) {
|
|
261
286
|
server.registerTool("get_insider_radar_flag", {
|
|
262
287
|
title: "Get Insider Radar Flag",
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
Returns: One radar flag with trader, market, suspicion scores, and evidence.`,
|
|
269
|
-
inputSchema: {
|
|
270
|
-
id: z.string().trim().min(1).describe("Radar flag ID such as rf_123 or 123"),
|
|
271
|
-
},
|
|
288
|
+
// Deprecated alias of get_suspicious_trade (#16301): same schema, the
|
|
289
|
+
// deprecated path, kept live for existing clients.
|
|
290
|
+
description: `Deprecated alias of get_suspicious_trade (#16301), kept live; it calls the deprecated /api/v1/insider-radar/{id} path. ${SUSPICIOUS_TRADE_DESCRIPTION}`,
|
|
291
|
+
inputSchema: suspiciousTradeInputSchema,
|
|
272
292
|
annotations: readAnnotations,
|
|
273
293
|
}, async ({ id }) => {
|
|
274
294
|
try {
|
|
@@ -467,7 +487,7 @@ Returns: Trader export snapshot metadata.`,
|
|
|
467
487
|
export function registerGetPlatforms(server, client) {
|
|
468
488
|
server.registerTool("get_platforms", {
|
|
469
489
|
title: "Get Platform Capability Matrix",
|
|
470
|
-
description: `Read the provider capability matrix declaring which V1 intelligence surfaces are supported, partial, or unsupported per platform. Polymarket reports a status (supported, partial, or unsupported) for grade, pnl, strategy, timeline, whale_signal, insider_radar, and market_snapshot. Use this before choosing trader, market,
|
|
490
|
+
description: `Read the provider capability matrix declaring which V1 intelligence surfaces are supported, partial, or unsupported per platform. Polymarket reports a status (supported, partial, or unsupported) for grade, pnl, strategy, timeline, whale_signal, suspicious_trades, insider_radar (the deprecated spelling of suspicious_trades), and market_snapshot. Use this before choosing trader, market, large-trade, or suspicious-trade routes so you do not assume parity across providers.
|
|
471
491
|
|
|
472
492
|
Args: none
|
|
473
493
|
|
|
@@ -538,10 +558,10 @@ Returns: Report snapshot metadata and entries (source_range, snapshot.status, co
|
|
|
538
558
|
}
|
|
539
559
|
});
|
|
540
560
|
}
|
|
541
|
-
|
|
542
|
-
server.registerTool(
|
|
543
|
-
title:
|
|
544
|
-
description: "Observation-only evidence for sports and esports markets, for a Pro API key: graded-holder piles the ranked
|
|
561
|
+
function registerSideObservations(server, client, tool) {
|
|
562
|
+
server.registerTool(tool.name, {
|
|
563
|
+
title: tool.title,
|
|
564
|
+
description: `${tool.deprecatedOf ? `Deprecated alias of ${tool.deprecatedOf} (#16310), kept live; it calls the deprecated ${tool.path} path. ` : ""}Observation-only evidence for sports and esports markets, for a Pro API key: graded-holder piles the ranked route does not fund. cohort is required: wider_holder, in_play, or emerging_pile. Every row carries observation_only=true, and the canonical side, backing_score and side_share keys beside the older piled_side, conviction_score and smart_score spellings, which carry the same values. The page carries snapshot_as_of, degraded, funnel, and meta: when degraded is true the snapshot is partial and is not healthy evidence. Never feeds or changes get_pre_game_sides. A refreshed snapshot rejects an old cursor with cursor_expired; request the first page again.`,
|
|
545
565
|
inputSchema: {
|
|
546
566
|
cohort: z.enum(["wider_holder", "in_play", "emerging_pile"]).describe("Observation cohort; required"),
|
|
547
567
|
category: z.string().optional().describe("Sport category; omitted means all sports"),
|
|
@@ -551,7 +571,7 @@ export function registerGetSportsEdgeObservations(server, client) {
|
|
|
551
571
|
annotations: readAnnotations,
|
|
552
572
|
}, async (args) => {
|
|
553
573
|
try {
|
|
554
|
-
const response = await client.request(
|
|
574
|
+
const response = await client.request(tool.path, args);
|
|
555
575
|
return ok({
|
|
556
576
|
data: response.data,
|
|
557
577
|
has_more: response.has_more,
|
|
@@ -571,26 +591,46 @@ export function registerGetSportsEdgeObservations(server, client) {
|
|
|
571
591
|
}
|
|
572
592
|
});
|
|
573
593
|
}
|
|
574
|
-
export function
|
|
575
|
-
server
|
|
576
|
-
|
|
577
|
-
|
|
594
|
+
export function registerGetPreGameSideObservations(server, client) {
|
|
595
|
+
registerSideObservations(server, client, {
|
|
596
|
+
name: "get_pre_game_side_observations",
|
|
597
|
+
title: "List pre-game side observations",
|
|
598
|
+
path: "/api/v1/sports/pre-game-side-observations",
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
/** Deprecated spelling of get_pre_game_side_observations (#16310). */
|
|
602
|
+
export function registerGetSportsEdgeObservations(server, client) {
|
|
603
|
+
registerSideObservations(server, client, {
|
|
604
|
+
name: "get_sports_edge_observations",
|
|
605
|
+
title: "Get Sports Edge Observations",
|
|
606
|
+
path: "/api/v1/sports-edge-observations",
|
|
607
|
+
deprecatedOf: "get_pre_game_side_observations",
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
function registerSides(server, client, tool) {
|
|
611
|
+
server.registerTool(tool.name, {
|
|
612
|
+
title: tool.title,
|
|
613
|
+
description: `${tool.deprecatedOf ? `Deprecated alias of ${tool.deprecatedOf} (#16310), kept live; it calls the deprecated ${tool.path} path. ` : ""}Upcoming games ranked by the side profitable wallets hold, for a Pro API key. Eligibility uses recent graded large-trade flow; ranking uses current graded holder concentration. Returns market identity, the side and its token ID, kickoff, grade distribution, backing_score, ranked_at, and availability, with the older piled_side, signal_created_at, conviction_score and smart_score keys carrying the same values. Analytics, not an order instruction. Cached kickoffs may have passed; inspect timestamps before acting.`,
|
|
578
614
|
inputSchema: {
|
|
579
615
|
category: z.string().optional().describe("Sport category; omitted means all sports"),
|
|
580
616
|
limit: z.number().int().min(1).max(100).default(20),
|
|
581
|
-
cursor: z.string().optional().describe("Opaque cursor pinned to a
|
|
617
|
+
cursor: z.string().optional().describe("Opaque cursor pinned to a ranked snapshot"),
|
|
582
618
|
horizon_hours: z.number().int().min(1).max(48).default(12),
|
|
583
619
|
min_grade: z.enum(["S", "A", "B"]).default("B"),
|
|
584
620
|
},
|
|
585
621
|
annotations: readAnnotations,
|
|
586
622
|
}, async (args) => {
|
|
587
623
|
try {
|
|
588
|
-
const response = await client.request(
|
|
624
|
+
const response = await client.request(tool.path, args);
|
|
625
|
+
// `meta` verbatim, like every other list tool (#16548): its
|
|
626
|
+
// directional_source "degraded" says the ranking fell back to the raw
|
|
627
|
+
// backing score, and request_id correlates the read.
|
|
589
628
|
return ok({
|
|
590
629
|
data: response.data,
|
|
591
630
|
has_more: response.has_more,
|
|
592
631
|
next_cursor: response.next_cursor,
|
|
593
632
|
...(response.total === undefined ? {} : { total: response.total }),
|
|
633
|
+
...(response.meta === undefined ? {} : { meta: response.meta }),
|
|
594
634
|
});
|
|
595
635
|
}
|
|
596
636
|
catch (error) {
|
|
@@ -598,4 +638,20 @@ export function registerGetSportsEdgeSignals(server, client) {
|
|
|
598
638
|
}
|
|
599
639
|
});
|
|
600
640
|
}
|
|
641
|
+
export function registerGetPreGameSides(server, client) {
|
|
642
|
+
registerSides(server, client, {
|
|
643
|
+
name: "get_pre_game_sides",
|
|
644
|
+
title: "List pre-game sides",
|
|
645
|
+
path: "/api/v1/sports/pre-game-sides",
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
/** Deprecated spelling of get_pre_game_sides (#16310). */
|
|
649
|
+
export function registerGetSportsEdgeSignals(server, client) {
|
|
650
|
+
registerSides(server, client, {
|
|
651
|
+
name: "get_sports_edge_signals",
|
|
652
|
+
title: "Get Ranked Sports Edge Signals",
|
|
653
|
+
path: "/api/v1/sports-edge-signals",
|
|
654
|
+
deprecatedOf: "get_pre_game_sides",
|
|
655
|
+
});
|
|
656
|
+
}
|
|
601
657
|
//# sourceMappingURL=read-parity.js.map
|