x402-omni-oracle 0.1.0 → 0.1.1

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/src/index.ts CHANGED
@@ -4,13 +4,15 @@ import { z } from 'zod';
4
4
  // Base URL for Omni-Oracle
5
5
  const BASE_URL = 'https://omni-oracle.omnioracle.workers.dev';
6
6
 
7
+ // Response type for Oracle calls
8
+ type OracleResponse = Record<string, unknown> | { error: string; message: string; price?: string | null; recipient?: string | null; endpoint?: string };
7
9
 
8
- async function fetchOracle(path: string, params: Record<string, any> = {}) {
10
+ async function fetchOracle(path: string, params: Record<string, unknown> = {}): Promise<OracleResponse> {
9
11
  const url = new URL(`${BASE_URL}${path}`);
10
-
12
+
11
13
  // Substitute path params
12
14
  let finalPath = path;
13
- const queryParams: Record<string, any> = {};
15
+ const queryParams: Record<string, unknown> = {};
14
16
 
15
17
  for (const [key, value] of Object.entries(params)) {
16
18
  if (finalPath.includes(`{${key}}`)) {
@@ -19,7 +21,7 @@ async function fetchOracle(path: string, params: Record<string, any> = {}) {
19
21
  queryParams[key] = value;
20
22
  }
21
23
  }
22
-
24
+
23
25
  url.pathname = finalPath;
24
26
  for (const [key, value] of Object.entries(queryParams)) {
25
27
  if (value !== undefined && value !== null) {
@@ -30,218 +32,180 @@ async function fetchOracle(path: string, params: Record<string, any> = {}) {
30
32
  try {
31
33
  const res = await fetch(url.toString());
32
34
  if (res.status === 200) {
33
- return await res.json();
35
+ return await res.json() as Record<string, unknown>;
34
36
  } else if (res.status === 402) {
35
- return {
37
+ const errorData = await res.json() as any;
38
+ if (errorData.accepts && errorData.accepts.length > 0) {
39
+ const offer = errorData.accepts[0];
40
+ return {
41
+ error: 'PAYMENT_REQUIRED',
42
+ type: 'CHALLENGE',
43
+ message: `Payment Required. Price: ${offer.maxAmountRequired} (units). Send to ${offer.payTo} on ${offer.network}.`,
44
+ payment_instructions: {
45
+ price_usdc: parseInt(offer.maxAmountRequired) / 1000000,
46
+ pay_to: offer.payTo,
47
+ network: offer.network,
48
+ description: offer.description
49
+ },
50
+ hint: "Sign a transaction and retry this tool call with header 'X-402-Payment-Hash'."
51
+ };
52
+ }
53
+ return {
36
54
  error: 'PAYMENT_REQUIRED',
37
- message: 'This endpoint requires payment (USDC/ETH). Please attach X-402-Transaction-Hash header.',
38
- price: res.headers.get('x-402-price'),
39
- recipient: res.headers.get('x-402-recipient'),
40
- endpoint: path
55
+ message: 'This endpoint requires payment. Please check server accepts headers.'
41
56
  };
42
57
  } else {
43
58
  return { error: `HTTP ${res.status}`, message: await res.text() };
44
59
  }
45
- } catch (e: any) {
46
- return { error: 'CONNECTION_ERROR', message: e.message };
60
+ } catch (e: unknown) {
61
+ return { error: 'CONNECTION_ERROR', message: e instanceof Error ? e.message : 'Unknown error' };
47
62
  }
48
63
  }
49
64
 
50
65
 
51
66
  export const getKLAXThermalRisk = tool({
52
- description: "Aviation weather and thermal risk data for Los Angeles International Airport.",
67
+ description: "Need to route cargo through LAX? Use this endpoint to get deterministic thermal risk scores and visibility metrics. Essential for calculating flight delays and supply chain routing.",
53
68
  parameters: z.object({}),
54
- execute: async (params) => fetchOracle('/logistics/klax', params)
69
+ execute: async () => fetchOracle('/logistics/klax', {})
55
70
  });
56
71
 
57
72
  export const getKJFKThermalRisk = tool({
58
73
  description: "Aviation weather and thermal risk data for John F. Kennedy International Airport.",
59
74
  parameters: z.object({}),
60
- execute: async (params) => fetchOracle('/logistics/kjfk', params)
75
+ execute: async () => fetchOracle('/logistics/kjfk', {})
61
76
  });
62
77
 
63
78
  export const getKMEMThermalRisk = tool({
64
79
  description: "Aviation weather for Memphis International (FedEx SuperHub).",
65
80
  parameters: z.object({}),
66
- execute: async (params) => fetchOracle('/logistics/kmem', params)
81
+ execute: async () => fetchOracle('/logistics/kmem', {})
67
82
  });
68
83
 
69
84
  export const getKORDThermalRisk = tool({
70
85
  description: "Aviation weather for Chicago O'Hare International Airport.",
71
86
  parameters: z.object({}),
72
- execute: async (params) => fetchOracle('/logistics/kord', params)
87
+ execute: async () => fetchOracle('/logistics/kord', {})
73
88
  });
74
89
 
75
90
  export const getKIAHThermalRisk = tool({
76
91
  description: "Aviation weather for George Bush Intercontinental Airport.",
77
92
  parameters: z.object({}),
78
- execute: async (params) => fetchOracle('/logistics/kiah', params)
93
+ execute: async () => fetchOracle('/logistics/kiah', {})
79
94
  });
80
95
 
81
96
  export const getLHRThermalRisk = tool({
82
97
  description: "Aviation weather for London Heathrow. Europe gateway risk.",
83
98
  parameters: z.object({}),
84
- execute: async (params) => fetchOracle('/logistics/lhr', params)
99
+ execute: async () => fetchOracle('/logistics/lhr', {})
85
100
  });
86
101
 
87
102
  export const getHNDThermalRisk = tool({
88
103
  description: "Aviation weather for Tokyo Haneda. Asia gateway risk.",
89
104
  parameters: z.object({}),
90
- execute: async (params) => fetchOracle('/logistics/hnd', params)
105
+ execute: async () => fetchOracle('/logistics/hnd', {})
91
106
  });
92
107
 
93
108
  export const getDXBThermalRisk = tool({
94
109
  description: "Aviation weather for Dubai Intl. Middle East hub risk.",
95
110
  parameters: z.object({}),
96
- execute: async (params) => fetchOracle('/logistics/dxb', params)
111
+ execute: async () => fetchOracle('/logistics/dxb', {})
97
112
  });
98
113
 
99
114
  export const getHKGThermalRisk = tool({
100
115
  description: "Aviation weather for Hong Kong. Global Air Cargo hub.",
101
116
  parameters: z.object({}),
102
- execute: async (params) => fetchOracle('/logistics/hkg', params)
117
+ execute: async () => fetchOracle('/logistics/hkg', {})
103
118
  });
104
119
 
105
120
  export const getFRAThermalRisk = tool({
106
121
  description: "Aviation weather for Frankfurt. Europe cargo hub.",
107
122
  parameters: z.object({}),
108
- execute: async (params) => fetchOracle('/logistics/fra', params)
123
+ execute: async () => fetchOracle('/logistics/fra', {})
109
124
  });
110
125
 
111
126
  export const getGreenComputeWindow = tool({
112
- description: "Returns a boolean `green_window_active` flag when the US Grid carbon intensity is low (<40%). Use for scheduling AI training jobs and compute workloads.",
127
+ description: "Optimize AI training or mining for carbon efficiency. Returns a `green_window` boolean when grid carbon intensity is <300g/kWh, allowing you to pause/resume workloads.",
113
128
  parameters: z.object({}),
114
- execute: async (params) => fetchOracle('/compute/green-window', params)
129
+ execute: async () => fetchOracle('/compute/green-window', {})
115
130
  });
116
131
 
117
132
  export const getJupiterQuote = tool({
118
- description: "Get optimal swap route from Jupiter Aggregator v6 on Solana.",
133
+ description: "Perform best-price execution on Solana. Returns optimal routing, price impact, and fee structure via Jupiter v6. Use this before executing any text-to-trade command.",
119
134
  parameters: z.object({
120
135
  inputMint: z.string().describe("Input token mint address"),
121
136
  outputMint: z.string().describe("Output token mint address"),
122
137
  amount: z.string().describe("Amount in smallest units"),
123
138
  slippageBps: z.number().int().describe("Slippage tolerance in basis points").optional()
124
139
  }),
125
- execute: async (params) => fetchOracle('/finance/jupiter/quote', params)
140
+ execute: async (args) => fetchOracle('/finance/jupiter/quote', args)
126
141
  });
127
142
 
128
143
  export const getCoinGeckoPrice = tool({
129
- description: "Real-time USD price from CoinGecko with 24h change and volatility triggers.",
144
+ description: "Get reliable crypto spot prices in USD. Access 10,000+ assets with no rate limits. Includes volatility data to help you decide when to trade.",
130
145
  parameters: z.object({
131
146
  id: z.string().describe("CoinGecko token ID")
132
147
  }),
133
- execute: async (params) => fetchOracle('/finance/coingecko/price/{id}', params)
148
+ execute: async (args) => fetchOracle('/finance/coingecko/price/{id}', args)
134
149
  });
135
150
 
136
151
  export const getCoinGeckoTrending = tool({
137
152
  description: "Top 10 trending tokens on CoinGecko.",
138
153
  parameters: z.object({}),
139
- execute: async (params) => fetchOracle('/finance/coingecko/trending', params)
154
+ execute: async () => fetchOracle('/finance/coingecko/trending', {})
140
155
  });
141
156
 
142
157
  export const getGlobalMarketStats = tool({
143
158
  description: "Total market cap, volume, and BTC/ETH dominance.",
144
159
  parameters: z.object({}),
145
- execute: async (params) => fetchOracle('/finance/coingecko/global', params)
160
+ execute: async () => fetchOracle('/finance/coingecko/global', {})
146
161
  });
147
162
 
148
- export const getFREDSeries = tool({
149
- description: "Economic indicator data from St. Louis Fed (CPI, GDP, Fed Funds Rate, etc.).",
150
- parameters: z.object({
151
- id: z.string().describe("FRED series ID")
152
- }),
153
- execute: async (params) => fetchOracle('/finance/fred/series/{id}', params)
154
- });
155
163
 
156
- export const getPopularEconomicIndicators = tool({
157
- description: "List of commonly used FRED series with descriptions.",
158
- parameters: z.object({}),
159
- execute: async (params) => fetchOracle('/finance/fred/popular', params)
160
- });
161
164
 
162
- export const getDexScreenerPairs = tool({
163
- description: "Real-time price, volume, and liquidity data for token pairs from DexScreener.",
164
- parameters: z.object({
165
- chainId: z.string().describe(""),
166
- addresses: z.string().describe("Comma-separated token addresses")
167
- }),
168
- execute: async (params) => fetchOracle('/market/dexscreener/token-pairs/{chainId}/{addresses}', params)
169
- });
170
165
 
171
- export const getProtocolTVL = tool({
172
- description: "Total Value Locked and protocol details from DeFiLlama.",
173
- parameters: z.object({
174
- protocol: z.string().describe("")
175
- }),
176
- execute: async (params) => fetchOracle('/analytics/defillama/tvl/{protocol}', params)
177
- });
178
-
179
- export const getTopStablecoins = tool({
180
- description: "Top 5 stablecoins by market cap with peg status.",
181
- parameters: z.object({}),
182
- execute: async (params) => fetchOracle('/analytics/defillama/stablecoins', params)
183
- });
184
-
185
- export const get3Stats = tool({
186
- description: "Protocol statistics from Uniswap V3 Ethereum subgraph.",
187
- parameters: z.object({}),
188
- execute: async (params) => fetchOracle('/analytics/thegraph/uniswap/stats', params)
189
- });
190
-
191
- export const getAaveV3Stats = tool({
192
- description: "Protocol statistics from Aave V3 Ethereum subgraph.",
193
- parameters: z.object({}),
194
- execute: async (params) => fetchOracle('/analytics/thegraph/aave/stats', params)
195
- });
196
166
 
197
167
  export const getBitcoinFees = tool({
198
168
  description: "Real-time recommended fees (sat/vB) from Mempool.space.",
199
169
  parameters: z.object({}),
200
- execute: async (params) => fetchOracle('/crypto/btc/fees', params)
170
+ execute: async () => fetchOracle('/crypto/congestion/fees', {})
201
171
  });
202
172
 
203
173
  export const getBitcoinBlockStatus = tool({
204
174
  description: "Latest block height from Mempool.space.",
205
175
  parameters: z.object({}),
206
- execute: async (params) => fetchOracle('/crypto/btc/block-status', params)
176
+ execute: async () => fetchOracle('/crypto/congestion/block-status', {})
207
177
  });
208
178
 
209
179
  export const getEthereumGas = tool({
210
180
  description: "Real-time Gas (Wei) from Beaconcha.in.",
211
181
  parameters: z.object({}),
212
- execute: async (params) => fetchOracle('/crypto/eth/gas-forecast', params)
182
+ execute: async () => fetchOracle('/gas/optimize/gas-forecast', {})
213
183
  });
214
184
 
215
- export const getChainlinkPrice = tool({
216
- description: "On-chain price from Chainlink aggregator on Base. Available pairs: ETH/USD, BTC/USD, USDC/USD, DAI/USD, LINK/USD.",
217
- parameters: z.object({
218
- pair: z.string().describe("")
219
- }),
220
- execute: async (params) => fetchOracle('/crypto/chainlink/price/{pair}', params)
221
- });
185
+
222
186
 
223
187
  export const getSeismicAlerts = tool({
224
188
  description: "List of recent significant seismic events from USGS.",
225
189
  parameters: z.object({}),
226
- execute: async (params) => fetchOracle('/risk/seismic/recent', params)
190
+ execute: async () => fetchOracle('/risk/seismic/recent', {})
227
191
  });
228
192
 
229
193
  export const getSolarStormAlert = tool({
230
194
  description: "Boolean `storm_active` flag for G/S/R scale events from NOAA.",
231
195
  parameters: z.object({}),
232
- execute: async (params) => fetchOracle('/risk/solar/storm-alert', params)
196
+ execute: async () => fetchOracle('/risk/solar/storm-alert', {})
233
197
  });
234
198
 
235
199
  export const getMarketCrashProbability = tool({
236
200
  description: "Composite risk score (0-100) aggregating VIX, Fear&Greed, BTC Fees. High value Alpha signal.",
237
201
  parameters: z.object({}),
238
- execute: async (params) => fetchOracle('/risk/market-crash-probability', params)
202
+ execute: async () => fetchOracle('/risk/market-crash-probability', {})
239
203
  });
240
204
 
241
205
  export const getHackerNewsTopStories = tool({
242
206
  description: "Top 10 trending stories from HackerNews.",
243
207
  parameters: z.object({}),
244
- execute: async (params) => fetchOracle('/sentiment/hn/top-stories', params)
208
+ execute: async () => fetchOracle('/sentiment/hn/top-stories', {})
245
209
  });
246
210
 
247
211
  export const searchHackerNews = tool({
@@ -249,13 +213,13 @@ export const searchHackerNews = tool({
249
213
  parameters: z.object({
250
214
  query: z.string().describe("")
251
215
  }),
252
- execute: async (params) => fetchOracle('/sentiment/hn/keyword/{query}', params)
216
+ execute: async (args) => fetchOracle('/sentiment/hn/keyword/{query}', args)
253
217
  });
254
218
 
255
219
  export const getDailyAIPapers = tool({
256
220
  description: "Latest AI/ML papers from ArXiv (cs.AI + cs.LG).",
257
221
  parameters: z.object({}),
258
- execute: async (params) => fetchOracle('/sentiment/arxiv/daily/ai', params)
222
+ execute: async () => fetchOracle('/sentiment/arxiv/daily/ai', {})
259
223
  });
260
224
 
261
225
  export const searchArXiv = tool({
@@ -263,102 +227,27 @@ export const searchArXiv = tool({
263
227
  parameters: z.object({
264
228
  q: z.string().describe("")
265
229
  }),
266
- execute: async (params) => fetchOracle('/sentiment/arxiv/search', params)
230
+ execute: async (args) => fetchOracle('/sentiment/arxiv/search', args)
267
231
  });
268
232
 
269
233
  export const getFearGreedIndex = tool({
270
234
  description: "Current crypto Fear & Greed Index with extreme_fear/extreme_greed triggers.",
271
235
  parameters: z.object({}),
272
- execute: async (params) => fetchOracle('/sentiment/feargreed/index', params)
236
+ execute: async () => fetchOracle('/sentiment/feargreed/index', {})
273
237
  });
274
238
 
275
239
  export const getFearGreedHistory = tool({
276
240
  description: "30-day historical Fear & Greed Index with trend analysis.",
277
241
  parameters: z.object({}),
278
- execute: async (params) => fetchOracle('/sentiment/feargreed/history', params)
242
+ execute: async () => fetchOracle('/sentiment/feargreed/history', {})
279
243
  });
280
244
 
281
- export const getMarketHeadlines = tool({
282
- description: "Latest market news headlines. Requires POLYGON_API_KEY.",
283
- parameters: z.object({}),
284
- execute: async (params) => fetchOracle('/sentiment/news/headlines', params)
285
- });
286
245
 
287
- export const getTickerNews = tool({
288
- description: "News for specific ticker with sentiment analysis. Requires POLYGON_API_KEY.",
289
- parameters: z.object({
290
- symbol: z.string().describe("")
291
- }),
292
- execute: async (params) => fetchOracle('/sentiment/news/ticker/{symbol}', params)
293
- });
294
-
295
- export const getIPGeolocation = tool({
296
- description: "Geographic location data for an IP address.",
297
- parameters: z.object({
298
- address: z.string().describe("")
299
- }),
300
- execute: async (params) => fetchOracle('/network/ip/{address}', params)
301
- });
302
-
303
- export const checkSSLCertificate = tool({
304
- description: "Validate SSL certificate for a domain.",
305
- parameters: z.object({
306
- domain: z.string().describe("")
307
- }),
308
- execute: async (params) => fetchOracle('/network/ssl-check', params)
309
- });
310
-
311
- export const convertHtmlToMarkdown = tool({
312
- description: "Convert any URL to clean Markdown for easier agent consumption.",
313
- parameters: z.object({
314
- url: z.string().describe("")
315
- }),
316
- execute: async (params) => fetchOracle('/utility/html-to-markdown', params)
317
- });
318
-
319
- export const resolveDNS = tool({
320
- description: "Resolve DNS records securely via Cloudflare DoH.",
321
- parameters: z.object({
322
- domain: z.string().describe(""),
323
- type: z.string().describe("").optional()
324
- }),
325
- execute: async (params) => fetchOracle('/utility/dns-lookup', params)
326
- });
327
-
328
- export const validateJSON = tool({
329
- description: "Validate strict JSON syntax. Returns boolean valid/invalid.",
330
- parameters: z.object({}),
331
- execute: async (params) => fetchOracle('/utility/json-validator', params)
332
- });
333
-
334
- export const convertRSStoJSON = tool({
335
- description: "Convert any RSS/Atom XML feed into structured JSON.",
336
- parameters: z.object({
337
- url: z.string().describe("")
338
- }),
339
- execute: async (params) => fetchOracle('/utility/rss-to-json', params)
340
- });
341
-
342
- export const getSignedTimestamp = tool({
343
- description: "Cryptographically signed timestamp for trusted time synchronization.",
344
- parameters: z.object({}),
345
- execute: async (params) => fetchOracle('/utility/timestamp', params)
346
- });
347
-
348
- export const convertUnits = tool({
349
- description: "Convert units (c/f, kg/lbs, km/mi, eth/wei).",
350
- parameters: z.object({
351
- value: z.number().describe(""),
352
- from: z.string().describe(""),
353
- to: z.string().describe("")
354
- }),
355
- execute: async (params) => fetchOracle('/utility/unit-converter', params)
356
- });
357
246
 
358
247
  export const whoami = tool({
359
248
  description: "Echoes back the caller identity, IP, and headers as seen by the Oracle, signed.",
360
249
  parameters: z.object({}),
361
- execute: async (params) => fetchOracle('/identity/whoami', params)
250
+ execute: async () => fetchOracle('/identity/whoami', {})
362
251
  });
363
252
 
364
253
  export const getReputationScore = tool({
@@ -366,19 +255,19 @@ export const getReputationScore = tool({
366
255
  parameters: z.object({
367
256
  address: z.string().describe("")
368
257
  }),
369
- execute: async (params) => fetchOracle('/identity/score/{address}', params)
258
+ execute: async (args) => fetchOracle('/identity/score/{address}', args)
370
259
  });
371
260
 
372
261
  export const getSwarmPulse = tool({
373
262
  description: "Real-time aggregated attention metrics from the agent swarm. 'Where are agents looking right now?'",
374
263
  parameters: z.object({}),
375
- execute: async (params) => fetchOracle('/meta/pulse', params)
264
+ execute: async () => fetchOracle('/meta/pulse', {})
376
265
  });
377
266
 
378
267
  export const getSwarmSentiment = tool({
379
268
  description: "Crowd-sourced sentiment derived from the ratio of Risk queries vs Finance queries.",
380
269
  parameters: z.object({}),
381
- execute: async (params) => fetchOracle('/meta/sentiment', params)
270
+ execute: async () => fetchOracle('/meta/sentiment', {})
382
271
  });
383
272
 
384
273
  export const getTokenMetadata = tool({
@@ -386,13 +275,13 @@ export const getTokenMetadata = tool({
386
275
  parameters: z.object({
387
276
  address: z.string().describe("")
388
277
  }),
389
- execute: async (params) => fetchOracle('/token/metadata/{address}', params)
278
+ execute: async (args) => fetchOracle('/token/metadata/{address}', args)
390
279
  });
391
280
 
392
281
  export const getWhaleMovements = tool({
393
282
  description: "Large transfers (> $1M) detected in the last hour.",
394
283
  parameters: z.object({}),
395
- execute: async (params) => fetchOracle('/whale/recent', params)
284
+ execute: async () => fetchOracle('/whale/recent', {})
396
285
  });
397
286
 
398
287
  export const resolveENS = tool({
@@ -400,7 +289,7 @@ export const resolveENS = tool({
400
289
  parameters: z.object({
401
290
  name: z.string().describe("")
402
291
  }),
403
- execute: async (params) => fetchOracle('/ens/resolve/{name}', params)
292
+ execute: async (args) => fetchOracle('/ens/resolve/{name}', args)
404
293
  });
405
294
 
406
295
  export const getBlockData = tool({
@@ -408,7 +297,7 @@ export const getBlockData = tool({
408
297
  parameters: z.object({
409
298
  height: z.string().describe("")
410
299
  }),
411
- execute: async (params) => fetchOracle('/chain/block/{height}', params)
300
+ execute: async (args) => fetchOracle('/chain/block/{height}', args)
412
301
  });
413
302
 
414
303
  export const checkAirdropEligibility = tool({
@@ -416,7 +305,7 @@ export const checkAirdropEligibility = tool({
416
305
  parameters: z.object({
417
306
  address: z.string().describe("")
418
307
  }),
419
- execute: async (params) => fetchOracle('/airdrop/check/{address}', params)
308
+ execute: async (args) => fetchOracle('/airdrop/check/{address}', args)
420
309
  });
421
310
 
422
311
  export const getTradePreflight = tool({
@@ -424,7 +313,7 @@ export const getTradePreflight = tool({
424
313
  parameters: z.object({
425
314
  token: z.string().describe("")
426
315
  }),
427
- execute: async (params) => fetchOracle('/preflight/trade', params)
316
+ execute: async (args) => fetchOracle('/preflight/trade', args)
428
317
  });
429
318
 
430
319
  export const getWalletValues = tool({
@@ -432,218 +321,159 @@ export const getWalletValues = tool({
432
321
  parameters: z.object({
433
322
  address: z.string().describe("")
434
323
  }),
435
- execute: async (params) => fetchOracle('/preflight/wallet', params)
324
+ execute: async (args) => fetchOracle('/preflight/wallet', args)
436
325
  });
437
326
 
438
- export const getDeFiDashboard = tool({
439
- description: "BUNDLE: Top yields, L2 TVL, and stablecoin health.",
440
- parameters: z.object({}),
441
- execute: async (params) => fetchOracle('/dashboard/defi', params)
442
- });
443
327
 
444
- export const getMarketDashboard = tool({
445
- description: "BUNDLE: Fear/Greed, trending tokens, and BTC dominance.",
446
- parameters: z.object({}),
447
- execute: async (params) => fetchOracle('/dashboard/market', params)
448
- });
449
328
 
450
329
  export const getBatchPrices = tool({
451
330
  description: "Get prices for multiple tokens in one call.",
452
331
  parameters: z.object({
453
332
  tokens: z.string().describe("Comma separated addresses")
454
333
  }),
455
- execute: async (params) => fetchOracle('/price/batch', params)
334
+ execute: async (args) => fetchOracle('/price/batch', args)
456
335
  });
457
336
 
458
- export const getStablecoinYields = tool({
459
- description: "Top APY/APR for stablecoins across lending protocols.",
460
- parameters: z.object({}),
461
- execute: async (params) => fetchOracle('/apy/stablecoin', params)
462
- });
463
337
 
464
- export const getDAOTreasuries = tool({
465
- description: "Top DAO treasury balances and holdings.",
466
- parameters: z.object({}),
467
- execute: async (params) => fetchOracle('/dao/treasuries', params)
468
- });
469
338
 
470
339
  export const getX402BazaarCatalog = tool({
471
340
  description: "Agent discovery metadata with full service catalog and pricing.",
472
341
  parameters: z.object({}),
473
- execute: async (params) => fetchOracle('/.well-known/x402-bazaar', params)
342
+ execute: async () => fetchOracle('/.well-known/x402-bazaar', {})
474
343
  });
475
344
 
476
345
  export const getOpenAPISpec = tool({
477
346
  description: "This OpenAPI 3.1 specification.",
478
347
  parameters: z.object({}),
479
- execute: async (params) => fetchOracle('/doc', params)
348
+ execute: async () => fetchOracle('/doc', {})
349
+ });
350
+
351
+ export const getPublicStatus = tool({
352
+ description: "FREE: Public system status dashboard. Returns 24h request count, avg latency, uptime %, and top categories. No payment required.",
353
+ parameters: z.object({}),
354
+ execute: async () => fetchOracle('/public/status', {})
355
+ });
356
+
357
+ export const getSystemPrompt = tool({
358
+ description: "FREE: Returns the 'Capability Patch' system prompt. Agents should read this if they encounter 402 Payment Required errors to learn the payment flow.",
359
+ parameters: z.object({}),
360
+ execute: async () => fetchOracle('/system_prompt', {})
480
361
  });
481
362
 
482
363
  export const getMarketRegime = tool({
483
364
  description: "SYNTHETIC: Composite market state (Risk-On/Off/Euphoria/Capitulation). Aggregates Fear&Greed, BTC mempool, stablecoin pegs.",
484
365
  parameters: z.object({}),
485
- execute: async (params) => fetchOracle('/alpha/market-regime', params)
366
+ execute: async () => fetchOracle('/alpha/market-regime', {})
486
367
  });
487
368
 
488
369
  export const getWhaleMomentum = tool({
489
370
  description: "SYNTHETIC: Aggregated large transaction patterns. Are whales accumulating or distributing?",
490
371
  parameters: z.object({}),
491
- execute: async (params) => fetchOracle('/alpha/whale-momentum', params)
372
+ execute: async () => fetchOracle('/alpha/whale-momentum', {})
492
373
  });
493
374
 
494
375
  export const getSentimentDivergence = tool({
495
376
  description: "SYNTHETIC: News sentiment vs price action divergence. Contrarian trading signals.",
496
377
  parameters: z.object({}),
497
- execute: async (params) => fetchOracle('/alpha/sentiment-divergence', params)
378
+ execute: async () => fetchOracle('/alpha/sentiment-divergence', {})
498
379
  });
499
380
 
500
381
  export const getRiskAdjustedYield = tool({
501
382
  description: "SYNTHETIC: DeFi yields weighted by TVL risk and IL exposure. Best risk-adjusted returns.",
502
383
  parameters: z.object({}),
503
- execute: async (params) => fetchOracle('/alpha/risk-adjusted-yield', params)
384
+ execute: async () => fetchOracle('/alpha/risk-adjusted-yield', {})
504
385
  });
505
386
 
506
387
  export const getTrendingQueries = tool({
507
388
  description: "UNIQUE: Real-time view of what agents are querying most. Derived from live traffic.",
508
389
  parameters: z.object({}),
509
- execute: async (params) => fetchOracle('/meta/trending-queries', params)
390
+ execute: async () => fetchOracle('/meta/trending-queries', {})
510
391
  });
511
392
 
512
393
  export const getSectorRotation = tool({
513
394
  description: "UNIQUE: Track volume shifts between categories over 24h. Detect agent pivots.",
514
395
  parameters: z.object({}),
515
- execute: async (params) => fetchOracle('/meta/sector-rotation', params)
396
+ execute: async () => fetchOracle('/meta/sector-rotation', {})
516
397
  });
517
398
 
518
399
  export const getAnomalyAlert = tool({
519
400
  description: "UNIQUE: Unusual agent behavior pattern detection. Volume spikes and drops.",
520
401
  parameters: z.object({}),
521
- execute: async (params) => fetchOracle('/meta/anomaly-alert', params)
402
+ execute: async () => fetchOracle('/meta/anomaly-alert', {})
522
403
  });
523
404
 
524
405
  export const getSwarmConsensus = tool({
525
406
  description: "UNIQUE: Network-wide bull/bear ratio from actual agent query patterns.",
526
407
  parameters: z.object({}),
527
- execute: async (params) => fetchOracle('/meta/consensus', params)
408
+ execute: async () => fetchOracle('/meta/consensus', {})
528
409
  });
529
410
 
530
411
  export const getSINThermalRisk = tool({
531
412
  description: "NOAA Aviation Weather for Singapore Changi. Asia-Pacific hub.",
532
413
  parameters: z.object({}),
533
- execute: async (params) => fetchOracle('/logistics/sin', params)
414
+ execute: async () => fetchOracle('/logistics/sin', {})
534
415
  });
535
416
 
536
417
  export const getPEKThermalRisk = tool({
537
418
  description: "NOAA Aviation Weather for Beijing Capital. China gateway.",
538
419
  parameters: z.object({}),
539
- execute: async (params) => fetchOracle('/logistics/pek', params)
420
+ execute: async () => fetchOracle('/logistics/pek', {})
540
421
  });
541
422
 
542
423
  export const getCDGThermalRisk = tool({
543
424
  description: "NOAA Aviation Weather for Paris Charles de Gaulle.",
544
425
  parameters: z.object({}),
545
- execute: async (params) => fetchOracle('/logistics/cdg', params)
426
+ execute: async () => fetchOracle('/logistics/cdg', {})
546
427
  });
547
428
 
548
429
  export const getAMSThermalRisk = tool({
549
430
  description: "NOAA Aviation Weather for Amsterdam Schiphol.",
550
431
  parameters: z.object({}),
551
- execute: async (params) => fetchOracle('/logistics/ams', params)
432
+ execute: async () => fetchOracle('/logistics/ams', {})
552
433
  });
553
434
 
554
435
  export const getICNThermalRisk = tool({
555
436
  description: "NOAA Aviation Weather for Seoul Incheon.",
556
437
  parameters: z.object({}),
557
- execute: async (params) => fetchOracle('/logistics/icn', params)
438
+ execute: async () => fetchOracle('/logistics/icn', {})
558
439
  });
559
440
 
560
441
  export const getSYDThermalRisk = tool({
561
442
  description: "NOAA Aviation Weather for Sydney Kingsford Smith.",
562
443
  parameters: z.object({}),
563
- execute: async (params) => fetchOracle('/logistics/syd', params)
444
+ execute: async () => fetchOracle('/logistics/syd', {})
564
445
  });
565
446
 
566
447
  export const getGRUThermalRisk = tool({
567
448
  description: "NOAA Aviation Weather for São Paulo Guarulhos.",
568
449
  parameters: z.object({}),
569
- execute: async (params) => fetchOracle('/logistics/gru', params)
450
+ execute: async () => fetchOracle('/logistics/gru', {})
570
451
  });
571
452
 
572
453
  export const getBOMThermalRisk = tool({
573
454
  description: "NOAA Aviation Weather for Mumbai Chhatrapati Shivaji.",
574
455
  parameters: z.object({}),
575
- execute: async (params) => fetchOracle('/logistics/bom', params)
456
+ execute: async () => fetchOracle('/logistics/bom', {})
576
457
  });
577
458
 
578
459
  export const getJNBThermalRisk = tool({
579
460
  description: "NOAA Aviation Weather for Johannesburg O.R. Tambo.",
580
461
  parameters: z.object({}),
581
- execute: async (params) => fetchOracle('/logistics/jnb', params)
462
+ execute: async () => fetchOracle('/logistics/jnb', {})
582
463
  });
583
464
 
584
465
  export const getMEXThermalRisk = tool({
585
466
  description: "NOAA Aviation Weather for Mexico City International.",
586
467
  parameters: z.object({}),
587
- execute: async (params) => fetchOracle('/logistics/mex', params)
588
- });
589
-
590
- export const getMarketHours = tool({
591
- description: "Check if NYSE, NASDAQ, or crypto markets are currently open.",
592
- parameters: z.object({
593
- market: z.string().describe("Market: nyse, nasdaq, crypto").optional()
594
- }),
595
- execute: async (params) => fetchOracle('/utility/market-hours', params)
596
- });
597
-
598
- export const convertTimezone = tool({
599
- description: "Convert time between timezones.",
600
- parameters: z.object({
601
- time: z.string().describe("ISO 8601 time string"),
602
- from: z.string().describe("Source timezone"),
603
- to: z.string().describe("Target timezone")
604
- }),
605
- execute: async (params) => fetchOracle('/utility/timezone-convert', params)
606
- });
607
-
608
- export const checkHoliday = tool({
609
- description: "Check if a date is a public holiday in any country.",
610
- parameters: z.object({
611
- date: z.string().describe("Date YYYY-MM-DD").optional(),
612
- country: z.string().describe("ISO country code")
613
- }),
614
- execute: async (params) => fetchOracle('/utility/holiday-check', params)
615
- });
616
-
617
- export const getCronNext = tool({
618
- description: "Parse cron expression and get next N occurrences.",
619
- parameters: z.object({
620
- cron: z.string().describe("Cron expression"),
621
- n: z.number().int().describe("Number of occurrences").optional()
622
- }),
623
- execute: async (params) => fetchOracle('/utility/cron-next', params)
468
+ execute: async () => fetchOracle('/logistics/mex', {})
624
469
  });
625
470
 
626
- export const getDateDiff = tool({
627
- description: "Calculate difference between two dates.",
628
- parameters: z.object({
629
- from: z.string().describe(""),
630
- to: z.string().describe("")
631
- }),
632
- execute: async (params) => fetchOracle('/utility/date-diff', params)
633
- });
634
471
 
635
- export const convertUnixTimestamp = tool({
636
- description: "Convert Unix timestamps to ISO dates and vice versa.",
637
- parameters: z.object({
638
- value: z.string().describe("")
639
- }),
640
- execute: async (params) => fetchOracle('/utility/unix-convert', params)
641
- });
642
472
 
643
473
  export const getTokenUnlocks = tool({
644
474
  description: "Upcoming token unlock events via DeFiLlama.",
645
475
  parameters: z.object({}),
646
- execute: async (params) => fetchOracle('/token/unlocks', params)
476
+ execute: async () => fetchOracle('/token/unlocks', {})
647
477
  });
648
478
 
649
479
  export const getTokenSupply = tool({
@@ -651,7 +481,7 @@ export const getTokenSupply = tool({
651
481
  parameters: z.object({
652
482
  id: z.string().describe("")
653
483
  }),
654
- execute: async (params) => fetchOracle('/token/supply/{id}', params)
484
+ execute: async (args) => fetchOracle('/token/supply/{id}', args)
655
485
  });
656
486
 
657
487
  export const getTokenATHATL = tool({
@@ -659,7 +489,7 @@ export const getTokenATHATL = tool({
659
489
  parameters: z.object({
660
490
  id: z.string().describe("")
661
491
  }),
662
- execute: async (params) => fetchOracle('/token/ath-atl/{id}', params)
492
+ execute: async (args) => fetchOracle('/token/ath-atl/{id}', args)
663
493
  });
664
494
 
665
495
  export const getTokenCategories = tool({
@@ -667,7 +497,7 @@ export const getTokenCategories = tool({
667
497
  parameters: z.object({
668
498
  id: z.string().describe("")
669
499
  }),
670
- execute: async (params) => fetchOracle('/token/categories/{id}', params)
500
+ execute: async (args) => fetchOracle('/token/categories/{id}', args)
671
501
  });
672
502
 
673
503
  export const getTokenExchanges = tool({
@@ -675,7 +505,7 @@ export const getTokenExchanges = tool({
675
505
  parameters: z.object({
676
506
  id: z.string().describe("")
677
507
  }),
678
- execute: async (params) => fetchOracle('/token/exchanges/{id}', params)
508
+ execute: async (args) => fetchOracle('/token/exchanges/{id}', args)
679
509
  });
680
510
 
681
511
  export const getProtocolsByChain = tool({
@@ -683,7 +513,7 @@ export const getProtocolsByChain = tool({
683
513
  parameters: z.object({
684
514
  chain: z.string().describe("")
685
515
  }),
686
- execute: async (params) => fetchOracle('/defi/protocols-by-chain', params)
516
+ execute: async (args) => fetchOracle('/defi/protocols-by-chain', args)
687
517
  });
688
518
 
689
519
  export const getTVLChange = tool({
@@ -691,7 +521,7 @@ export const getTVLChange = tool({
691
521
  parameters: z.object({
692
522
  protocol: z.string().describe("").optional()
693
523
  }),
694
- execute: async (params) => fetchOracle('/defi/tvl-change', params)
524
+ execute: async (args) => fetchOracle('/defi/tvl-change', args)
695
525
  });
696
526
 
697
527
  export const getLendingRates = tool({
@@ -699,19 +529,19 @@ export const getLendingRates = tool({
699
529
  parameters: z.object({
700
530
  token: z.string().describe("").optional()
701
531
  }),
702
- execute: async (params) => fetchOracle('/defi/lending-rates', params)
532
+ execute: async (args) => fetchOracle('/defi/lending-rates', args)
703
533
  });
704
534
 
705
535
  export const getStakingYields = tool({
706
536
  description: "Native staking APYs for ETH, SOL, ATOM, etc.",
707
537
  parameters: z.object({}),
708
- execute: async (params) => fetchOracle('/defi/staking-yields', params)
538
+ execute: async () => fetchOracle('/defi/staking-yields', {})
709
539
  });
710
540
 
711
541
  export const getDeFiLiquidations = tool({
712
542
  description: "Recent liquidation events and at-risk capital.",
713
543
  parameters: z.object({}),
714
- execute: async (params) => fetchOracle('/defi/liquidations', params)
544
+ execute: async () => fetchOracle('/defi/liquidations', {})
715
545
  });
716
546
 
717
547
  export const getDeFiHacks = tool({
@@ -719,13 +549,13 @@ export const getDeFiHacks = tool({
719
549
  parameters: z.object({
720
550
  days: z.number().int().describe("").optional()
721
551
  }),
722
- execute: async (params) => fetchOracle('/defi/hacks', params)
552
+ execute: async (args) => fetchOracle('/defi/hacks', args)
723
553
  });
724
554
 
725
555
  export const getBridgesTVL = tool({
726
556
  description: "Cross-chain bridge TVL and volume.",
727
557
  parameters: z.object({}),
728
- execute: async (params) => fetchOracle('/defi/bridges-tvl', params)
558
+ execute: async () => fetchOracle('/defi/bridges-tvl', {})
729
559
  });
730
560
 
731
561
  export const getDEXVolume = tool({
@@ -733,7 +563,7 @@ export const getDEXVolume = tool({
733
563
  parameters: z.object({
734
564
  chain: z.string().describe("").optional()
735
565
  }),
736
- execute: async (params) => fetchOracle('/defi/dex-volume', params)
566
+ execute: async (args) => fetchOracle('/defi/dex-volume', args)
737
567
  });
738
568
 
739
569
  export const getFundingRates = tool({
@@ -741,7 +571,7 @@ export const getFundingRates = tool({
741
571
  parameters: z.object({
742
572
  symbol: z.string().describe("").optional()
743
573
  }),
744
- execute: async (params) => fetchOracle('/derivatives/funding-rates', params)
574
+ execute: async (args) => fetchOracle('/derivatives/funding-rates', args)
745
575
  });
746
576
 
747
577
  export const getOpenInterest = tool({
@@ -749,7 +579,7 @@ export const getOpenInterest = tool({
749
579
  parameters: z.object({
750
580
  symbol: z.string().describe("")
751
581
  }),
752
- execute: async (params) => fetchOracle('/derivatives/open-interest', params)
582
+ execute: async (args) => fetchOracle('/derivatives/open-interest', args)
753
583
  });
754
584
 
755
585
  export const getLongShortRatio = tool({
@@ -757,7 +587,7 @@ export const getLongShortRatio = tool({
757
587
  parameters: z.object({
758
588
  symbol: z.string().describe("")
759
589
  }),
760
- execute: async (params) => fetchOracle('/derivatives/long-short-ratio', params)
590
+ execute: async (args) => fetchOracle('/derivatives/long-short-ratio', args)
761
591
  });
762
592
 
763
593
  export const getTopTraders = tool({
@@ -765,7 +595,7 @@ export const getTopTraders = tool({
765
595
  parameters: z.object({
766
596
  symbol: z.string().describe("")
767
597
  }),
768
- execute: async (params) => fetchOracle('/derivatives/top-traders', params)
598
+ execute: async (args) => fetchOracle('/derivatives/top-traders', args)
769
599
  });
770
600
 
771
601
  export const getDerivativesLiquidations = tool({
@@ -773,7 +603,7 @@ export const getDerivativesLiquidations = tool({
773
603
  parameters: z.object({
774
604
  symbol: z.string().describe("").optional()
775
605
  }),
776
- execute: async (params) => fetchOracle('/derivatives/liquidations', params)
606
+ execute: async (args) => fetchOracle('/derivatives/liquidations', args)
777
607
  });
778
608
 
779
609
  export const lookupTransaction = tool({
@@ -782,7 +612,7 @@ export const lookupTransaction = tool({
782
612
  hash: z.string().describe(""),
783
613
  chain: z.string().describe("").optional()
784
614
  }),
785
- execute: async (params) => fetchOracle('/chain/tx-lookup', params)
615
+ execute: async (args) => fetchOracle('/chain/tx-lookup', args)
786
616
  });
787
617
 
788
618
  export const getAddressBalance = tool({
@@ -791,7 +621,7 @@ export const getAddressBalance = tool({
791
621
  address: z.string().describe(""),
792
622
  chain: z.string().describe("").optional()
793
623
  }),
794
- execute: async (params) => fetchOracle('/chain/address-balance', params)
624
+ execute: async (args) => fetchOracle('/chain/address-balance', args)
795
625
  });
796
626
 
797
627
  export const getTokenBalances = tool({
@@ -800,7 +630,7 @@ export const getTokenBalances = tool({
800
630
  address: z.string().describe(""),
801
631
  chain: z.string().describe("").optional()
802
632
  }),
803
- execute: async (params) => fetchOracle('/chain/token-balances', params)
633
+ execute: async (args) => fetchOracle('/chain/token-balances', args)
804
634
  });
805
635
 
806
636
  export const checkContractVerified = tool({
@@ -809,7 +639,7 @@ export const checkContractVerified = tool({
809
639
  address: z.string().describe(""),
810
640
  chain: z.string().describe("").optional()
811
641
  }),
812
- execute: async (params) => fetchOracle('/chain/contract-verified', params)
642
+ execute: async (args) => fetchOracle('/chain/contract-verified', args)
813
643
  });
814
644
 
815
645
  export const getGasHistory = tool({
@@ -818,7 +648,7 @@ export const getGasHistory = tool({
818
648
  chain: z.string().describe("").optional(),
819
649
  blocks: z.number().int().describe("").optional()
820
650
  }),
821
- execute: async (params) => fetchOracle('/chain/gas-history', params)
651
+ execute: async (args) => fetchOracle('/chain/gas-history', args)
822
652
  });
823
653
 
824
654
  export const getBlockTime = tool({
@@ -827,13 +657,13 @@ export const getBlockTime = tool({
827
657
  block: z.string().describe(""),
828
658
  chain: z.string().describe("").optional()
829
659
  }),
830
- execute: async (params) => fetchOracle('/chain/block-time', params)
660
+ execute: async (args) => fetchOracle('/chain/block-time', args)
831
661
  });
832
662
 
833
663
  export const getActiveProposals = tool({
834
664
  description: "Currently active voting proposals from major DAOs via Snapshot.",
835
665
  parameters: z.object({}),
836
- execute: async (params) => fetchOracle('/governance/active-proposals', params)
666
+ execute: async () => fetchOracle('/governance/active-proposals', {})
837
667
  });
838
668
 
839
669
  export const getDAOProposals = tool({
@@ -841,7 +671,7 @@ export const getDAOProposals = tool({
841
671
  parameters: z.object({
842
672
  space: z.string().describe("")
843
673
  }),
844
- execute: async (params) => fetchOracle('/governance/dao-proposals', params)
674
+ execute: async (args) => fetchOracle('/governance/dao-proposals', args)
845
675
  });
846
676
 
847
677
  export const getVotingPower = tool({
@@ -850,13 +680,13 @@ export const getVotingPower = tool({
850
680
  space: z.string().describe(""),
851
681
  address: z.string().describe("")
852
682
  }),
853
- execute: async (params) => fetchOracle('/governance/voting-power', params)
683
+ execute: async (args) => fetchOracle('/governance/voting-power', args)
854
684
  });
855
685
 
856
686
  export const getRecentVotes = tool({
857
687
  description: "Recent voting events across DAOs.",
858
688
  parameters: z.object({}),
859
- execute: async (params) => fetchOracle('/governance/recent-votes', params)
689
+ execute: async () => fetchOracle('/governance/recent-votes', {})
860
690
  });
861
691
 
862
692
  export const getLensProfile = tool({
@@ -864,7 +694,7 @@ export const getLensProfile = tool({
864
694
  parameters: z.object({
865
695
  handle: z.string().describe("")
866
696
  }),
867
- execute: async (params) => fetchOracle('/identity/lens-profile', params)
697
+ execute: async (args) => fetchOracle('/identity/lens-profile', args)
868
698
  });
869
699
 
870
700
  export const getFarcasterProfile = tool({
@@ -872,7 +702,7 @@ export const getFarcasterProfile = tool({
872
702
  parameters: z.object({
873
703
  username: z.string().describe("")
874
704
  }),
875
- execute: async (params) => fetchOracle('/identity/farcaster-profile', params)
705
+ execute: async (args) => fetchOracle('/identity/farcaster-profile', args)
876
706
  });
877
707
 
878
708
  export const getENSRecords = tool({
@@ -880,7 +710,7 @@ export const getENSRecords = tool({
880
710
  parameters: z.object({
881
711
  name: z.string().describe("")
882
712
  }),
883
- execute: async (params) => fetchOracle('/identity/ens-records', params)
713
+ execute: async (args) => fetchOracle('/identity/ens-records', args)
884
714
  });
885
715
 
886
716
  export const getAddressLabels = tool({
@@ -888,7 +718,7 @@ export const getAddressLabels = tool({
888
718
  parameters: z.object({
889
719
  address: z.string().describe("")
890
720
  }),
891
- execute: async (params) => fetchOracle('/identity/address-labels', params)
721
+ execute: async (args) => fetchOracle('/identity/address-labels', args)
892
722
  });
893
723
 
894
724
  export const getPrice24hAgo = tool({
@@ -896,7 +726,7 @@ export const getPrice24hAgo = tool({
896
726
  parameters: z.object({
897
727
  id: z.string().describe("")
898
728
  }),
899
- execute: async (params) => fetchOracle('/history/price-24h/{id}', params)
729
+ execute: async (args) => fetchOracle('/history/price-24h/{id}', args)
900
730
  });
901
731
 
902
732
  export const getPrice7dAgo = tool({
@@ -904,7 +734,7 @@ export const getPrice7dAgo = tool({
904
734
  parameters: z.object({
905
735
  id: z.string().describe("")
906
736
  }),
907
- execute: async (params) => fetchOracle('/history/price-7d/{id}', params)
737
+ execute: async (args) => fetchOracle('/history/price-7d/{id}', args)
908
738
  });
909
739
 
910
740
  export const getPrice30dAgo = tool({
@@ -912,7 +742,7 @@ export const getPrice30dAgo = tool({
912
742
  parameters: z.object({
913
743
  id: z.string().describe("")
914
744
  }),
915
- execute: async (params) => fetchOracle('/history/price-30d/{id}', params)
745
+ execute: async (args) => fetchOracle('/history/price-30d/{id}', args)
916
746
  });
917
747
 
918
748
  export const getOHLC30d = tool({
@@ -920,7 +750,7 @@ export const getOHLC30d = tool({
920
750
  parameters: z.object({
921
751
  id: z.string().describe("")
922
752
  }),
923
- execute: async (params) => fetchOracle('/history/ohlc-30d/{id}', params)
753
+ execute: async (args) => fetchOracle('/history/ohlc-30d/{id}', args)
924
754
  });
925
755
 
926
756
  export const getVolume7d = tool({
@@ -928,43 +758,43 @@ export const getVolume7d = tool({
928
758
  parameters: z.object({
929
759
  id: z.string().describe("")
930
760
  }),
931
- execute: async (params) => fetchOracle('/history/volume-7d/{id}', params)
761
+ execute: async (args) => fetchOracle('/history/volume-7d/{id}', args)
932
762
  });
933
763
 
934
764
  export const getAgentRankings = tool({
935
765
  description: "PROPRIETARY: Ranked list of most-called endpoints.",
936
766
  parameters: z.object({}),
937
- execute: async (params) => fetchOracle('/meta/agent-rankings', params)
767
+ execute: async () => fetchOracle('/meta/agent-rankings', {})
938
768
  });
939
769
 
940
770
  export const getCategoryVelocity = tool({
941
771
  description: "PROPRIETARY: 7-day growth rate by category.",
942
772
  parameters: z.object({}),
943
- execute: async (params) => fetchOracle('/meta/category-velocity', params)
773
+ execute: async () => fetchOracle('/meta/category-velocity', {})
944
774
  });
945
775
 
946
776
  export const getCorrelationMatrix = tool({
947
777
  description: "PROPRIETARY: Which endpoints are queried together.",
948
778
  parameters: z.object({}),
949
- execute: async (params) => fetchOracle('/meta/correlation-matrix', params)
779
+ execute: async () => fetchOracle('/meta/correlation-matrix', {})
950
780
  });
951
781
 
952
782
  export const getHourlyVolume = tool({
953
783
  description: "PROPRIETARY: 24-hour volume by hour.",
954
784
  parameters: z.object({}),
955
- execute: async (params) => fetchOracle('/meta/hourly-volume', params)
785
+ execute: async () => fetchOracle('/meta/hourly-volume', {})
956
786
  });
957
787
 
958
788
  export const getErrorPatterns = tool({
959
789
  description: "PROPRIETARY: Common error patterns across the network.",
960
790
  parameters: z.object({}),
961
- execute: async (params) => fetchOracle('/meta/error-patterns', params)
791
+ execute: async () => fetchOracle('/meta/error-patterns', {})
962
792
  });
963
793
 
964
794
  export const getTopCallers = tool({
965
795
  description: "PROPRIETARY: Most active agent wallets.",
966
796
  parameters: z.object({}),
967
- execute: async (params) => fetchOracle('/meta/top-callers', params)
797
+ execute: async () => fetchOracle('/meta/top-callers', {})
968
798
  });
969
799
 
970
800
  export const getEntrySignal = tool({
@@ -972,7 +802,7 @@ export const getEntrySignal = tool({
972
802
  parameters: z.object({
973
803
  id: z.string().describe("Token ID (default: bitcoin)").optional()
974
804
  }),
975
- execute: async (params) => fetchOracle('/alpha/entry-signal', params)
805
+ execute: async (args) => fetchOracle('/alpha/entry-signal', args)
976
806
  });
977
807
 
978
808
  export const getExitSignal = tool({
@@ -980,7 +810,7 @@ export const getExitSignal = tool({
980
810
  parameters: z.object({
981
811
  id: z.string().describe("Token ID (default: bitcoin)").optional()
982
812
  }),
983
- execute: async (params) => fetchOracle('/alpha/exit-signal', params)
813
+ execute: async (args) => fetchOracle('/alpha/exit-signal', args)
984
814
  });
985
815
 
986
816
  export const getDipDetector = tool({
@@ -988,7 +818,7 @@ export const getDipDetector = tool({
988
818
  parameters: z.object({
989
819
  id: z.string().describe("Token ID (default: bitcoin)").optional()
990
820
  }),
991
- execute: async (params) => fetchOracle('/alpha/dip-detector', params)
821
+ execute: async (args) => fetchOracle('/alpha/dip-detector', args)
992
822
  });
993
823
 
994
824
  export const getMomentumScore = tool({
@@ -996,7 +826,7 @@ export const getMomentumScore = tool({
996
826
  parameters: z.object({
997
827
  id: z.string().describe("Token ID (default: bitcoin)").optional()
998
828
  }),
999
- execute: async (params) => fetchOracle('/alpha/momentum-score', params)
829
+ execute: async (args) => fetchOracle('/alpha/momentum-score', args)
1000
830
  });
1001
831
 
1002
832
  export const getVolatilityRegime = tool({
@@ -1004,11 +834,11 @@ export const getVolatilityRegime = tool({
1004
834
  parameters: z.object({
1005
835
  id: z.string().describe("Token ID (default: bitcoin)").optional()
1006
836
  }),
1007
- execute: async (params) => fetchOracle('/alpha/volatility-regime', params)
837
+ execute: async (args) => fetchOracle('/alpha/volatility-regime', args)
1008
838
  });
1009
839
 
1010
840
  export const getSmartMoneyFlow = tool({
1011
841
  description: "SYNTHETIC: Stablecoin vs BTC ratio as smart money indicator.",
1012
842
  parameters: z.object({}),
1013
- execute: async (params) => fetchOracle('/alpha/smart-money-flow', params)
843
+ execute: async () => fetchOracle('/alpha/smart-money-flow', {})
1014
844
  });