@axionquant/mcp 1.0.1 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +167 -110
  2. package/index.js +703 -843
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -40,19 +40,16 @@ async function makeApiRequest(endpoint, options = {}) {
40
40
  */
41
41
  function buildQueryString(params) {
42
42
  const filtered = Object.entries(params || {})
43
- .filter(([_, value]) => value !== undefined && value !== null && value !== '')
44
- .map(([key, value]) => `${key}=${encodeURIComponent(value)}`);
43
+ .filter(([_, value]) => value !== undefined && value !== null && value !== '')
44
+ .map(([key, value]) => `${key}=${encodeURIComponent(value)}`);
45
45
 
46
46
  return filtered.length > 0 ? `?${filtered.join('&')}` : '';
47
47
  }
48
48
 
49
- /**
50
- * Create the MCP server
51
- */
52
49
  const server = new Server(
53
50
  {
54
51
  name: "axion-financial-data",
55
- version: "1.0.0",
52
+ version: "2.0.0",
56
53
  },
57
54
  {
58
55
  capabilities: {
@@ -61,23 +58,19 @@ const server = new Server(
61
58
  }
62
59
  );
63
60
 
64
- /**
65
- * List all available tools
66
- */
67
61
  server.setRequestHandler(ListToolsRequestSchema, async () => {
68
62
  return {
69
63
  tools: [
64
+ // ---------- Credit ----------
70
65
  {
71
66
  name: "credit_search",
72
- description: "Search for credit entities by name, sector, country, or state",
67
+ description: "Search for credit entities by organization name",
73
68
  inputSchema: {
74
69
  type: "object",
75
70
  properties: {
76
- query: {
77
- type: "string",
78
- description: "Search query (organization name)"
79
- },
80
- }
71
+ query: { type: "string", description: "Organization name to search" }
72
+ },
73
+ required: ["query"]
81
74
  }
82
75
  },
83
76
  {
@@ -86,830 +79,824 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
86
79
  inputSchema: {
87
80
  type: "object",
88
81
  properties: {
89
- id: {
90
- type: "string",
91
- description: "Organization ID (from search results)"
92
- }
82
+ id: { type: "string", description: "Organization ID from search results" }
93
83
  },
94
84
  required: ["id"]
95
85
  }
96
86
  },
87
+
88
+ // ---------- ESG ----------
97
89
  {
98
- name: "econ_search",
99
- description: "Search for economic datasets (FRED)",
90
+ name: "esg_data",
91
+ description: "Get ESG scores for a specific ticker",
100
92
  inputSchema: {
101
93
  type: "object",
102
94
  properties: {
103
- query: {
104
- type: "string",
105
- description: "Search query for economic indicators"
106
- }
95
+ ticker: { type: "string", description: "Stock ticker (e.g., AAPL)" }
107
96
  },
108
- required: ["query"]
97
+ required: ["ticker"]
109
98
  }
110
99
  },
100
+
101
+ // ---------- ETF (note plural endpoints) ----------
111
102
  {
112
- name: "econ_dataset",
113
- description: "Get economic dataset time series data by ID",
103
+ name: "etf_fund",
104
+ description: "Get ETF fund information including ratings and metrics",
114
105
  inputSchema: {
115
106
  type: "object",
116
107
  properties: {
117
- id: {
118
- type: "string",
119
- description: "Dataset ID (from search results, e.g., 'PMAIZMTUSDM')"
120
- }
108
+ ticker: { type: "string", description: "ETF ticker (e.g., SPY)" }
121
109
  },
122
- required: ["id"]
110
+ required: ["ticker"]
123
111
  }
124
112
  },
125
113
  {
126
- name: "econ_calendar",
127
- description: "Get economic calendar events with filtering options",
128
- inputSchema: {
129
- type: "object",
130
- properties: {
131
- from: {
132
- type: "string",
133
- description: "Start date (YYYY-MM-DD)"
134
- },
135
- to: {
136
- type: "string",
137
- description: "End date (YYYY-MM-DD)"
138
- },
139
- country: {
140
- type: "string",
141
- description: "Country code or comma-separated list (e.g., 'US' or 'US,GB,JP')"
142
- },
143
- minImportance: {
144
- type: "integer",
145
- description: "Minimum importance level (0-3, where 3 is highest)",
146
- minimum: -1,
147
- maximum: 3
148
- },
149
- currency: {
150
- type: "string",
151
- description: "Currency code or comma-separated list (e.g., 'USD' or 'USD,EUR,GBP')"
152
- },
153
- category: {
154
- type: "string",
155
- description: "Category or comma-separated list (e.g., 'gov' or 'gov,infl')"
156
- }
157
- }
114
+ name: "etf_holdings",
115
+ description: "Get ETF top holdings with weights, shares, and market value",
116
+ inputSchema: {
117
+ type: "object",
118
+ properties: {
119
+ ticker: { type: "string", description: "ETF ticker (e.g., SPY)" }
120
+ },
121
+ required: ["ticker"]
158
122
  }
159
123
  },
160
124
  {
161
- name: "esg_data",
162
- description: "Get ESG (Environmental, Social, Governance) scores for a specific ticker",
125
+ name: "etf_exposure",
126
+ description: "Find which ETFs hold a specific stock ticker",
163
127
  inputSchema: {
164
128
  type: "object",
165
129
  properties: {
166
- ticker: {
167
- type: "string",
168
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
169
- }
130
+ ticker: { type: "string", description: "Stock ticker (e.g., AAPL)" }
170
131
  },
171
132
  required: ["ticker"]
172
133
  }
173
134
  },
135
+
136
+ // ---------- Supply Chain ----------
174
137
  {
175
- name: "etf_fund",
176
- description: "Get ETF fund information including ratings, metrics, and classification",
138
+ name: "supply_chain_customers",
139
+ description: "Get supply chain customers for a company",
177
140
  inputSchema: {
178
141
  type: "object",
179
142
  properties: {
180
- ticker: {
181
- type: "string",
182
- description: "ETF ticker symbol (e.g., 'SPY' for SPDR S&P 500 ETF Trust)"
183
- }
143
+ ticker: { type: "string", description: "Stock ticker" }
184
144
  },
185
145
  required: ["ticker"]
186
146
  }
187
147
  },
188
148
  {
189
- name: "etf_weights",
190
- description: "Get ETF sector and region allocation weights",
149
+ name: "supply_chain_peers",
150
+ description: "Get supply chain competitors for a company",
191
151
  inputSchema: {
192
152
  type: "object",
193
153
  properties: {
194
- ticker: {
195
- type: "string",
196
- description: "ETF ticker symbol (e.g., 'SPY' for SPDR S&P 500 ETF Trust)"
197
- }
154
+ ticker: { type: "string", description: "Stock ticker" }
198
155
  },
199
156
  required: ["ticker"]
200
157
  }
201
158
  },
202
159
  {
203
- name: "etf_holdings",
204
- description: "Get ETF top holdings including weight, shares, and market value",
160
+ name: "supply_chain_suppliers",
161
+ description: "Get supply chain suppliers for a company",
205
162
  inputSchema: {
206
163
  type: "object",
207
164
  properties: {
208
- ticker: {
209
- type: "string",
210
- description: "ETF ticker symbol (e.g., 'SPY' for SPDR S&P 500 ETF Trust)"
211
- }
165
+ ticker: { type: "string", description: "Stock ticker" }
212
166
  },
213
167
  required: ["ticker"]
214
168
  }
215
169
  },
170
+
171
+ // ---------- Stocks ----------
216
172
  {
217
- name: "etf_exposure",
218
- description: "Get which other ETFs hold a specific ticker (inverse exposure)",
173
+ name: "stocks_tickers",
174
+ description: "List stock tickers, optionally filtered by country or exchange",
219
175
  inputSchema: {
220
176
  type: "object",
221
177
  properties: {
222
- ticker: {
223
- type: "string",
224
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple) to find ETFs that hold it"
225
- }
178
+ country: { type: "string", description: "Filter by country (e.g., 'america')" },
179
+ exchange: { type: "string", description: "Filter by exchange (e.g., 'NASDAQ')" }
180
+ }
181
+ }
182
+ },
183
+ {
184
+ name: "stocks_quote",
185
+ description: "Get current details for a stock ticker",
186
+ inputSchema: {
187
+ type: "object",
188
+ properties: {
189
+ ticker: { type: "string", description: "Stock ticker (e.g., AAPL)" }
226
190
  },
227
191
  required: ["ticker"]
228
192
  }
229
193
  },
230
- // News tools
231
194
  {
232
- name: "news_ticker",
233
- description: "Get news for a specific company by ticker symbol",
195
+ name: "stocks_prices",
196
+ description: "Get historical price data for a stock",
234
197
  inputSchema: {
235
198
  type: "object",
236
199
  properties: {
237
- ticker: {
238
- type: "string",
239
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
240
- }
200
+ ticker: { type: "string", description: "Stock ticker" },
201
+ from: { type: "string", description: "Start date (YYYY-MM-DD)" },
202
+ to: { type: "string", description: "End date (YYYY-MM-DD)" },
203
+ frame: { type: "string", description: "Time frame (e.g., '1d', '1wk', '1mo')" }
241
204
  },
242
205
  required: ["ticker"]
243
206
  }
244
207
  },
208
+
209
+ // ---------- Crypto ----------
245
210
  {
246
- name: "news_country",
247
- description: "Get news for a specific country",
211
+ name: "crypto_tickers",
212
+ description: "List cryptocurrency tickers, optionally filtered by type",
213
+ inputSchema: {
214
+ type: "object",
215
+ properties: {
216
+ type: { type: "string", description: "Filter by type (e.g., 'spot')" }
217
+ }
218
+ }
219
+ },
220
+ {
221
+ name: "crypto_quote",
222
+ description: "Get current details for a cryptocurrency",
248
223
  inputSchema: {
249
224
  type: "object",
250
225
  properties: {
251
- country: {
252
- type: "string",
253
- description: "Country name or code (e.g., 'US', 'United States')"
254
- }
226
+ ticker: { type: "string", description: "Crypto ticker (e.g., BTC)" }
255
227
  },
256
- required: ["country"]
228
+ required: ["ticker"]
257
229
  }
258
230
  },
259
231
  {
260
- name: "news_category",
261
- description: "Get news for a specific category",
232
+ name: "crypto_prices",
233
+ description: "Get historical price data for a cryptocurrency",
262
234
  inputSchema: {
263
235
  type: "object",
264
236
  properties: {
265
- category: {
266
- type: "string",
267
- description: "News category (e.g., 'business', 'technology', 'politics')"
268
- }
237
+ ticker: { type: "string", description: "Crypto ticker" },
238
+ from: { type: "string", description: "Start date (YYYY-MM-DD)" },
239
+ to: { type: "string", description: "End date (YYYY-MM-DD)" },
240
+ frame: { type: "string", description: "Time frame (e.g., '1d', '1wk', '1mo')" }
269
241
  },
270
- required: ["category"]
242
+ required: ["ticker"]
271
243
  }
272
244
  },
245
+
246
+ // ---------- Forex ----------
273
247
  {
274
- name: "news_general",
275
- description: "Get general news headlines",
248
+ name: "forex_tickers",
249
+ description: "List forex tickers, optionally filtered by country or exchange",
276
250
  inputSchema: {
277
251
  type: "object",
278
- properties: {}
252
+ properties: {
253
+ country: { type: "string", description: "Country code (e.g., 'US', 'AE')" },
254
+ exchange: { type: "string", description: "Exchange (e.g., 'IDC')" }
255
+ }
279
256
  }
280
257
  },
281
- // Sentiment analysis tools
282
258
  {
283
- name: "sentiment_social",
284
- description: "Get social media sentiment for a specific ticker (from Google, Reddit, Twitter)",
259
+ name: "forex_quote",
260
+ description: "Get current details for a forex pair",
285
261
  inputSchema: {
286
262
  type: "object",
287
263
  properties: {
288
- ticker: {
289
- type: "string",
290
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
291
- }
264
+ ticker: { type: "string", description: "Forex ticker (e.g., EURUSD)" }
292
265
  },
293
266
  required: ["ticker"]
294
267
  }
295
268
  },
296
269
  {
297
- name: "sentiment_news",
298
- description: "Get news sentiment for a specific ticker",
270
+ name: "forex_prices",
271
+ description: "Get historical price data for a forex pair",
299
272
  inputSchema: {
300
273
  type: "object",
301
274
  properties: {
302
- ticker: {
303
- type: "string",
304
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
305
- }
275
+ ticker: { type: "string", description: "Forex ticker" },
276
+ from: { type: "string", description: "Start date (YYYY-MM-DD)" },
277
+ to: { type: "string", description: "End date (YYYY-MM-DD)" },
278
+ frame: { type: "string", description: "Time frame (e.g., '1d', '1wk', '1mo')" }
306
279
  },
307
280
  required: ["ticker"]
308
281
  }
309
282
  },
283
+
284
+ // ---------- Futures (renamed from 'future' to 'futures') ----------
310
285
  {
311
- name: "sentiment_analyst",
312
- description: "Get analyst/AI sentiment for a specific ticker",
286
+ name: "futures_tickers",
287
+ description: "List futures tickers, optionally filtered by exchange",
288
+ inputSchema: {
289
+ type: "object",
290
+ properties: {
291
+ exchange: { type: "string", description: "Exchange (e.g., 'CME', 'CMX')" }
292
+ }
293
+ }
294
+ },
295
+ {
296
+ name: "futures_quote",
297
+ description: "Get current details for a futures contract",
313
298
  inputSchema: {
314
299
  type: "object",
315
300
  properties: {
316
- ticker: {
317
- type: "string",
318
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
319
- }
301
+ ticker: { type: "string", description: "Futures ticker (e.g., 'ALI', 'M6A')" }
320
302
  },
321
303
  required: ["ticker"]
322
304
  }
323
305
  },
324
- // Supply chain tools
325
306
  {
326
- name: "supply_chain_customers",
327
- description: "Get supply chain customers for a specific company by ticker symbol",
307
+ name: "futures_prices",
308
+ description: "Get historical price data for a futures contract",
328
309
  inputSchema: {
329
310
  type: "object",
330
311
  properties: {
331
- ticker: {
332
- type: "string",
333
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
334
- }
312
+ ticker: { type: "string", description: "Futures ticker" },
313
+ from: { type: "string", description: "Start date (YYYY-MM-DD)" },
314
+ to: { type: "string", description: "End date (YYYY-MM-DD)" },
315
+ frame: { type: "string", description: "Time frame (e.g., '1d', '1wk', '1mo')" }
335
316
  },
336
317
  required: ["ticker"]
337
318
  }
338
319
  },
320
+
321
+ // ---------- Indices ----------
339
322
  {
340
- name: "supply_chain_peers",
341
- description: "Get supply chain peers (competitors) for a specific company by ticker symbol",
323
+ name: "indices_tickers",
324
+ description: "List index tickers, optionally filtered by exchange",
342
325
  inputSchema: {
343
326
  type: "object",
344
327
  properties: {
345
- ticker: {
346
- type: "string",
347
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
348
- }
328
+ exchange: { type: "string", description: "Exchange (e.g., 'ASX', 'AMS')" }
329
+ }
330
+ }
331
+ },
332
+ {
333
+ name: "indices_quote",
334
+ description: "Get current details for an index",
335
+ inputSchema: {
336
+ type: "object",
337
+ properties: {
338
+ ticker: { type: "string", description: "Index ticker (e.g., 'AXJO', 'AEX')" }
349
339
  },
350
340
  required: ["ticker"]
351
341
  }
352
342
  },
353
343
  {
354
- name: "supply_chain_suppliers",
355
- description: "Get supply chain suppliers for a specific company by ticker symbol",
344
+ name: "indices_prices",
345
+ description: "Get historical price data for an index",
356
346
  inputSchema: {
357
347
  type: "object",
358
348
  properties: {
359
- ticker: {
360
- type: "string",
361
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
362
- }
349
+ ticker: { type: "string", description: "Index ticker" },
350
+ from: { type: "string", description: "Start date (YYYY-MM-DD)" },
351
+ to: { type: "string", description: "End date (YYYY-MM-DD)" },
352
+ frame: { type: "string", description: "Time frame (e.g., '1d', '1wk', '1mo')" }
363
353
  },
364
354
  required: ["ticker"]
365
355
  }
366
356
  },
357
+
358
+ // ---------- Economics ----------
359
+ {
360
+ name: "econ_search",
361
+ description: "Search for economic datasets (FRED)",
362
+ inputSchema: {
363
+ type: "object",
364
+ properties: {
365
+ query: { type: "string", description: "Search query" }
366
+ },
367
+ required: ["query"]
368
+ }
369
+ },
367
370
  {
368
- name: "profiles_asset",
369
- description: "Get asset profile information for a specific ticker",
371
+ name: "econ_dataset",
372
+ description: "Get economic dataset time series by ID",
370
373
  inputSchema: {
371
374
  type: "object",
372
375
  properties: {
373
- ticker: {
374
- type: "string",
375
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
376
- }
376
+ id: { type: "string", description: "Dataset ID (e.g., 'PMAIZMTUSDM')" }
377
+ },
378
+ required: ["id"]
379
+ }
380
+ },
381
+ {
382
+ name: "econ_calendar",
383
+ description: "Get economic calendar events",
384
+ inputSchema: {
385
+ type: "object",
386
+ properties: {
387
+ from: { type: "string", description: "Start date (YYYY-MM-DD)" },
388
+ to: { type: "string", description: "End date (YYYY-MM-DD)" },
389
+ country: { type: "string", description: "Country code(s) comma-separated" },
390
+ minImportance: { type: "integer", minimum: -1, maximum: 3, description: "Minimum importance (0-3)" },
391
+ currency: { type: "string", description: "Currency code(s) comma-separated" },
392
+ category: { type: "string", description: "Category (e.g., 'gov', 'infl')" }
393
+ }
394
+ }
395
+ },
396
+
397
+ // ---------- News ----------
398
+ {
399
+ name: "news_general",
400
+ description: "Get general news headlines",
401
+ inputSchema: { type: "object", properties: {} }
402
+ },
403
+ {
404
+ name: "news_ticker",
405
+ description: "Get news for a specific company by ticker",
406
+ inputSchema: {
407
+ type: "object",
408
+ properties: {
409
+ ticker: { type: "string", description: "Stock ticker" }
377
410
  },
378
411
  required: ["ticker"]
379
412
  }
380
413
  },
381
414
  {
382
- name: "profiles_recommendation",
383
- description: "Get recommendation trend for a specific ticker",
415
+ name: "news_country",
416
+ description: "Get news for a specific country",
384
417
  inputSchema: {
385
418
  type: "object",
386
419
  properties: {
387
- ticker: {
388
- type: "string",
389
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
390
- }
420
+ country: { type: "string", description: "Country name or code" }
421
+ },
422
+ required: ["country"]
423
+ }
424
+ },
425
+ {
426
+ name: "news_category",
427
+ description: "Get news for a specific category",
428
+ inputSchema: {
429
+ type: "object",
430
+ properties: {
431
+ category: { type: "string", description: "Category (e.g., 'business', 'technology')" }
432
+ },
433
+ required: ["category"]
434
+ }
435
+ },
436
+
437
+ // ---------- Sentiment ----------
438
+ {
439
+ name: "sentiment_all",
440
+ description: "Get combined sentiment (social, news, analyst) for a ticker",
441
+ inputSchema: {
442
+ type: "object",
443
+ properties: {
444
+ ticker: { type: "string", description: "Stock ticker" }
391
445
  },
392
446
  required: ["ticker"]
393
447
  }
394
448
  },
395
449
  {
396
- name: "profiles_cashflow",
397
- description: "Get cash flow statement history for a specific ticker",
450
+ name: "sentiment_social",
451
+ description: "Get social media sentiment for a ticker",
398
452
  inputSchema: {
399
453
  type: "object",
400
454
  properties: {
401
- ticker: {
402
- type: "string",
403
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
404
- }
455
+ ticker: { type: "string", description: "Stock ticker" }
405
456
  },
406
457
  required: ["ticker"]
407
458
  }
408
459
  },
409
460
  {
410
- name: "profiles_trend_index",
411
- description: "Get index trend information for a specific ticker",
461
+ name: "sentiment_news",
462
+ description: "Get news sentiment for a ticker",
412
463
  inputSchema: {
413
464
  type: "object",
414
465
  properties: {
415
- ticker: {
416
- type: "string",
417
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
418
- }
466
+ ticker: { type: "string", description: "Stock ticker" }
419
467
  },
420
468
  required: ["ticker"]
421
469
  }
422
470
  },
423
471
  {
424
- name: "profiles_statistics",
425
- description: "Get default key statistics for a specific ticker",
472
+ name: "sentiment_analyst",
473
+ description: "Get analyst/AI sentiment for a ticker",
426
474
  inputSchema: {
427
475
  type: "object",
428
476
  properties: {
429
- ticker: {
430
- type: "string",
431
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
432
- }
477
+ ticker: { type: "string", description: "Stock ticker" }
433
478
  },
434
479
  required: ["ticker"]
435
480
  }
436
481
  },
482
+
483
+ // ---------- Profiles ----------
437
484
  {
438
- name: "profiles_income",
439
- description: "Get income statement history for a specific ticker",
485
+ name: "profiles_profile",
486
+ description: "Get full asset profile for a ticker",
440
487
  inputSchema: {
441
488
  type: "object",
442
489
  properties: {
443
- ticker: {
444
- type: "string",
445
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
446
- }
490
+ ticker: { type: "string", description: "Stock ticker" }
447
491
  },
448
492
  required: ["ticker"]
449
493
  }
450
494
  },
451
495
  {
452
- name: "profiles_fund",
453
- description: "Get fund ownership data for a specific ticker",
496
+ name: "profiles_recommendation",
497
+ description: "Get recommendation trend for a ticker",
454
498
  inputSchema: {
455
499
  type: "object",
456
500
  properties: {
457
- ticker: {
458
- type: "string",
459
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
460
- }
501
+ ticker: { type: "string", description: "Stock ticker" }
461
502
  },
462
503
  required: ["ticker"]
463
504
  }
464
505
  },
465
506
  {
466
- name: "profiles_summary",
467
- description: "Get summary detail information for a specific ticker",
507
+ name: "profiles_statistics",
508
+ description: "Get key statistics for a ticker",
468
509
  inputSchema: {
469
510
  type: "object",
470
511
  properties: {
471
- ticker: {
472
- type: "string",
473
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
474
- }
512
+ ticker: { type: "string", description: "Stock ticker" }
475
513
  },
476
514
  required: ["ticker"]
477
515
  }
478
516
  },
479
517
  {
480
- name: "profiles_insiders",
481
- description: "Get insider holders information for a specific ticker",
518
+ name: "profiles_summary",
519
+ description: "Get summary detail for a ticker",
482
520
  inputSchema: {
483
521
  type: "object",
484
522
  properties: {
485
- ticker: {
486
- type: "string",
487
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
488
- }
523
+ ticker: { type: "string", description: "Stock ticker" }
489
524
  },
490
525
  required: ["ticker"]
491
526
  }
492
527
  },
493
528
  {
494
529
  name: "profiles_calendar",
495
- description: "Get calendar events for a specific ticker",
530
+ description: "Get calendar events (earnings, dividends) for a ticker",
496
531
  inputSchema: {
497
532
  type: "object",
498
533
  properties: {
499
- ticker: {
500
- type: "string",
501
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
502
- }
534
+ ticker: { type: "string", description: "Stock ticker" }
503
535
  },
504
536
  required: ["ticker"]
505
537
  }
506
538
  },
507
539
  {
508
- name: "profiles_balancesheet",
509
- description: "Get balance sheet history for a specific ticker",
540
+ name: "profiles_info",
541
+ description: "Get company info / summary profile for a ticker",
510
542
  inputSchema: {
511
543
  type: "object",
512
544
  properties: {
513
- ticker: {
514
- type: "string",
515
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
516
- }
545
+ ticker: { type: "string", description: "Stock ticker" }
517
546
  },
518
547
  required: ["ticker"]
519
548
  }
520
549
  },
550
+
551
+ // ---------- Earnings ----------
521
552
  {
522
- name: "profiles_trend_earnings",
523
- description: "Get earnings trend for a specific ticker",
553
+ name: "earnings_history",
554
+ description: "Get earnings history for a ticker",
524
555
  inputSchema: {
525
556
  type: "object",
526
557
  properties: {
527
- ticker: {
528
- type: "string",
529
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
530
- }
558
+ ticker: { type: "string", description: "Stock ticker" }
531
559
  },
532
560
  required: ["ticker"]
533
561
  }
534
562
  },
535
563
  {
536
- name: "profiles_institution",
537
- description: "Get institution ownership data for a specific ticker",
564
+ name: "earnings_trend",
565
+ description: "Get earnings trend for a ticker",
538
566
  inputSchema: {
539
567
  type: "object",
540
568
  properties: {
541
- ticker: {
542
- type: "string",
543
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
544
- }
569
+ ticker: { type: "string", description: "Stock ticker" }
545
570
  },
546
571
  required: ["ticker"]
547
572
  }
548
573
  },
549
574
  {
550
- name: "profiles_ownership",
551
- description: "Get major holders breakdown for a specific ticker",
575
+ name: "earnings_index",
576
+ description: "Get index trend for a ticker",
552
577
  inputSchema: {
553
578
  type: "object",
554
579
  properties: {
555
- ticker: {
556
- type: "string",
557
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
558
- }
580
+ ticker: { type: "string", description: "Stock ticker" }
559
581
  },
560
582
  required: ["ticker"]
561
583
  }
562
584
  },
563
585
  {
564
- name: "profiles_earnings",
565
- description: "Get earnings history for a specific ticker",
586
+ name: "earnings_report",
587
+ description: "Get earnings report for a specific year and quarter",
566
588
  inputSchema: {
567
589
  type: "object",
568
590
  properties: {
569
- ticker: {
570
- type: "string",
571
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
572
- }
591
+ ticker: { type: "string", description: "Stock ticker" },
592
+ year: { type: "string", description: "Year (e.g., '2024')" },
593
+ quarter: { type: "string", description: "Quarter (e.g., 'Q1')" }
573
594
  },
574
- required: ["ticker"]
595
+ required: ["ticker", "year", "quarter"]
575
596
  }
576
597
  },
598
+
599
+ // ---------- Filings ----------
577
600
  {
578
- name: "profiles_info",
579
- description: "Get summary profile information for a specific ticker",
601
+ name: "filings_recent",
602
+ description: "Get recent SEC filings for a company",
580
603
  inputSchema: {
581
604
  type: "object",
582
605
  properties: {
583
- ticker: {
584
- type: "string",
585
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
586
- }
606
+ ticker: { type: "string", description: "Stock ticker" },
607
+ limit: { type: "integer", description: "Number of filings to return" },
608
+ form: { type: "string", description: "Filter by form type (e.g., '10-K')" }
587
609
  },
588
610
  required: ["ticker"]
589
611
  }
590
612
  },
591
613
  {
592
- name: "profiles_activity",
593
- description: "Get net share purchase activity for a specific ticker",
614
+ name: "filings_forms",
615
+ description: "Get specific SEC form type filings for a company",
594
616
  inputSchema: {
595
617
  type: "object",
596
618
  properties: {
597
- ticker: {
598
- type: "string",
599
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
600
- }
619
+ ticker: { type: "string", description: "Stock ticker" },
620
+ formType: { type: "string", description: "Form type (e.g., '10-K', '8-K')" },
621
+ year: { type: "string", description: "Filter by year" },
622
+ quarter: { type: "string", description: "Filter by quarter" },
623
+ limit: { type: "integer", description: "Number of filings to return" }
601
624
  },
602
- required: ["ticker"]
625
+ required: ["ticker", "formType"]
603
626
  }
604
627
  },
605
628
  {
606
- name: "profiles_transactions",
607
- description: "Get insider transactions for a specific ticker",
629
+ name: "filings_desc_forms",
630
+ description: "List available SEC form types and their descriptions",
631
+ inputSchema: { type: "object", properties: {} }
632
+ },
633
+ {
634
+ name: "filings_search",
635
+ description: "Search filings by year/quarter",
608
636
  inputSchema: {
609
637
  type: "object",
610
638
  properties: {
611
- ticker: {
612
- type: "string",
613
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
614
- }
639
+ year: { type: "string", description: "Year (e.g., '2024')" },
640
+ quarter: { type: "string", description: "Quarter (e.g., 'Q1')" },
641
+ form: { type: "string", description: "Form type filter" },
642
+ ticker: { type: "string", description: "Ticker filter" }
615
643
  },
616
- required: ["ticker"]
644
+ required: ["year", "quarter"]
617
645
  }
618
646
  },
647
+
648
+ // ---------- Financials ----------
619
649
  {
620
- name: "profiles_financials",
621
- description: "Get financial data for a specific ticker",
650
+ name: "financials_revenue",
651
+ description: "Get historical revenue for a ticker",
622
652
  inputSchema: {
623
653
  type: "object",
624
654
  properties: {
625
- ticker: {
626
- type: "string",
627
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
628
- }
655
+ ticker: { type: "string", description: "Stock ticker" },
656
+ periods: { type: "integer", description: "Number of periods to return" }
629
657
  },
630
658
  required: ["ticker"]
631
659
  }
632
660
  },
633
661
  {
634
- name: "profiles_traffic",
635
- description: "Get website traffic data for a specific ticker",
662
+ name: "financials_net_income",
663
+ description: "Get historical net income for a ticker",
636
664
  inputSchema: {
637
665
  type: "object",
638
666
  properties: {
639
- ticker: {
640
- type: "string",
641
- description: "Stock ticker symbol (e.g., 'AAPL' for Apple)"
642
- }
667
+ ticker: { type: "string", description: "Stock ticker" },
668
+ periods: { type: "integer", description: "Number of periods" }
643
669
  },
644
670
  required: ["ticker"]
645
671
  }
646
672
  },
647
-
648
673
  {
649
- name: "crypto_tickers",
650
- description: "Get list of cryptocurrency tickers, optionally filtered by type",
674
+ name: "financials_total_assets",
675
+ description: "Get historical total assets",
651
676
  inputSchema: {
652
677
  type: "object",
653
678
  properties: {
654
- type: {
655
- type: "string",
656
- description: "Filter by type (e.g., 'spot')"
657
- }
658
- }
679
+ ticker: { type: "string", description: "Stock ticker" },
680
+ periods: { type: "integer", description: "Number of periods" }
681
+ },
682
+ required: ["ticker"]
659
683
  }
660
684
  },
661
685
  {
662
- name: "crypto_ticker",
663
- description: "Get details for a specific cryptocurrency by ticker symbol",
686
+ name: "financials_total_liabilities",
687
+ description: "Get historical total liabilities",
664
688
  inputSchema: {
665
689
  type: "object",
666
690
  properties: {
667
- ticker: {
668
- type: "string",
669
- description: "Cryptocurrency ticker symbol (e.g., 'BTC', 'ETH')"
670
- }
691
+ ticker: { type: "string", description: "Stock ticker" },
692
+ periods: { type: "integer", description: "Number of periods" }
671
693
  },
672
694
  required: ["ticker"]
673
695
  }
674
696
  },
675
697
  {
676
- name: "crypto_prices",
677
- description: "Get historical price data for a cryptocurrency ticker",
698
+ name: "financials_stockholders_equity",
699
+ description: "Get historical stockholders equity",
678
700
  inputSchema: {
679
701
  type: "object",
680
702
  properties: {
681
- ticker: {
682
- type: "string",
683
- description: "Cryptocurrency ticker symbol (e.g., 'BTC', 'ETH')"
684
- }
703
+ ticker: { type: "string", description: "Stock ticker" },
704
+ periods: { type: "integer", description: "Number of periods" }
685
705
  },
686
706
  required: ["ticker"]
687
707
  }
688
708
  },
689
709
  {
690
- name: "forex_tickers",
691
- description: "Get list of forex tickers with optional filtering by country or exchange",
710
+ name: "financials_current_assets",
711
+ description: "Get historical current assets",
692
712
  inputSchema: {
693
713
  type: "object",
694
714
  properties: {
695
- country: {
696
- type: "string",
697
- description: "Filter by country code (e.g., 'US', 'AE')"
698
- },
699
- exchange: {
700
- type: "string",
701
- description: "Filter by exchange (e.g., 'IDC')"
702
- }
703
- }
715
+ ticker: { type: "string", description: "Stock ticker" },
716
+ periods: { type: "integer", description: "Number of periods" }
717
+ },
718
+ required: ["ticker"]
704
719
  }
705
720
  },
706
721
  {
707
- name: "forex_ticker",
708
- description: "Get details for a specific forex pair by ticker symbol",
722
+ name: "financials_current_liabilities",
723
+ description: "Get historical current liabilities",
709
724
  inputSchema: {
710
725
  type: "object",
711
726
  properties: {
712
- ticker: {
713
- type: "string",
714
- description: "Forex ticker symbol (e.g., 'AEDAUD', 'EURUSD')"
715
- }
727
+ ticker: { type: "string", description: "Stock ticker" },
728
+ periods: { type: "integer", description: "Number of periods" }
716
729
  },
717
730
  required: ["ticker"]
718
731
  }
719
732
  },
720
733
  {
721
- name: "forex_prices",
722
- description: "Get historical price data for a forex ticker",
734
+ name: "financials_operating_cash_flow",
735
+ description: "Get historical operating cash flow",
723
736
  inputSchema: {
724
737
  type: "object",
725
738
  properties: {
726
- ticker: {
727
- type: "string",
728
- description: "Forex ticker symbol (e.g., 'AEDAUD', 'EURUSD')"
729
- }
739
+ ticker: { type: "string", description: "Stock ticker" },
740
+ periods: { type: "integer", description: "Number of periods" }
730
741
  },
731
742
  required: ["ticker"]
732
743
  }
733
744
  },
734
745
  {
735
- name: "future_tickers",
736
- description: "Get list of futures tickers with optional filtering by exchange",
746
+ name: "financials_capital_expenditures",
747
+ description: "Get historical capital expenditures",
737
748
  inputSchema: {
738
749
  type: "object",
739
750
  properties: {
740
- exchange: {
741
- type: "string",
742
- description: "Filter by exchange (e.g., 'CME', 'CMX')"
743
- }
744
- }
751
+ ticker: { type: "string", description: "Stock ticker" },
752
+ periods: { type: "integer", description: "Number of periods" }
753
+ },
754
+ required: ["ticker"]
745
755
  }
746
756
  },
747
757
  {
748
- name: "future_ticker",
749
- description: "Get details for a specific futures contract by ticker symbol",
758
+ name: "financials_free_cash_flow",
759
+ description: "Get historical free cash flow",
750
760
  inputSchema: {
751
761
  type: "object",
752
762
  properties: {
753
- ticker: {
754
- type: "string",
755
- description: "Futures ticker symbol (e.g., 'ALI', 'M6A', 'BTC')"
756
- }
763
+ ticker: { type: "string", description: "Stock ticker" },
764
+ periods: { type: "integer", description: "Number of periods" }
757
765
  },
758
766
  required: ["ticker"]
759
767
  }
760
768
  },
761
769
  {
762
- name: "future_prices",
763
- description: "Get historical price data for a futures contract",
770
+ name: "financials_shares_outstanding_basic",
771
+ description: "Get historical basic shares outstanding",
764
772
  inputSchema: {
765
773
  type: "object",
766
774
  properties: {
767
- ticker: {
768
- type: "string",
769
- description: "Futures ticker symbol (e.g., 'ALI', 'M6A', 'BTC')"
770
- }
775
+ ticker: { type: "string", description: "Stock ticker" },
776
+ periods: { type: "integer", description: "Number of periods" }
771
777
  },
772
778
  required: ["ticker"]
773
779
  }
774
780
  },
775
781
  {
776
- name: "indices_tickers",
777
- description: "Get list of index tickers with optional filtering by exchange",
782
+ name: "financials_shares_outstanding_diluted",
783
+ description: "Get historical diluted shares outstanding",
778
784
  inputSchema: {
779
785
  type: "object",
780
786
  properties: {
781
- exchange: {
782
- type: "string",
783
- description: "Filter by exchange (e.g., 'ASX', 'AMS', 'VIE')"
784
- }
785
- }
787
+ ticker: { type: "string", description: "Stock ticker" },
788
+ periods: { type: "integer", description: "Number of periods" }
789
+ },
790
+ required: ["ticker"]
786
791
  }
787
792
  },
788
793
  {
789
- name: "indices_ticker",
790
- description: "Get details for a specific index by ticker symbol",
794
+ name: "financials_metrics",
795
+ description: "Get calculated financial metrics for a ticker",
791
796
  inputSchema: {
792
797
  type: "object",
793
798
  properties: {
794
- ticker: {
795
- type: "string",
796
- description: "Index ticker symbol (e.g., 'AXJO', 'AEX', 'ATX')"
797
- }
799
+ ticker: { type: "string", description: "Stock ticker" }
798
800
  },
799
801
  required: ["ticker"]
800
802
  }
801
803
  },
802
804
  {
803
- name: "indices_prices",
804
- description: "Get historical price data for an index",
805
+ name: "financials_snapshot",
806
+ description: "Get a snapshot of key financial data",
805
807
  inputSchema: {
806
808
  type: "object",
807
809
  properties: {
808
- ticker: {
809
- type: "string",
810
- description: "Index ticker symbol (e.g., 'AXJO', 'AEX', 'ATX')"
811
- }
810
+ ticker: { type: "string", description: "Stock ticker" }
812
811
  },
813
812
  required: ["ticker"]
814
813
  }
815
814
  },
816
815
 
816
+ // ---------- Insiders / Ownership ----------
817
817
  {
818
- name: "indices_tickers",
819
- description: "Get list of index tickers with optional filtering by exchange",
818
+ name: "insiders_funds",
819
+ description: "Get fund ownership data for a ticker",
820
820
  inputSchema: {
821
821
  type: "object",
822
822
  properties: {
823
- exchange: {
824
- type: "string",
825
- description: "Filter by exchange (e.g., 'ASX', 'AMS', 'VIE')"
826
- }
827
- }
823
+ ticker: { type: "string", description: "Stock ticker" }
824
+ },
825
+ required: ["ticker"]
828
826
  }
829
827
  },
830
828
  {
831
- name: "indices_ticker",
832
- description: "Get details for a specific index by ticker symbol",
829
+ name: "insiders_individuals",
830
+ description: "Get insider holders (individuals) for a ticker",
833
831
  inputSchema: {
834
832
  type: "object",
835
833
  properties: {
836
- ticker: {
837
- type: "string",
838
- description: "Index ticker symbol (e.g., 'AXJO', 'AEX', 'ATX')"
839
- }
834
+ ticker: { type: "string", description: "Stock ticker" }
840
835
  },
841
836
  required: ["ticker"]
842
837
  }
843
838
  },
844
839
  {
845
- name: "indices_prices",
846
- description: "Get historical price data for an index",
840
+ name: "insiders_institutions",
841
+ description: "Get institutional ownership data",
847
842
  inputSchema: {
848
843
  type: "object",
849
844
  properties: {
850
- ticker: {
851
- type: "string",
852
- description: "Index ticker symbol (e.g., 'AXJO', 'AEX', 'ATX')"
853
- }
845
+ ticker: { type: "string", description: "Stock ticker" }
854
846
  },
855
847
  required: ["ticker"]
856
848
  }
857
849
  },
858
-
859
850
  {
860
- name: "stocks_tickers",
861
- description: "Get list of stock tickers with optional filtering by country or exchange",
851
+ name: "insiders_ownership",
852
+ description: "Get major holders breakdown",
862
853
  inputSchema: {
863
854
  type: "object",
864
855
  properties: {
865
- country: {
866
- type: "string",
867
- description: "Filter by country (e.g., 'america')"
868
- },
869
- exchange: {
870
- type: "string",
871
- description: "Filter by exchange (e.g., 'NASDAQ', 'AMEX', 'OTC')"
872
- }
873
- }
856
+ ticker: { type: "string", description: "Stock ticker" }
857
+ },
858
+ required: ["ticker"]
874
859
  }
875
860
  },
876
861
  {
877
- name: "stocks_ticker",
878
- description: "Get details for a specific stock by ticker symbol",
862
+ name: "insiders_activity",
863
+ description: "Get net share purchase activity",
879
864
  inputSchema: {
880
865
  type: "object",
881
866
  properties: {
882
- ticker: {
883
- type: "string",
884
- description: "Stock ticker symbol (e.g., 'AAPL', 'MSFT', 'TSLA')"
885
- }
867
+ ticker: { type: "string", description: "Stock ticker" }
886
868
  },
887
869
  required: ["ticker"]
888
870
  }
889
871
  },
890
872
  {
891
- name: "stocks_prices",
892
- description: "Get historical price data for a stock",
873
+ name: "insiders_transactions",
874
+ description: "Get insider transactions",
893
875
  inputSchema: {
894
876
  type: "object",
895
877
  properties: {
896
- ticker: {
897
- type: "string",
898
- description: "Stock ticker symbol (e.g., 'AAPL', 'MSFT', 'TSLA')"
899
- }
878
+ ticker: { type: "string", description: "Stock ticker" }
900
879
  },
901
880
  required: ["ticker"]
902
881
  }
903
- }
904
-
882
+ },
905
883
 
884
+ // ---------- Web Traffic ----------
885
+ {
886
+ name: "webtraffic_traffic",
887
+ description: "Get website traffic data for a company",
888
+ inputSchema: {
889
+ type: "object",
890
+ properties: {
891
+ ticker: { type: "string", description: "Stock ticker" }
892
+ },
893
+ required: ["ticker"]
894
+ }
895
+ }
906
896
  ],
907
897
  };
908
898
  });
909
899
 
910
- /**
911
- * Handle tool execution
912
- */
913
900
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
914
901
  const { name, arguments: args } = request.params;
915
902
 
@@ -917,458 +904,331 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
917
904
  let result;
918
905
  let endpoint;
919
906
 
920
- switch (name) {
921
- case "credit_search":
922
- // Build query parameters for search
923
- const queryParams = buildQueryString({
924
- query: args.query,
925
- });
926
- endpoint = `credit/search${queryParams}`;
927
- result = await makeApiRequest(endpoint, { method: 'GET' });
928
- break;
929
-
930
- case "credit_ratings":
931
- if (!args.id) {
932
- throw new Error("Organization ID is required");
933
- }
934
- endpoint = `credit/ratings/${args.id}`;
935
- result = await makeApiRequest(endpoint, { method: 'GET' });
936
- break;
937
-
938
- case "econ_search":
939
- if (!args.query) {
940
- throw new Error("Search query is required");
941
- }
942
- endpoint = `econ/search${buildQueryString({ query: args.query })}`;
943
- result = await makeApiRequest(endpoint, { method: 'GET' });
944
- break;
945
-
946
- case "econ_dataset":
947
- if (!args.id) {
948
- throw new Error("Dataset ID is required");
949
- }
950
- endpoint = `econ/dataset/${args.id}`;
951
- result = await makeApiRequest(endpoint, { method: 'GET' });
952
- break;
953
-
954
- case "econ_calendar":
955
- endpoint = `econ/calendar${buildQueryString({
956
- from: args.from,
957
- to: args.to,
958
- country: args.country,
959
- minImportance: args.minImportance,
960
- currency: args.currency,
961
- category: args.category
962
- })}`;
963
- result = await makeApiRequest(endpoint, { method: 'GET' });
964
- break;
965
-
966
- case "esg_data":
967
- if (!args.ticker) {
968
- throw new Error("Ticker symbol is required");
969
- }
970
- endpoint = `esg/${args.ticker}`;
971
- result = await makeApiRequest(endpoint, { method: 'GET' });
972
- break;
973
-
974
- case "etf_fund":
975
- if (!args.ticker) {
976
- throw new Error("ETF ticker symbol is required");
977
- }
978
- endpoint = `etf/${args.ticker}/fund`;
979
- result = await makeApiRequest(endpoint, { method: 'GET' });
980
- break;
981
-
982
- case "etf_weights":
983
- if (!args.ticker) {
984
- throw new Error("ETF ticker symbol is required");
985
- }
986
- endpoint = `etf/${args.ticker}/weights`;
987
- result = await makeApiRequest(endpoint, { method: 'GET' });
988
- break;
989
-
990
- case "etf_holdings":
991
- if (!args.ticker) {
992
- throw new Error("ETF ticker symbol is required");
993
- }
994
- endpoint = `etf/${args.ticker}/holdings`;
995
- result = await makeApiRequest(endpoint, { method: 'GET' });
996
- break;
997
-
998
- case "etf_exposure":
999
- if (!args.ticker) {
1000
- throw new Error("Ticker symbol is required");
1001
- }
1002
- endpoint = `etf/${args.ticker}/exposure`;
1003
- result = await makeApiRequest(endpoint, { method: 'GET' });
1004
- break;
1005
-
1006
- // News handlers
1007
- case "news_ticker":
1008
- if (!args.ticker) {
1009
- throw new Error("Ticker symbol is required");
1010
- }
1011
- endpoint = `news/${args.ticker}`;
1012
- result = await makeApiRequest(endpoint, { method: 'GET' });
1013
- break;
1014
-
1015
- case "news_country":
1016
- if (!args.country) {
1017
- throw new Error("Country parameter is required");
1018
- }
1019
- endpoint = `news/country/${encodeURIComponent(args.country)}`;
1020
- result = await makeApiRequest(endpoint, { method: 'GET' });
1021
- break;
1022
-
1023
- case "news_category":
1024
- if (!args.category) {
1025
- throw new Error("Category parameter is required");
1026
- }
1027
- endpoint = `news/category/${encodeURIComponent(args.category)}`;
1028
- result = await makeApiRequest(endpoint, { method: 'GET' });
1029
- break;
1030
-
1031
- case "news_general":
1032
- endpoint = `news`;
1033
- result = await makeApiRequest(endpoint, { method: 'GET' });
1034
- break;
1035
-
1036
- // Sentiment analysis handlers
1037
- case "sentiment_social":
1038
- if (!args.ticker) {
1039
- throw new Error("Ticker symbol is required");
1040
- }
1041
- endpoint = `sentiment/${args.ticker}/social`;
1042
- result = await makeApiRequest(endpoint, { method: 'GET' });
1043
- break;
1044
-
1045
- case "sentiment_news":
1046
- if (!args.ticker) {
1047
- throw new Error("Ticker symbol is required");
1048
- }
1049
- endpoint = `sentiment/${args.ticker}/news`;
1050
- result = await makeApiRequest(endpoint, { method: 'GET' });
1051
- break;
1052
-
1053
- case "sentiment_analyst":
1054
- if (!args.ticker) {
1055
- throw new Error("Ticker symbol is required");
1056
- }
1057
- endpoint = `sentiment/${args.ticker}/analyst`;
1058
- result = await makeApiRequest(endpoint, { method: 'GET' });
1059
- break;
1060
-
1061
- // Supply chain handlers
1062
- case "supply_chain_customers":
1063
- if (!args.ticker) {
1064
- throw new Error("Ticker symbol is required");
1065
- }
1066
- endpoint = `supply-chain/${args.ticker}/customers`;
1067
- result = await makeApiRequest(endpoint, { method: 'GET' });
1068
- break;
1069
-
1070
- case "supply_chain_peers":
1071
- if (!args.ticker) {
1072
- throw new Error("Ticker symbol is required");
1073
- }
1074
- endpoint = `supply-chain/${args.ticker}/peers`;
1075
- result = await makeApiRequest(endpoint, { method: 'GET' });
1076
- break;
1077
-
1078
- case "supply_chain_suppliers":
1079
- if (!args.ticker) {
1080
- throw new Error("Ticker symbol is required");
1081
- }
1082
- endpoint = `supply-chain/${args.ticker}/suppliers`;
1083
- result = await makeApiRequest(endpoint, { method: 'GET' });
1084
- break;
1085
-
1086
- case "profiles_asset":
1087
- if (!args.ticker) {
1088
- throw new Error("Ticker symbol is required");
1089
- }
1090
- endpoint = `profiles/${args.ticker}/asset`;
1091
- result = await makeApiRequest(endpoint, { method: 'GET' });
1092
- break;
1093
-
1094
- case "profiles_recommendation":
1095
- if (!args.ticker) {
1096
- throw new Error("Ticker symbol is required");
1097
- }
1098
- endpoint = `profiles/${args.ticker}/recommendation`;
1099
- result = await makeApiRequest(endpoint, { method: 'GET' });
1100
- break;
1101
-
1102
- case "profiles_cashflow":
1103
- if (!args.ticker) {
1104
- throw new Error("Ticker symbol is required");
1105
- }
1106
- endpoint = `profiles/${args.ticker}/cashflow`;
1107
- result = await makeApiRequest(endpoint, { method: 'GET' });
1108
- break;
1109
-
1110
- case "profiles_trend_index":
1111
- if (!args.ticker) {
1112
- throw new Error("Ticker symbol is required");
1113
- }
1114
- endpoint = `profiles/${args.ticker}/trend/index`;
1115
- result = await makeApiRequest(endpoint, { method: 'GET' });
1116
- break;
1117
-
1118
- case "profiles_statistics":
1119
- if (!args.ticker) {
1120
- throw new Error("Ticker symbol is required");
1121
- }
1122
- endpoint = `profiles/${args.ticker}/statistics`;
1123
- result = await makeApiRequest(endpoint, { method: 'GET' });
1124
- break;
1125
-
1126
- case "profiles_income":
1127
- if (!args.ticker) {
1128
- throw new Error("Ticker symbol is required");
1129
- }
1130
- endpoint = `profiles/${args.ticker}/income`;
1131
- result = await makeApiRequest(endpoint, { method: 'GET' });
1132
- break;
1133
-
1134
- case "profiles_fund":
1135
- if (!args.ticker) {
1136
- throw new Error("Ticker symbol is required");
1137
- }
1138
- endpoint = `profiles/${args.ticker}/fund`;
1139
- result = await makeApiRequest(endpoint, { method: 'GET' });
1140
- break;
1141
-
1142
- case "profiles_summary":
1143
- if (!args.ticker) {
1144
- throw new Error("Ticker symbol is required");
1145
- }
1146
- endpoint = `profiles/${args.ticker}/summary`;
1147
- result = await makeApiRequest(endpoint, { method: 'GET' });
1148
- break;
1149
-
1150
- case "profiles_insiders":
1151
- if (!args.ticker) {
1152
- throw new Error("Ticker symbol is required");
1153
- }
1154
- endpoint = `profiles/${args.ticker}/insiders`;
1155
- result = await makeApiRequest(endpoint, { method: 'GET' });
1156
- break;
1157
-
1158
- case "profiles_calendar":
1159
- if (!args.ticker) {
1160
- throw new Error("Ticker symbol is required");
1161
- }
1162
- endpoint = `profiles/${args.ticker}/calendar`;
1163
- result = await makeApiRequest(endpoint, { method: 'GET' });
1164
- break;
1165
-
1166
- case "profiles_balancesheet":
1167
- if (!args.ticker) {
1168
- throw new Error("Ticker symbol is required");
1169
- }
1170
- endpoint = `profiles/${args.ticker}/balancesheet`;
1171
- result = await makeApiRequest(endpoint, { method: 'GET' });
1172
- break;
1173
-
1174
- case "profiles_trend_earnings":
1175
- if (!args.ticker) {
1176
- throw new Error("Ticker symbol is required");
1177
- }
1178
- endpoint = `profiles/${args.ticker}/trend/earnings`;
1179
- result = await makeApiRequest(endpoint, { method: 'GET' });
1180
- break;
1181
-
1182
- case "profiles_institution":
1183
- if (!args.ticker) {
1184
- throw new Error("Ticker symbol is required");
1185
- }
1186
- endpoint = `profiles/${args.ticker}/institution`;
1187
- result = await makeApiRequest(endpoint, { method: 'GET' });
1188
- break;
1189
-
1190
- case "profiles_ownership":
1191
- if (!args.ticker) {
1192
- throw new Error("Ticker symbol is required");
1193
- }
1194
- endpoint = `profiles/${args.ticker}/ownership`;
1195
- result = await makeApiRequest(endpoint, { method: 'GET' });
1196
- break;
1197
-
1198
- case "profiles_earnings":
1199
- if (!args.ticker) {
1200
- throw new Error("Ticker symbol is required");
1201
- }
1202
- endpoint = `profiles/${args.ticker}/earnings`;
1203
- result = await makeApiRequest(endpoint, { method: 'GET' });
1204
- break;
1205
-
1206
- case "profiles_info":
1207
- if (!args.ticker) {
1208
- throw new Error("Ticker symbol is required");
1209
- }
1210
- endpoint = `profiles/${args.ticker}/info`;
1211
- result = await makeApiRequest(endpoint, { method: 'GET' });
1212
- break;
1213
-
1214
- case "profiles_activity":
1215
- if (!args.ticker) {
1216
- throw new Error("Ticker symbol is required");
1217
- }
1218
- endpoint = `profiles/${args.ticker}/activity`;
1219
- result = await makeApiRequest(endpoint, { method: 'GET' });
1220
- break;
1221
-
1222
- case "profiles_transactions":
1223
- if (!args.ticker) {
1224
- throw new Error("Ticker symbol is required");
1225
- }
1226
- endpoint = `profiles/${args.ticker}/transactions`;
1227
- result = await makeApiRequest(endpoint, { method: 'GET' });
1228
- break;
1229
-
1230
- case "profiles_financials":
1231
- if (!args.ticker) {
1232
- throw new Error("Ticker symbol is required");
1233
- }
1234
- endpoint = `profiles/${args.ticker}/financials`;
1235
- result = await makeApiRequest(endpoint, { method: 'GET' });
1236
- break;
1237
-
1238
- case "profiles_traffic":
1239
- if (!args.ticker) {
1240
- throw new Error("Ticker symbol is required");
1241
- }
1242
- endpoint = `profiles/${args.ticker}/traffic`;
1243
- result = await makeApiRequest(endpoint, { method: 'GET' });
1244
- break;
907
+ // ---------- Credit ----------
908
+ if (name === "credit_search") {
909
+ endpoint = `credit/search${buildQueryString({ query: args.query })}`;
910
+ result = await makeApiRequest(endpoint, { method: 'GET' });
911
+ }
912
+ else if (name === "credit_ratings") {
913
+ endpoint = `credit/ratings/${args.id}`;
914
+ result = await makeApiRequest(endpoint, { method: 'GET' });
915
+ }
1245
916
 
917
+ // ---------- ESG ----------
918
+ else if (name === "esg_data") {
919
+ endpoint = `esg/${args.ticker}`;
920
+ result = await makeApiRequest(endpoint, { method: 'GET' });
921
+ }
1246
922
 
1247
- // Crypto handlers
1248
- case "crypto_tickers":
1249
- endpoint = `crypto/tickers${buildQueryString({
1250
- type: args.type
1251
- })}`;
1252
- result = await makeApiRequest(endpoint, { method: 'GET' });
1253
- break;
923
+ // ---------- ETF (plural endpoints) ----------
924
+ else if (name === "etf_fund") {
925
+ endpoint = `etfs/${args.ticker}/fund`;
926
+ result = await makeApiRequest(endpoint, { method: 'GET' });
927
+ }
928
+ else if (name === "etf_holdings") {
929
+ endpoint = `etfs/${args.ticker}/holdings`;
930
+ result = await makeApiRequest(endpoint, { method: 'GET' });
931
+ }
932
+ else if (name === "etf_exposure") {
933
+ endpoint = `etfs/${args.ticker}/exposure`;
934
+ result = await makeApiRequest(endpoint, { method: 'GET' });
935
+ }
1254
936
 
1255
- case "crypto_ticker":
1256
- if (!args.ticker) {
1257
- throw new Error("Cryptocurrency ticker symbol is required");
1258
- }
1259
- endpoint = `crypto/${args.ticker}`;
1260
- result = await makeApiRequest(endpoint, { method: 'GET' });
1261
- break;
937
+ // ---------- Supply Chain ----------
938
+ else if (name === "supply_chain_customers") {
939
+ endpoint = `supply-chain/${args.ticker}/customers`;
940
+ result = await makeApiRequest(endpoint, { method: 'GET' });
941
+ }
942
+ else if (name === "supply_chain_peers") {
943
+ endpoint = `supply-chain/${args.ticker}/peers`;
944
+ result = await makeApiRequest(endpoint, { method: 'GET' });
945
+ }
946
+ else if (name === "supply_chain_suppliers") {
947
+ endpoint = `supply-chain/${args.ticker}/suppliers`;
948
+ result = await makeApiRequest(endpoint, { method: 'GET' });
949
+ }
1262
950
 
1263
- case "crypto_prices":
1264
- if (!args.ticker) {
1265
- throw new Error("Cryptocurrency ticker symbol is required");
1266
- }
1267
- endpoint = `crypto/${args.ticker}/prices`;
1268
- result = await makeApiRequest(endpoint, { method: 'GET' });
1269
- break;
951
+ // ---------- Stocks ----------
952
+ else if (name === "stocks_tickers") {
953
+ endpoint = `stocks/tickers${buildQueryString({ country: args.country, exchange: args.exchange })}`;
954
+ result = await makeApiRequest(endpoint, { method: 'GET' });
955
+ }
956
+ else if (name === "stocks_quote") {
957
+ endpoint = `stocks/${args.ticker}`;
958
+ result = await makeApiRequest(endpoint, { method: 'GET' });
959
+ }
960
+ else if (name === "stocks_prices") {
961
+ endpoint = `stocks/${args.ticker}/prices${buildQueryString({ from: args.from, to: args.to, frame: args.frame })}`;
962
+ result = await makeApiRequest(endpoint, { method: 'GET' });
963
+ }
1270
964
 
1271
- // Forex handlers
1272
- case "forex_tickers":
1273
- endpoint = `forex/tickers${buildQueryString({
1274
- country: args.country,
1275
- exchange: args.exchange
1276
- })}`;
1277
- result = await makeApiRequest(endpoint, { method: 'GET' });
1278
- break;
965
+ // ---------- Crypto ----------
966
+ else if (name === "crypto_tickers") {
967
+ endpoint = `crypto/tickers${buildQueryString({ type: args.type })}`;
968
+ result = await makeApiRequest(endpoint, { method: 'GET' });
969
+ }
970
+ else if (name === "crypto_quote") {
971
+ endpoint = `crypto/${args.ticker}`;
972
+ result = await makeApiRequest(endpoint, { method: 'GET' });
973
+ }
974
+ else if (name === "crypto_prices") {
975
+ endpoint = `crypto/${args.ticker}/prices${buildQueryString({ from: args.from, to: args.to, frame: args.frame })}`;
976
+ result = await makeApiRequest(endpoint, { method: 'GET' });
977
+ }
1279
978
 
1280
- case "forex_ticker":
1281
- if (!args.ticker) {
1282
- throw new Error("Forex ticker symbol is required");
1283
- }
1284
- endpoint = `forex/${args.ticker}`;
1285
- result = await makeApiRequest(endpoint, { method: 'GET' });
1286
- break;
979
+ // ---------- Forex ----------
980
+ else if (name === "forex_tickers") {
981
+ endpoint = `forex/tickers${buildQueryString({ country: args.country, exchange: args.exchange })}`;
982
+ result = await makeApiRequest(endpoint, { method: 'GET' });
983
+ }
984
+ else if (name === "forex_quote") {
985
+ endpoint = `forex/${args.ticker}`;
986
+ result = await makeApiRequest(endpoint, { method: 'GET' });
987
+ }
988
+ else if (name === "forex_prices") {
989
+ endpoint = `forex/${args.ticker}/prices${buildQueryString({ from: args.from, to: args.to, frame: args.frame })}`;
990
+ result = await makeApiRequest(endpoint, { method: 'GET' });
991
+ }
1287
992
 
1288
- case "forex_prices":
1289
- if (!args.ticker) {
1290
- throw new Error("Forex ticker symbol is required");
1291
- }
1292
- endpoint = `forex/${args.ticker}/prices`;
1293
- result = await makeApiRequest(endpoint, { method: 'GET' });
1294
- break;
993
+ // ---------- Futures ----------
994
+ else if (name === "futures_tickers") {
995
+ endpoint = `futures/tickers${buildQueryString({ exchange: args.exchange })}`;
996
+ result = await makeApiRequest(endpoint, { method: 'GET' });
997
+ }
998
+ else if (name === "futures_quote") {
999
+ endpoint = `futures/${args.ticker}`;
1000
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1001
+ }
1002
+ else if (name === "futures_prices") {
1003
+ endpoint = `futures/${args.ticker}/prices${buildQueryString({ from: args.from, to: args.to, frame: args.frame })}`;
1004
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1005
+ }
1295
1006
 
1296
- // Futures handlers
1297
- case "future_tickers":
1298
- endpoint = `future/tickers${buildQueryString({
1299
- exchange: args.exchange
1300
- })}`;
1301
- result = await makeApiRequest(endpoint, { method: 'GET' });
1302
- break;
1007
+ // ---------- Indices ----------
1008
+ else if (name === "indices_tickers") {
1009
+ endpoint = `indices/tickers${buildQueryString({ exchange: args.exchange })}`;
1010
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1011
+ }
1012
+ else if (name === "indices_quote") {
1013
+ endpoint = `indices/${args.ticker}`;
1014
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1015
+ }
1016
+ else if (name === "indices_prices") {
1017
+ endpoint = `indices/${args.ticker}/prices${buildQueryString({ from: args.from, to: args.to, frame: args.frame })}`;
1018
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1019
+ }
1303
1020
 
1304
- case "future_ticker":
1305
- if (!args.ticker) {
1306
- throw new Error("Futures ticker symbol is required");
1307
- }
1308
- endpoint = `future/${args.ticker}`;
1309
- result = await makeApiRequest(endpoint, { method: 'GET' });
1310
- break;
1021
+ // ---------- Economics ----------
1022
+ else if (name === "econ_search") {
1023
+ endpoint = `econ/search${buildQueryString({ query: args.query })}`;
1024
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1025
+ }
1026
+ else if (name === "econ_dataset") {
1027
+ endpoint = `econ/dataset/${args.id}`;
1028
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1029
+ }
1030
+ else if (name === "econ_calendar") {
1031
+ endpoint = `econ/calendar${buildQueryString({
1032
+ from: args.from,
1033
+ to: args.to,
1034
+ country: args.country,
1035
+ minImportance: args.minImportance,
1036
+ currency: args.currency,
1037
+ category: args.category
1038
+ })}`;
1039
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1040
+ }
1311
1041
 
1312
- case "future_prices":
1313
- if (!args.ticker) {
1314
- throw new Error("Futures ticker symbol is required");
1315
- }
1316
- endpoint = `future/${args.ticker}/prices`;
1317
- result = await makeApiRequest(endpoint, { method: 'GET' });
1318
- break;
1042
+ // ---------- News ----------
1043
+ else if (name === "news_general") {
1044
+ endpoint = `news`;
1045
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1046
+ }
1047
+ else if (name === "news_ticker") {
1048
+ endpoint = `news/${args.ticker}`;
1049
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1050
+ }
1051
+ else if (name === "news_country") {
1052
+ endpoint = `news/country/${encodeURIComponent(args.country)}`;
1053
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1054
+ }
1055
+ else if (name === "news_category") {
1056
+ endpoint = `news/category/${encodeURIComponent(args.category)}`;
1057
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1058
+ }
1319
1059
 
1320
- // Indices handlers
1321
- case "indices_tickers":
1322
- endpoint = `indices/tickers${buildQueryString({
1323
- exchange: args.exchange
1324
- })}`;
1325
- result = await makeApiRequest(endpoint, { method: 'GET' });
1326
- break;
1060
+ // ---------- Sentiment ----------
1061
+ else if (name === "sentiment_all") {
1062
+ endpoint = `sentiment/${args.ticker}/all`;
1063
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1064
+ }
1065
+ else if (name === "sentiment_social") {
1066
+ endpoint = `sentiment/${args.ticker}/social`;
1067
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1068
+ }
1069
+ else if (name === "sentiment_news") {
1070
+ endpoint = `sentiment/${args.ticker}/news`;
1071
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1072
+ }
1073
+ else if (name === "sentiment_analyst") {
1074
+ endpoint = `sentiment/${args.ticker}/analyst`;
1075
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1076
+ }
1327
1077
 
1328
- case "indices_ticker":
1329
- if (!args.ticker) {
1330
- throw new Error("Index ticker symbol is required");
1331
- }
1332
- endpoint = `indices/${args.ticker}`;
1333
- result = await makeApiRequest(endpoint, { method: 'GET' });
1334
- break;
1078
+ // ---------- Profiles ----------
1079
+ else if (name === "profiles_profile") {
1080
+ endpoint = `profiles/${args.ticker}`;
1081
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1082
+ }
1083
+ else if (name === "profiles_recommendation") {
1084
+ endpoint = `profiles/${args.ticker}/recommendation`;
1085
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1086
+ }
1087
+ else if (name === "profiles_statistics") {
1088
+ endpoint = `profiles/${args.ticker}/statistics`;
1089
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1090
+ }
1091
+ else if (name === "profiles_summary") {
1092
+ endpoint = `profiles/${args.ticker}/summary`;
1093
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1094
+ }
1095
+ else if (name === "profiles_calendar") {
1096
+ endpoint = `profiles/${args.ticker}/calendar`;
1097
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1098
+ }
1099
+ else if (name === "profiles_info") {
1100
+ endpoint = `profiles/${args.ticker}/info`;
1101
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1102
+ }
1335
1103
 
1336
- case "indices_prices":
1337
- if (!args.ticker) {
1338
- throw new Error("Index ticker symbol is required");
1339
- }
1340
- endpoint = `indices/${args.ticker}/prices`;
1341
- result = await makeApiRequest(endpoint, { method: 'GET' });
1342
- break;
1104
+ // ---------- Earnings ----------
1105
+ else if (name === "earnings_history") {
1106
+ endpoint = `earnings/${args.ticker}/history`;
1107
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1108
+ }
1109
+ else if (name === "earnings_trend") {
1110
+ endpoint = `earnings/${args.ticker}/trend`;
1111
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1112
+ }
1113
+ else if (name === "earnings_index") {
1114
+ endpoint = `earnings/${args.ticker}/index`;
1115
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1116
+ }
1117
+ else if (name === "earnings_report") {
1118
+ endpoint = `earnings/${args.ticker}/report${buildQueryString({ year: args.year, quarter: args.quarter })}`;
1119
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1120
+ }
1343
1121
 
1122
+ // ---------- Filings ----------
1123
+ else if (name === "filings_recent") {
1124
+ endpoint = `filings/${args.ticker}${buildQueryString({ limit: args.limit, form: args.form })}`;
1125
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1126
+ }
1127
+ else if (name === "filings_forms") {
1128
+ endpoint = `filings/${args.ticker}/forms/${args.formType}${buildQueryString({ year: args.year, quarter: args.quarter, limit: args.limit })}`;
1129
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1130
+ }
1131
+ else if (name === "filings_desc_forms") {
1132
+ endpoint = `filings/desc/forms`;
1133
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1134
+ }
1135
+ else if (name === "filings_search") {
1136
+ endpoint = `filings/search${buildQueryString({ year: args.year, quarter: args.quarter, form: args.form, ticker: args.ticker })}`;
1137
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1138
+ }
1344
1139
 
1345
- // Stocks handlers
1346
- case "stocks_tickers":
1347
- endpoint = `stocks/tickers${buildQueryString({
1348
- country: args.country,
1349
- exchange: args.exchange
1350
- })}`;
1351
- result = await makeApiRequest(endpoint, { method: 'GET' });
1352
- break;
1140
+ // ---------- Financials ----------
1141
+ else if (name === "financials_revenue") {
1142
+ endpoint = `financials/${args.ticker}/revenue${buildQueryString({ periods: args.periods })}`;
1143
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1144
+ }
1145
+ else if (name === "financials_net_income") {
1146
+ endpoint = `financials/${args.ticker}/netincome${buildQueryString({ periods: args.periods })}`;
1147
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1148
+ }
1149
+ else if (name === "financials_total_assets") {
1150
+ endpoint = `financials/${args.ticker}/total/assets${buildQueryString({ periods: args.periods })}`;
1151
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1152
+ }
1153
+ else if (name === "financials_total_liabilities") {
1154
+ endpoint = `financials/${args.ticker}/total/liabilities${buildQueryString({ periods: args.periods })}`;
1155
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1156
+ }
1157
+ else if (name === "financials_stockholders_equity") {
1158
+ endpoint = `financials/${args.ticker}/stockholdersequity${buildQueryString({ periods: args.periods })}`;
1159
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1160
+ }
1161
+ else if (name === "financials_current_assets") {
1162
+ endpoint = `financials/${args.ticker}/current/assets${buildQueryString({ periods: args.periods })}`;
1163
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1164
+ }
1165
+ else if (name === "financials_current_liabilities") {
1166
+ endpoint = `financials/${args.ticker}/current/liabilities${buildQueryString({ periods: args.periods })}`;
1167
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1168
+ }
1169
+ else if (name === "financials_operating_cash_flow") {
1170
+ endpoint = `financials/${args.ticker}/cashflow/operating${buildQueryString({ periods: args.periods })}`;
1171
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1172
+ }
1173
+ else if (name === "financials_capital_expenditures") {
1174
+ endpoint = `financials/${args.ticker}/capitalexpenditures${buildQueryString({ periods: args.periods })}`;
1175
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1176
+ }
1177
+ else if (name === "financials_free_cash_flow") {
1178
+ endpoint = `financials/${args.ticker}/cashflow/free${buildQueryString({ periods: args.periods })}`;
1179
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1180
+ }
1181
+ else if (name === "financials_shares_outstanding_basic") {
1182
+ endpoint = `financials/${args.ticker}/sharesoutstanding/basic${buildQueryString({ periods: args.periods })}`;
1183
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1184
+ }
1185
+ else if (name === "financials_shares_outstanding_diluted") {
1186
+ endpoint = `financials/${args.ticker}/sharesoutstanding/diluted${buildQueryString({ periods: args.periods })}`;
1187
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1188
+ }
1189
+ else if (name === "financials_metrics") {
1190
+ endpoint = `financials/${args.ticker}/metrics`;
1191
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1192
+ }
1193
+ else if (name === "financials_snapshot") {
1194
+ endpoint = `financials/${args.ticker}/snapshot`;
1195
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1196
+ }
1353
1197
 
1354
- case "stocks_ticker":
1355
- if (!args.ticker) {
1356
- throw new Error("Stock ticker symbol is required");
1357
- }
1358
- endpoint = `stocks/${args.ticker}`;
1359
- result = await makeApiRequest(endpoint, { method: 'GET' });
1360
- break;
1198
+ // ---------- Insiders ----------
1199
+ else if (name === "insiders_funds") {
1200
+ endpoint = `insiders/${args.ticker}/funds`;
1201
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1202
+ }
1203
+ else if (name === "insiders_individuals") {
1204
+ endpoint = `insiders/${args.ticker}/individuals`;
1205
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1206
+ }
1207
+ else if (name === "insiders_institutions") {
1208
+ endpoint = `insiders/${args.ticker}/institutions`;
1209
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1210
+ }
1211
+ else if (name === "insiders_ownership") {
1212
+ endpoint = `insiders/${args.ticker}/ownership`;
1213
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1214
+ }
1215
+ else if (name === "insiders_activity") {
1216
+ endpoint = `insiders/${args.ticker}/activity`;
1217
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1218
+ }
1219
+ else if (name === "insiders_transactions") {
1220
+ endpoint = `insiders/${args.ticker}/transactions`;
1221
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1222
+ }
1361
1223
 
1362
- case "stocks_prices":
1363
- if (!args.ticker) {
1364
- throw new Error("Stock ticker symbol is required");
1365
- }
1366
- endpoint = `stocks/${args.ticker}/prices`;
1367
- result = await makeApiRequest(endpoint, { method: 'GET' });
1368
- break;
1224
+ // ---------- Web Traffic ----------
1225
+ else if (name === "webtraffic_traffic") {
1226
+ endpoint = `webtraffic/${args.ticker}/traffic`;
1227
+ result = await makeApiRequest(endpoint, { method: 'GET' });
1228
+ }
1369
1229
 
1370
- default:
1371
- throw new Error(`Unknown tool: ${name}`);
1230
+ else {
1231
+ throw new Error(`Unknown tool: ${name}`);
1372
1232
  }
1373
1233
 
1374
1234
  return {
@@ -1398,7 +1258,7 @@ exchange: args.exchange
1398
1258
  async function main() {
1399
1259
  const transport = new StdioServerTransport();
1400
1260
  await server.connect(transport);
1401
- console.error("Axion MCP Server running on stdio");
1261
+ console.error("Axion MCP Server v2 running on stdio");
1402
1262
  }
1403
1263
 
1404
1264
  main().catch((error) => {