@sharpe-terminal/mcp-server 1.2.0 → 1.5.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 +65 -163
- package/dist/api-client.d.ts +40 -0
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +244 -9
- package/dist/api-client.js.map +1 -1
- package/dist/composite-tools.d.ts +49 -3
- package/dist/composite-tools.d.ts.map +1 -1
- package/dist/composite-tools.js +452 -380
- package/dist/composite-tools.js.map +1 -1
- package/dist/index.js +9 -226
- package/dist/index.js.map +1 -1
- package/dist/resources.d.ts +44 -5
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +61 -5
- package/dist/resources.js.map +1 -1
- package/dist/server.d.ts +15 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +266 -0
- package/dist/server.js.map +1 -0
- package/dist/tool-runtime.d.ts +53 -0
- package/dist/tool-runtime.d.ts.map +1 -1
- package/dist/tool-runtime.js +277 -52
- package/dist/tool-runtime.js.map +1 -1
- package/dist/tools.d.ts +143 -76
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +403 -116
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/dist/tools.d.ts
CHANGED
|
@@ -1,12 +1,79 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const globalOverviewSchema: {
|
|
3
|
+
tab: z.ZodDefault<z.ZodEnum<{
|
|
4
|
+
crypto: "crypto";
|
|
5
|
+
equity: "equity";
|
|
6
|
+
preipo: "preipo";
|
|
7
|
+
etf: "etf";
|
|
8
|
+
index: "index";
|
|
9
|
+
commodity: "commodity";
|
|
10
|
+
fx: "fx";
|
|
11
|
+
}>>;
|
|
12
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
14
|
+
};
|
|
15
|
+
export declare const rwaPerpRatesSchema: {
|
|
16
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
17
|
+
current: "current";
|
|
18
|
+
stats: "stats";
|
|
19
|
+
history: "history";
|
|
20
|
+
}>>;
|
|
21
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
22
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
23
|
+
days: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
24
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
26
|
+
};
|
|
2
27
|
export declare const fundingRatesSchema: {
|
|
3
28
|
type: z.ZodDefault<z.ZodEnum<{
|
|
4
|
-
accumulated: "accumulated";
|
|
5
29
|
current: "current";
|
|
6
30
|
history: "history";
|
|
31
|
+
accumulated: "accumulated";
|
|
7
32
|
}>>;
|
|
8
33
|
coin: z.ZodOptional<z.ZodString>;
|
|
34
|
+
exchange: z.ZodOptional<z.ZodString>;
|
|
35
|
+
margin: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
linear: "linear";
|
|
37
|
+
inverse: "inverse";
|
|
38
|
+
}>>;
|
|
39
|
+
asset_class: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
crypto: "crypto";
|
|
41
|
+
equity: "equity";
|
|
42
|
+
index: "index";
|
|
43
|
+
commodity: "commodity";
|
|
44
|
+
fx: "fx";
|
|
45
|
+
}>>;
|
|
9
46
|
days: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
47
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
49
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
open_interest: "open_interest";
|
|
51
|
+
"-open_interest": "-open_interest";
|
|
52
|
+
}>>;
|
|
53
|
+
extremes: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
min_oi_usd: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
stats: z.ZodOptional<z.ZodEnum<{
|
|
56
|
+
1: "1";
|
|
57
|
+
}>>;
|
|
58
|
+
summary: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
1: "1";
|
|
60
|
+
}>>;
|
|
61
|
+
};
|
|
62
|
+
export declare const fundingSettlementSchema: {
|
|
63
|
+
window: z.ZodDefault<z.ZodEnum<{
|
|
64
|
+
current: "current";
|
|
65
|
+
"1d": "1d";
|
|
66
|
+
"3d": "3d";
|
|
67
|
+
"7d": "7d";
|
|
68
|
+
}>>;
|
|
69
|
+
class: z.ZodDefault<z.ZodEnum<{
|
|
70
|
+
crypto: "crypto";
|
|
71
|
+
all: "all";
|
|
72
|
+
rwa: "rwa";
|
|
73
|
+
}>>;
|
|
74
|
+
coin: z.ZodOptional<z.ZodString>;
|
|
75
|
+
exchange: z.ZodOptional<z.ZodString>;
|
|
76
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
10
77
|
};
|
|
11
78
|
export declare const futuresDataSchema: {
|
|
12
79
|
chart: z.ZodEnum<{
|
|
@@ -14,15 +81,17 @@ export declare const futuresDataSchema: {
|
|
|
14
81
|
}>;
|
|
15
82
|
coin: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
16
83
|
timeframe: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
17
|
-
"3M": "3M";
|
|
18
84
|
"1W": "1W";
|
|
19
85
|
"2W": "2W";
|
|
20
86
|
"1M": "1M";
|
|
87
|
+
"3M": "3M";
|
|
21
88
|
"6M": "6M";
|
|
22
89
|
"1Y": "1Y";
|
|
23
90
|
"3Y": "3Y";
|
|
24
91
|
}>>>;
|
|
25
92
|
exchanges: z.ZodOptional<z.ZodString>;
|
|
93
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
26
95
|
};
|
|
27
96
|
export declare const futuresCoinsSchema: {};
|
|
28
97
|
export declare const correlationMatrixSchema: {
|
|
@@ -41,16 +110,31 @@ export declare const arbitrageSpotPerpSchema: {
|
|
|
41
110
|
long: "long";
|
|
42
111
|
short: "short";
|
|
43
112
|
}>>>;
|
|
113
|
+
minOiUsd: z.ZodOptional<z.ZodNumber>;
|
|
44
114
|
};
|
|
45
115
|
export declare const arbitrageCrossExchangeSchema: {
|
|
46
116
|
exchanges: z.ZodOptional<z.ZodString>;
|
|
117
|
+
minOiUsd: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
minVolUsd: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
assetClass: z.ZodOptional<z.ZodEnum<{
|
|
120
|
+
crypto: "crypto";
|
|
121
|
+
all: "all";
|
|
122
|
+
rwa: "rwa";
|
|
123
|
+
}>>;
|
|
124
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
47
125
|
};
|
|
48
126
|
export declare const arbitrageScannerSchema: {
|
|
49
127
|
coin: z.ZodOptional<z.ZodString>;
|
|
50
128
|
exchanges: z.ZodOptional<z.ZodString>;
|
|
51
129
|
minApr: z.ZodOptional<z.ZodNumber>;
|
|
52
130
|
minOiUsd: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
minVolumeUsd: z.ZodOptional<z.ZodNumber>;
|
|
53
132
|
minDepthUsd: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
marginType: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
linear: "linear";
|
|
135
|
+
inverse: "inverse";
|
|
136
|
+
both: "both";
|
|
137
|
+
}>>;
|
|
54
138
|
notional: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
55
139
|
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
56
140
|
cursor: z.ZodOptional<z.ZodString>;
|
|
@@ -66,28 +150,12 @@ export declare const cexSpotTransferScannerSchema: {
|
|
|
66
150
|
};
|
|
67
151
|
export declare const heatmapSchema: {
|
|
68
152
|
mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
69
|
-
narratives: "narratives";
|
|
70
153
|
coins: "coins";
|
|
154
|
+
narratives: "narratives";
|
|
71
155
|
ecosystems: "ecosystems";
|
|
72
156
|
}>>>;
|
|
73
157
|
category: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
74
158
|
};
|
|
75
|
-
export declare const dexScreenerDataSchema: {
|
|
76
|
-
category: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
77
|
-
volume: "volume";
|
|
78
|
-
trending: "trending";
|
|
79
|
-
gainers: "gainers";
|
|
80
|
-
losers: "losers";
|
|
81
|
-
new_pairs: "new_pairs";
|
|
82
|
-
}>>>;
|
|
83
|
-
network: z.ZodOptional<z.ZodString>;
|
|
84
|
-
phrase: z.ZodOptional<z.ZodString>;
|
|
85
|
-
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
86
|
-
};
|
|
87
|
-
export declare const dexScreenerSecuritySchema: {
|
|
88
|
-
address: z.ZodString;
|
|
89
|
-
chainId: z.ZodNumber;
|
|
90
|
-
};
|
|
91
159
|
export declare const tokenScannerSchema: {
|
|
92
160
|
mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
93
161
|
hot: "hot";
|
|
@@ -102,13 +170,26 @@ export declare const tokenScannerSchema: {
|
|
|
102
170
|
discovery: "discovery";
|
|
103
171
|
balanced: "balanced";
|
|
104
172
|
strict: "strict";
|
|
105
|
-
custom: "custom";
|
|
106
173
|
}>>;
|
|
174
|
+
days: z.ZodOptional<z.ZodNumber>;
|
|
107
175
|
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
108
176
|
minLiquidityUsd: z.ZodOptional<z.ZodNumber>;
|
|
109
177
|
minVolumeH24: z.ZodOptional<z.ZodNumber>;
|
|
110
178
|
minTxnsH1: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
minTxnsH24: z.ZodOptional<z.ZodNumber>;
|
|
111
180
|
maxAgeHours: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
includeUnknownAge: z.ZodOptional<z.ZodBoolean>;
|
|
182
|
+
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
score: "score";
|
|
184
|
+
readiness: "readiness";
|
|
185
|
+
rs: "rs";
|
|
186
|
+
volume: "volume";
|
|
187
|
+
momentum: "momentum";
|
|
188
|
+
}>>;
|
|
189
|
+
minBreakoutReadiness: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
minRelativeStrength: z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
maxVolLiqRatio: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
minPriceChangeH1: z.ZodOptional<z.ZodNumber>;
|
|
112
193
|
};
|
|
113
194
|
export declare const rugCheckSecuritySchema: {
|
|
114
195
|
address: z.ZodString;
|
|
@@ -119,8 +200,8 @@ export declare const rugCheckTrendingSchema: {
|
|
|
119
200
|
};
|
|
120
201
|
export declare const stablecoinsSchema: {
|
|
121
202
|
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
122
|
-
overview: "overview";
|
|
123
203
|
detail: "detail";
|
|
204
|
+
overview: "overview";
|
|
124
205
|
yields: "yields";
|
|
125
206
|
}>>>;
|
|
126
207
|
slug: z.ZodOptional<z.ZodString>;
|
|
@@ -136,18 +217,18 @@ export declare const mindshareSchema: {
|
|
|
136
217
|
false: "false";
|
|
137
218
|
}>>;
|
|
138
219
|
timeframe: z.ZodOptional<z.ZodEnum<{
|
|
139
|
-
"3M": "3M";
|
|
140
220
|
"1W": "1W";
|
|
141
221
|
"1M": "1M";
|
|
222
|
+
"3M": "3M";
|
|
142
223
|
"6M": "6M";
|
|
143
224
|
"1Y": "1Y";
|
|
144
225
|
"3Y": "3Y";
|
|
145
226
|
}>>;
|
|
146
227
|
window: z.ZodOptional<z.ZodEnum<{
|
|
228
|
+
"7d": "7d";
|
|
147
229
|
"30d": "30d";
|
|
148
230
|
now: "now";
|
|
149
231
|
"24h": "24h";
|
|
150
|
-
"7d": "7d";
|
|
151
232
|
}>>;
|
|
152
233
|
};
|
|
153
234
|
export declare const webTrafficSchema: {
|
|
@@ -157,31 +238,35 @@ export declare const webTrafficSchema: {
|
|
|
157
238
|
narrative: "narrative";
|
|
158
239
|
}>>;
|
|
159
240
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
241
|
+
market: "market";
|
|
160
242
|
rankings: "rankings";
|
|
161
|
-
trends: "trends";
|
|
162
243
|
snapshots: "snapshots";
|
|
163
|
-
market: "market";
|
|
164
244
|
}>>;
|
|
165
245
|
tf: z.ZodOptional<z.ZodEnum<{
|
|
166
246
|
all: "all";
|
|
247
|
+
"7d": "7d";
|
|
167
248
|
"30d": "30d";
|
|
168
249
|
"90d": "90d";
|
|
169
250
|
"1y": "1y";
|
|
170
251
|
"3y": "3y";
|
|
171
|
-
"7d": "7d";
|
|
172
252
|
}>>;
|
|
173
253
|
entities: z.ZodOptional<z.ZodString>;
|
|
174
254
|
sub: z.ZodOptional<z.ZodEnum<{
|
|
255
|
+
global: "global";
|
|
175
256
|
trending: "trending";
|
|
176
257
|
categories: "categories";
|
|
177
|
-
global: "global";
|
|
178
258
|
}>>;
|
|
179
259
|
};
|
|
180
|
-
export declare const katanaSchema: {};
|
|
181
260
|
export declare const narrativesSchema: {
|
|
182
261
|
narrative: z.ZodOptional<z.ZodString>;
|
|
183
262
|
correlation: z.ZodOptional<z.ZodString>;
|
|
184
263
|
timeframe: z.ZodOptional<z.ZodString>;
|
|
264
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
265
|
+
"-change24h": "-change24h";
|
|
266
|
+
change24h: "change24h";
|
|
267
|
+
}>>;
|
|
268
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
185
270
|
};
|
|
186
271
|
export declare const ecosystemsSchema: {
|
|
187
272
|
ecosystem: z.ZodOptional<z.ZodString>;
|
|
@@ -192,15 +277,15 @@ export declare const ecosystemsSchema: {
|
|
|
192
277
|
export declare const memecoinsSchema: {
|
|
193
278
|
narrative: z.ZodOptional<z.ZodString>;
|
|
194
279
|
historical: z.ZodOptional<z.ZodEnum<{
|
|
280
|
+
"7d": "7d";
|
|
195
281
|
"30d": "30d";
|
|
196
282
|
"1y": "1y";
|
|
197
283
|
"24h": "24h";
|
|
198
|
-
"7d": "7d";
|
|
199
284
|
}>>;
|
|
200
285
|
coinHistory: z.ZodOptional<z.ZodEnum<{
|
|
286
|
+
"7d": "7d";
|
|
201
287
|
"1y": "1y";
|
|
202
288
|
"24h": "24h";
|
|
203
|
-
"7d": "7d";
|
|
204
289
|
"1m": "1m";
|
|
205
290
|
}>>;
|
|
206
291
|
};
|
|
@@ -219,19 +304,9 @@ export declare const newsSchema: {
|
|
|
219
304
|
category: z.ZodOptional<z.ZodString>;
|
|
220
305
|
coin: z.ZodOptional<z.ZodString>;
|
|
221
306
|
since: z.ZodOptional<z.ZodString>;
|
|
307
|
+
q: z.ZodOptional<z.ZodString>;
|
|
222
308
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
223
309
|
};
|
|
224
|
-
export declare const curatedNewsSchema: {
|
|
225
|
-
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
226
|
-
category: z.ZodOptional<z.ZodEnum<{
|
|
227
|
-
all: "all";
|
|
228
|
-
crypto: "crypto";
|
|
229
|
-
ai: "ai";
|
|
230
|
-
markets: "markets";
|
|
231
|
-
geopolitics: "geopolitics";
|
|
232
|
-
}>>;
|
|
233
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
234
|
-
};
|
|
235
310
|
export declare const marketOverviewSchema: {};
|
|
236
311
|
export declare const pricePredictionSchema: {
|
|
237
312
|
coin: z.ZodOptional<z.ZodString>;
|
|
@@ -241,45 +316,18 @@ export declare const searchMarketCapSchema: {
|
|
|
241
316
|
};
|
|
242
317
|
export declare const gemFinderSchema: {
|
|
243
318
|
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
319
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
244
320
|
};
|
|
245
321
|
export declare const derivativesOverviewSchema: {};
|
|
246
322
|
export declare const apiCoverageSchema: {};
|
|
247
323
|
export declare const listingsDataSchema: {
|
|
248
324
|
narrative: z.ZodOptional<z.ZodString>;
|
|
249
325
|
exchange: z.ZodOptional<z.ZodEnum<{
|
|
250
|
-
hyperliquid: "hyperliquid";
|
|
251
326
|
binance: "binance";
|
|
252
327
|
okx: "okx";
|
|
253
328
|
bybit: "bybit";
|
|
254
329
|
gateio: "gateio";
|
|
255
330
|
mexc: "mexc";
|
|
256
|
-
bitget: "bitget";
|
|
257
|
-
kucoin: "kucoin";
|
|
258
|
-
bingx: "bingx";
|
|
259
|
-
bitmart: "bitmart";
|
|
260
|
-
deepcoin: "deepcoin";
|
|
261
|
-
coinbase: "coinbase";
|
|
262
|
-
kraken: "kraken";
|
|
263
|
-
crypto_com: "crypto_com";
|
|
264
|
-
upbit: "upbit";
|
|
265
|
-
bithumb: "bithumb";
|
|
266
|
-
htx: "htx";
|
|
267
|
-
bitfinex: "bitfinex";
|
|
268
|
-
bitstamp: "bitstamp";
|
|
269
|
-
gemini: "gemini";
|
|
270
|
-
bitmex: "bitmex";
|
|
271
|
-
deribit: "deribit";
|
|
272
|
-
phemex: "phemex";
|
|
273
|
-
lbank: "lbank";
|
|
274
|
-
bitrue: "bitrue";
|
|
275
|
-
coinex: "coinex";
|
|
276
|
-
backpack: "backpack";
|
|
277
|
-
hashkey: "hashkey";
|
|
278
|
-
whitebit: "whitebit";
|
|
279
|
-
toobit: "toobit";
|
|
280
|
-
aster: "aster";
|
|
281
|
-
dydx: "dydx";
|
|
282
|
-
aevo: "aevo";
|
|
283
331
|
}>>;
|
|
284
332
|
};
|
|
285
333
|
export declare const listingsRecentSchema: {
|
|
@@ -320,9 +368,9 @@ export declare const listingsRecentSchema: {
|
|
|
320
368
|
aevo: "aevo";
|
|
321
369
|
}>>;
|
|
322
370
|
venue_type: z.ZodOptional<z.ZodEnum<{
|
|
371
|
+
dex: "dex";
|
|
323
372
|
cex: "cex";
|
|
324
373
|
perp_dex: "perp_dex";
|
|
325
|
-
dex: "dex";
|
|
326
374
|
}>>;
|
|
327
375
|
market_type: z.ZodOptional<z.ZodEnum<{
|
|
328
376
|
spot: "spot";
|
|
@@ -404,9 +452,9 @@ export declare const listingsEventsSchema: {
|
|
|
404
452
|
aevo: "aevo";
|
|
405
453
|
}>>;
|
|
406
454
|
venue_type: z.ZodOptional<z.ZodEnum<{
|
|
455
|
+
dex: "dex";
|
|
407
456
|
cex: "cex";
|
|
408
457
|
perp_dex: "perp_dex";
|
|
409
|
-
dex: "dex";
|
|
410
458
|
}>>;
|
|
411
459
|
market_type: z.ZodOptional<z.ZodEnum<{
|
|
412
460
|
spot: "spot";
|
|
@@ -454,9 +502,9 @@ export declare const listingsEventsSchema: {
|
|
|
454
502
|
};
|
|
455
503
|
export declare const listingsExchangesSchema: {
|
|
456
504
|
venue_type: z.ZodOptional<z.ZodEnum<{
|
|
505
|
+
dex: "dex";
|
|
457
506
|
cex: "cex";
|
|
458
507
|
perp_dex: "perp_dex";
|
|
459
|
-
dex: "dex";
|
|
460
508
|
}>>;
|
|
461
509
|
market_type: z.ZodOptional<z.ZodEnum<{
|
|
462
510
|
spot: "spot";
|
|
@@ -473,6 +521,7 @@ export declare const listingsExchangesSchema: {
|
|
|
473
521
|
export declare const signalScoreSchema: {
|
|
474
522
|
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
475
523
|
min_score: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
524
|
+
coin: z.ZodOptional<z.ZodString>;
|
|
476
525
|
};
|
|
477
526
|
export declare const pumpDumpSchema: {
|
|
478
527
|
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
@@ -484,20 +533,38 @@ export declare const pumpDumpSchema: {
|
|
|
484
533
|
dump: "dump";
|
|
485
534
|
dumping: "dumping";
|
|
486
535
|
}>>;
|
|
536
|
+
coin: z.ZodOptional<z.ZodString>;
|
|
487
537
|
};
|
|
538
|
+
/**
|
|
539
|
+
* oi-snapshot is documented as current open interest by exchange, but both
|
|
540
|
+
* routes return the whole ascending window (up to 5,000 raw rows). Keep each
|
|
541
|
+
* exchange's newest reading, largest first, so "current" means current.
|
|
542
|
+
*/
|
|
543
|
+
export declare function latestRowPerExchange(rows: unknown[]): unknown[];
|
|
544
|
+
export interface PostProcessContext {
|
|
545
|
+
/** The API already paged this response (it carried a pagination block). */
|
|
546
|
+
paginated: boolean;
|
|
547
|
+
}
|
|
488
548
|
export interface ToolDef {
|
|
489
549
|
name: string;
|
|
490
550
|
description: string;
|
|
491
551
|
schema: Record<string, z.ZodType>;
|
|
492
552
|
apiPath: string;
|
|
493
553
|
fallbackPath: string;
|
|
554
|
+
/**
|
|
555
|
+
* Adjusts the arguments before the request, e.g. a default page size for a
|
|
556
|
+
* route whose unpaged answer is megabytes the MAX_ITEMS cap would discard.
|
|
557
|
+
*/
|
|
558
|
+
prepareArgs?: (args: Record<string, unknown>) => Record<string, unknown>;
|
|
494
559
|
/**
|
|
495
560
|
* Runs after the HTTP response is unwrapped but before MAX_ITEMS truncation.
|
|
496
|
-
* Use this
|
|
497
|
-
*
|
|
498
|
-
*
|
|
561
|
+
* Use this to re-apply a filter the tool already sent to the backend, so the
|
|
562
|
+
* requested rows survive truncation instead of being cut off by an
|
|
563
|
+
* arbitrary prefix of the unfiltered book, or to page a free route that
|
|
564
|
+
* ignores limit/cursor (skip it when `context.paginated` says the API
|
|
565
|
+
* already did).
|
|
499
566
|
*/
|
|
500
|
-
postProcess?: (data: unknown, args: Record<string, unknown
|
|
567
|
+
postProcess?: (data: unknown, args: Record<string, unknown>, context?: PostProcessContext) => unknown;
|
|
501
568
|
}
|
|
502
569
|
export declare const TOOL_DEFS: ToolDef[];
|
|
503
570
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|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