finimpulse-mcp-server 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/build/tools/events/tickers/handler.js +4 -0
- package/build/tools/events/tickers/handler.js.map +1 -0
- package/build/tools/events/tickers/index.js +6 -0
- package/build/tools/events/tickers/index.js.map +1 -0
- package/build/tools/events/tickers/schema.js +11 -0
- package/build/tools/events/tickers/schema.js.map +1 -0
- package/build/tools/events/tickers/types.js +2 -0
- package/build/tools/events/tickers/types.js.map +1 -0
- package/build/tools/historical/index.js +1 -1
- package/build/tools/historical/index.js.map +1 -1
- package/build/tools/holdings/history/handler.js +4 -0
- package/build/tools/holdings/history/handler.js.map +1 -0
- package/build/tools/holdings/history/index.js +6 -0
- package/build/tools/holdings/history/index.js.map +1 -0
- package/build/tools/holdings/history/schema.js +12 -0
- package/build/tools/holdings/history/schema.js.map +1 -0
- package/build/tools/holdings/history/types.js +2 -0
- package/build/tools/holdings/history/types.js.map +1 -0
- package/build/tools/holdings/history-dates/handler.js +5 -0
- package/build/tools/holdings/history-dates/handler.js.map +1 -0
- package/build/tools/holdings/history-dates/index.js +6 -0
- package/build/tools/holdings/history-dates/index.js.map +1 -0
- package/build/tools/holdings/history-dates/schema.js +9 -0
- package/build/tools/holdings/history-dates/schema.js.map +1 -0
- package/build/tools/holdings/history-dates/types.js +2 -0
- package/build/tools/holdings/history-dates/types.js.map +1 -0
- package/build/tools/index.js +14 -0
- package/build/tools/index.js.map +1 -1
- package/build/tools/macro-economics/handler.js +4 -0
- package/build/tools/macro-economics/handler.js.map +1 -0
- package/build/tools/macro-economics/index.js +6 -0
- package/build/tools/macro-economics/index.js.map +1 -0
- package/build/tools/macro-economics/schema.js +10 -0
- package/build/tools/macro-economics/schema.js.map +1 -0
- package/build/tools/macro-economics/types.js +2 -0
- package/build/tools/macro-economics/types.js.map +1 -0
- package/build/tools/market/calendars/handler.js +4 -0
- package/build/tools/market/calendars/handler.js.map +1 -0
- package/build/tools/market/calendars/index.js +6 -0
- package/build/tools/market/calendars/index.js.map +1 -0
- package/build/tools/market/calendars/schema.js +10 -0
- package/build/tools/market/calendars/schema.js.map +1 -0
- package/build/tools/market/calendars/types.js +2 -0
- package/build/tools/market/calendars/types.js.map +1 -0
- package/build/tools/market/index/handler.js +4 -0
- package/build/tools/market/index/handler.js.map +1 -0
- package/build/tools/market/index/index.js +6 -0
- package/build/tools/market/index/index.js.map +1 -0
- package/build/tools/market/index/schema.js +15 -0
- package/build/tools/market/index/schema.js.map +1 -0
- package/build/tools/market/index/types.js +2 -0
- package/build/tools/market/index/types.js.map +1 -0
- package/build/tools/news/index.js +1 -1
- package/build/tools/news/index.js.map +1 -1
- package/build/tools/news/schema.js +8 -46
- package/build/tools/news/schema.js.map +1 -1
- package/build/tools/sec-filings/events/handler.js +4 -0
- package/build/tools/sec-filings/events/handler.js.map +1 -0
- package/build/tools/sec-filings/events/index.js +6 -0
- package/build/tools/sec-filings/events/index.js.map +1 -0
- package/build/tools/sec-filings/events/schema.js +14 -0
- package/build/tools/sec-filings/events/schema.js.map +1 -0
- package/build/tools/sec-filings/events/types.js +2 -0
- package/build/tools/sec-filings/events/types.js.map +1 -0
- package/build/utils/filters.js +29 -0
- package/build/utils/filters.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -265,6 +265,8 @@ API_TOKEN=your-api-token npx finimpulse-mcp-server
|
|
|
265
265
|
| `get_histories` | Historical time-series: prices, dividends, splits, and capital gains with configurable date range and interval. |
|
|
266
266
|
| `get_profile` | Asset profile and descriptive metadata: identity, classification, governance, and fund-specific attributes. |
|
|
267
267
|
| `get_news` | Latest news and press releases with headlines, descriptions, related tickers, and provider info. |
|
|
268
|
+
| `get_market_index` | Search ~39,000 global market indices with latest close, daily change, 52-week range, and one-year return. |
|
|
269
|
+
| `get_sec_filings_events` | SEC filing events: filing dates, form types (10-K, 8-K, ...), document metadata, and source URLs. |
|
|
268
270
|
|
|
269
271
|
### Statistics & Performance
|
|
270
272
|
|
|
@@ -300,6 +302,8 @@ API_TOKEN=your-api-token npx finimpulse-mcp-server
|
|
|
300
302
|
|------|-------------|
|
|
301
303
|
| `get_holdings_general` | Portfolio composition and holdings-level aggregates: asset allocation, sector exposure. |
|
|
302
304
|
| `get_holdings_top_holdings` | Top holdings list with ticker, name, and weight as % of total net assets. |
|
|
305
|
+
| `get_holdings_history_dates` | Available historical holdings reporting dates for an ETF. Use before `get_holdings_history`. |
|
|
306
|
+
| `get_holdings_history` | Full ETF holdings composition (shares, weight, market value) on a historical reporting date. |
|
|
303
307
|
|
|
304
308
|
### Analyst Coverage & Ratings
|
|
305
309
|
|
|
@@ -318,6 +322,14 @@ API_TOKEN=your-api-token npx finimpulse-mcp-server
|
|
|
318
322
|
| `get_options_chain` | Full option chain for a given expiration: calls and puts with pricing, bid/ask, volume, open interest, and implied volatility. |
|
|
319
323
|
| `get_options_contracts` | Single option contract snapshot: pricing, bid/ask, volume, open interest, implied volatility, moneyness, and Greeks. |
|
|
320
324
|
|
|
325
|
+
### Events & Macroeconomics
|
|
326
|
+
|
|
327
|
+
| Tool | Description |
|
|
328
|
+
|------|-------------|
|
|
329
|
+
| `get_events_tickers` | Past and upcoming corporate events: earnings (EPS estimate/actual/surprise) and IPOs. |
|
|
330
|
+
| `get_market_calendars` | Macroeconomic release calendar: indicator releases by country with actual, prior, and originally reported values. |
|
|
331
|
+
| `get_macro_economics` | Annual country-level macroeconomic indicators (GDP, inflation, rates, trade, government finances). Source: OECD. |
|
|
332
|
+
|
|
321
333
|
## Configuration
|
|
322
334
|
|
|
323
335
|
When using the **hosted** server (`https://mcp.finimpulse.com/mcp`) no environment variables are required — your MCP client handles OAuth automatically.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/events/tickers/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,KAAyB,EAAE,MAAiB;IACtF,OAAO,MAAM,CAAC,OAAO,CAAwB,oBAAoB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { eventsTickersInputSchema } from './schema.js';
|
|
2
|
+
import { eventsTickersHandler } from './handler.js';
|
|
3
|
+
export function registerEventsTickersTool(server, client) {
|
|
4
|
+
server.registerTool('get_events_tickers', { description: 'Returns past and upcoming corporate events for ticker symbols: earnings announcements (EPS estimate, actual, surprise) and IPOs (deal status, listing exchange). Fields depend on the event type. Earnings are available up to ~14 months ahead, IPOs ~2-3 weeks ahead; data is updated weekly. Filter by event type, date, or symbol (e.g. filters ["symbol", "=", "AAPL"]). Use to build earnings/IPO calendars or alerts.', inputSchema: eventsTickersInputSchema }, (input) => eventsTickersHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/events/tickers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,wBAAwB,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAGlD,MAAM,UAAU,yBAAyB,CAAC,MAAiB,EAAE,MAAiB;IAC7E,MAAM,CAAC,YAAY,CAAC,oBAAoB,EAAE,EAAE,WAAW,EAAE,8ZAA8Z,EAAE,WAAW,EAAE,wBAAwB,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACnjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterDescription, getFilterExpression, getSortBySchema } from '../../../utils/filters.js';
|
|
3
|
+
export const eventsTickersInputSchema = z.object({
|
|
4
|
+
event_types: z.array(z.enum(['earnings', 'ipo'])).optional().describe('Types of corporate events to include. Supported values: earnings, ipo. If not specified, events of all types are returned.'),
|
|
5
|
+
filters: getFilterExpression().optional().describe(getFilterDescription('"filters": ["symbol", "=", "AAPL"]')),
|
|
6
|
+
sort_by: getSortBySchema('start_date_time', 'By default, results are sorted by start_date_time in descending order, then by symbol in alphabetical order.'),
|
|
7
|
+
limit: z.number().int().min(1).max(1000).optional().describe('Maximum number of matched items returned. Default: 100, maximum: 1000.'),
|
|
8
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset (0-based).'),
|
|
9
|
+
tag: z.string().max(255).optional().describe('User-defined request identifier (max 255 characters). Returned in the response; does not affect processing.'),
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/events/tickers/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAErG,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACpE,4HAA4H,CAC5H;IACD,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD,oBAAoB,CAAC,oCAAoC,CAAC,CAC1D;IACD,OAAO,EAAE,eAAe,CAAC,iBAAiB,EAAE,8GAA8G,CAAC;IAC3J,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wEAAwE,CAAC;IACtI,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACnF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6GAA6G,CAAC;CAC3J,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/events/tickers/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { historiesInputSchema } from './schema.js';
|
|
2
2
|
import { historiesHandler } from './handler.js';
|
|
3
3
|
export function registerHistoriesTool(server, client) {
|
|
4
|
-
server.registerTool('get_histories', { description: 'Returns time-series data for an asset in a single unified stream. This endpoint can return historical prices and, optionally, additional history “event” types such as dividends, splits, and capital gains (where available). It is a configurable endpoint that lets you control the date range, interval, included record types, sorting, and page size.', inputSchema: historiesInputSchema }, (input) => historiesHandler(input, client));
|
|
4
|
+
server.registerTool('get_histories', { description: 'Returns time-series data for an asset in a single unified stream. This endpoint can return historical prices and, optionally, additional history “event” types such as dividends, splits, and capital gains (where available). It is a configurable endpoint that lets you control the date range, interval, included record types, sorting, and page size. Each item is a price record for one interval or a single dividend, split, or capital gain event. Also covers indices.', inputSchema: historiesInputSchema }, (input) => historiesHandler(input, client));
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/historical/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,MAAiB;IACzE,MAAM,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/historical/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,MAAiB;IACzE,MAAM,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,WAAW,EAAE,mdAAmd,EAAE,WAAW,EAAE,oBAAoB,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC3lB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/holdings/history/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,KAA2B,EAAE,MAAiB;IAC1F,OAAO,MAAM,CAAC,OAAO,CAA0B,sBAAsB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { holdingsHistoryInputSchema } from './schema.js';
|
|
2
|
+
import { holdingsHistoryHandler } from './handler.js';
|
|
3
|
+
export function registerHoldingsHistoryTool(server, client) {
|
|
4
|
+
server.registerTool('get_holdings_history', { description: 'Returns the full holdings composition (asset, name, shares, weight %, market value) of an ETF on a specific historical reporting date. ETFs only; returns an empty result if no data exists for the symbol and date. Use get_holdings_history_dates first to get valid dates. Supports filtering and sorting (e.g. by weight_pct).', inputSchema: holdingsHistoryInputSchema }, (input) => holdingsHistoryHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/holdings/history/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,0BAA0B,EAAC,MAAM,aAAa,CAAC;AACvD,OAAO,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AAGpD,MAAM,UAAU,2BAA2B,CAAC,MAAiB,EAAE,MAAiB;IAC/E,MAAM,CAAC,YAAY,CAAC,sBAAsB,EAAE,EAAE,WAAW,EAAE,oUAAoU,EAAE,WAAW,EAAE,0BAA0B,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/d,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterDescription, getFilterExpression, getSortBySchema } from '../../../utils/filters.js';
|
|
3
|
+
export const holdingsHistoryInputSchema = z.object({
|
|
4
|
+
symbol: z.string().min(1).describe('ETF identifier (ticker symbol).'),
|
|
5
|
+
date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).describe('Holdings reporting date (YYYY-MM-DD). Must be a date available for the requested symbol; use get_holdings_history_dates to retrieve valid dates.'),
|
|
6
|
+
limit: z.number().int().min(1).optional().describe('Maximum number of matched records returned.'),
|
|
7
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset (0-based).'),
|
|
8
|
+
filters: getFilterExpression().optional().describe(getFilterDescription('"filters": ["weight_pct", ">", 1]')),
|
|
9
|
+
sort_by: getSortBySchema('weight_pct'),
|
|
10
|
+
tag: z.string().max(255).optional().describe('User-defined request identifier (max 255 characters). Returned in the response; does not affect processing.'),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/holdings/history/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAErG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IACrE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,CACrD,kJAAkJ,CAClJ;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IACjG,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACnF,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD,oBAAoB,CAAC,mCAAmC,CAAC,CACzD;IACD,OAAO,EAAE,eAAe,CAAC,YAAY,CAAC;IACtC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6GAA6G,CAAC;CAC3J,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/holdings/history/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/holdings/history-dates/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,KAAgC,EAAE,MAAiB;IACpG,MAAM,EAAC,MAAM,EAAE,GAAG,IAAI,EAAC,GAAG,KAAK,CAAC;IAChC,OAAO,MAAM,CAAC,OAAO,CAA+B,8BAA8B,kBAAkB,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAC/H,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { holdingsHistoryDatesInputSchema } from './schema.js';
|
|
2
|
+
import { holdingsHistoryDatesHandler } from './handler.js';
|
|
3
|
+
export function registerHoldingsHistoryDatesTool(server, client) {
|
|
4
|
+
server.registerTool('get_holdings_history_dates', { description: 'Returns the list of available historical holdings reporting dates for an ETF. ETFs only (stocks and mutual funds are not supported); returns an empty result if no data exists. Call this first to get a valid date, then pass it to get_holdings_history.', inputSchema: holdingsHistoryDatesInputSchema }, (input) => holdingsHistoryDatesHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/holdings/history-dates/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,+BAA+B,EAAC,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAC,2BAA2B,EAAC,MAAM,cAAc,CAAC;AAGzD,MAAM,UAAU,gCAAgC,CAAC,MAAiB,EAAE,MAAiB;IACpF,MAAM,CAAC,YAAY,CAAC,4BAA4B,EAAE,EAAE,WAAW,EAAE,4PAA4P,EAAE,WAAW,EAAE,+BAA+B,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,2BAA2B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACva,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const holdingsHistoryDatesInputSchema = z.object({
|
|
3
|
+
symbol: z.string().min(1).describe('ETF identifier (ticker symbol).'),
|
|
4
|
+
start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Start of the date range filter (YYYY-MM-DD). Only dates on and after this value are returned. Coverage begins on 2026-01-01 for most ETFs (~500 ETFs go back to 2023-2025).'),
|
|
5
|
+
limit: z.number().int().min(1).optional().describe('Maximum number of matched records returned.'),
|
|
6
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset (0-based).'),
|
|
7
|
+
tag: z.string().max(255).optional().describe('User-defined request identifier (max 255 characters). Returned in the response; does not affect processing.'),
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/holdings/history-dates/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IACrE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACtE,6KAA6K,CAC7K;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IACjG,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACnF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6GAA6G,CAAC;CAC3J,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/holdings/history-dates/types.ts"],"names":[],"mappings":""}
|
package/build/tools/index.js
CHANGED
|
@@ -29,6 +29,13 @@ import { registerHoldingsTopHoldingsTool } from './holdings/top-holdings/index.j
|
|
|
29
29
|
import { registerOptionsChainTool } from './options/chain/index.js';
|
|
30
30
|
import { registerOptionsContractsTool } from './options/contracts/index.js';
|
|
31
31
|
import { registerOptionsExpirationsTool } from './options/expirations/index.js';
|
|
32
|
+
import { registerHoldingsHistoryTool } from './holdings/history/index.js';
|
|
33
|
+
import { registerHoldingsHistoryDatesTool } from './holdings/history-dates/index.js';
|
|
34
|
+
import { registerEventsTickersTool } from './events/tickers/index.js';
|
|
35
|
+
import { registerMacroEconomicsTool } from './macro-economics/index.js';
|
|
36
|
+
import { registerMarketCalendarsTool } from './market/calendars/index.js';
|
|
37
|
+
import { registerMarketIndexTool } from './market/index/index.js';
|
|
38
|
+
import { registerSecFilingsEventsTool } from './sec-filings/events/index.js';
|
|
32
39
|
export function registerAllTools(server, client) {
|
|
33
40
|
registerSearchTool(server, client);
|
|
34
41
|
registerSearchLiteTool(server, client);
|
|
@@ -58,8 +65,15 @@ export function registerAllTools(server, client) {
|
|
|
58
65
|
registerStatisticsAnnualReturnsTool(server, client);
|
|
59
66
|
registerHoldingsGeneralTool(server, client);
|
|
60
67
|
registerHoldingsTopHoldingsTool(server, client);
|
|
68
|
+
registerHoldingsHistoryDatesTool(server, client);
|
|
69
|
+
registerHoldingsHistoryTool(server, client);
|
|
61
70
|
registerOptionsChainTool(server, client);
|
|
62
71
|
registerOptionsContractsTool(server, client);
|
|
63
72
|
registerOptionsExpirationsTool(server, client);
|
|
73
|
+
registerEventsTickersTool(server, client);
|
|
74
|
+
registerMacroEconomicsTool(server, client);
|
|
75
|
+
registerMarketCalendarsTool(server, client);
|
|
76
|
+
registerMarketIndexTool(server, client);
|
|
77
|
+
registerSecFilingsEventsTool(server, client);
|
|
64
78
|
}
|
|
65
79
|
//# sourceMappingURL=index.js.map
|
package/build/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAC,sBAAsB,EAAC,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAC,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAC,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAC,4BAA4B,EAAC,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAC,4BAA4B,EAAC,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAC,mCAAmC,EAAC,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAC,sCAAsC,EAAC,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAC,0BAA0B,EAAC,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAC,gCAAgC,EAAC,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAC,8BAA8B,EAAC,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAC,2BAA2B,EAAC,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAC,uCAAuC,EAAC,MAAM,0CAA0C,CAAC;AACjG,OAAO,EAAC,6BAA6B,EAAC,MAAM,+BAA+B,CAAC;AAC5E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O,MAAM,CAAC,OAAO,CAAyB,qBAAqB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { macroEconomicsInputSchema } from './schema.js';
|
|
2
|
+
import { macroEconomicsHandler } from './handler.js';
|
|
3
|
+
export function registerMacroEconomicsTool(server, client) {
|
|
4
|
+
server.registerTool('get_macro_economics', { description: 'Returns annual macroeconomic indicators by country (50+ countries, 1970 to current year; current-year values are forecasts): GDP, inflation, unemployment, interest rates, trade, government finances, consumption. One record per country per year with 38 indicators. Updated quarterly. Filter by country_iso3 and year. Source: OECD Data Explorer; use and redistribution are subject to the OECD Terms and Conditions, including source attribution.', inputSchema: macroEconomicsInputSchema }, (input) => macroEconomicsHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/macro-economics/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,yBAAyB,EAAC,MAAM,aAAa,CAAC;AACtD,OAAO,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAGnD,MAAM,UAAU,0BAA0B,CAAC,MAAiB,EAAE,MAAiB;IAC9E,MAAM,CAAC,YAAY,CAAC,qBAAqB,EAAE,EAAE,WAAW,EAAE,4bAA4b,EAAE,WAAW,EAAE,yBAAyB,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACplB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterDescription, getFilterExpression, getSortBySchema } from '../../utils/filters.js';
|
|
3
|
+
export const macroEconomicsInputSchema = z.object({
|
|
4
|
+
filters: getFilterExpression().optional().describe(getFilterDescription('"filters": ["country_iso3", "=", "CHE"]') + '\nFilterable fields include country_iso3 (ISO 3166-1 alpha-3) and year.'),
|
|
5
|
+
sort_by: getSortBySchema('year'),
|
|
6
|
+
limit: z.number().int().min(1).max(1000).optional().describe('Maximum number of matched items returned. Default: 100, maximum: 1000.'),
|
|
7
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset (0-based).'),
|
|
8
|
+
tag: z.string().max(255).optional().describe('User-defined request identifier (max 255 characters). Returned in the response; does not affect processing.'),
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/tools/macro-economics/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAElG,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD,oBAAoB,CAAC,yCAAyC,CAAC,GAAG,yEAAyE,CAC3I;IACD,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wEAAwE,CAAC;IACtI,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACnF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6GAA6G,CAAC;CAC3J,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/macro-economics/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/market/calendars/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,KAA2B,EAAE,MAAiB;IAC1F,OAAO,MAAM,CAAC,OAAO,CAA0B,sBAAsB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { marketCalendarsInputSchema } from './schema.js';
|
|
2
|
+
import { marketCalendarsHandler } from './handler.js';
|
|
3
|
+
export function registerMarketCalendarsTool(server, client) {
|
|
4
|
+
server.registerTool('get_market_calendars', { description: 'Returns the macroeconomic release calendar: scheduled data releases (e.g. Unemployment Rate, CPI, Retail Sales) for 71 countries and the euro area, covering recent releases and roughly the next 30 days. Each record has the release time, reference period, and actual, prior and originally reported values (after_release_actual is null until published). Updated weekly. Filter by country, date or indicator.', inputSchema: marketCalendarsInputSchema }, (input) => marketCalendarsHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/market/calendars/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,0BAA0B,EAAC,MAAM,aAAa,CAAC;AACvD,OAAO,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AAGpD,MAAM,UAAU,2BAA2B,CAAC,MAAiB,EAAE,MAAiB;IAC/E,MAAM,CAAC,YAAY,CAAC,sBAAsB,EAAE,EAAE,WAAW,EAAE,uZAAuZ,EAAE,WAAW,EAAE,0BAA0B,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACljB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterDescription, getFilterExpression, getSortBySchema } from '../../../utils/filters.js';
|
|
3
|
+
export const marketCalendarsInputSchema = z.object({
|
|
4
|
+
filters: getFilterExpression().optional().describe(getFilterDescription('"filters": ["country_code_iso3", "=", "USA"]') + '\nFilterable fields include country_code_iso3, economic_release, start_date_time and period.'),
|
|
5
|
+
sort_by: getSortBySchema('start_date_time', 'By default, results are sorted by start_date_time in descending order, then by economic_release in alphabetical order.'),
|
|
6
|
+
limit: z.number().int().min(1).max(1000).optional().describe('Maximum number of matched items returned. Default: 100, maximum: 1000.'),
|
|
7
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset (0-based).'),
|
|
8
|
+
tag: z.string().max(255).optional().describe('User-defined request identifier (max 255 characters). Returned in the response; does not affect processing.'),
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/market/calendars/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAErG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD,oBAAoB,CAAC,8CAA8C,CAAC,GAAG,8FAA8F,CACrK;IACD,OAAO,EAAE,eAAe,CAAC,iBAAiB,EAAE,wHAAwH,CAAC;IACrK,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wEAAwE,CAAC;IACtI,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACnF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6GAA6G,CAAC;CAC3J,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/market/calendars/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/market/index/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,KAAuB,EAAE,MAAiB;IAClF,OAAO,MAAM,CAAC,OAAO,CAAsB,kBAAkB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { marketIndexInputSchema } from './schema.js';
|
|
2
|
+
import { marketIndexHandler } from './handler.js';
|
|
3
|
+
export function registerMarketIndexTool(server, client) {
|
|
4
|
+
server.registerTool('get_market_index', { description: 'Searches ~39,000 global market indices (e.g. S&P 500, Dow Jones, Nasdaq Composite, VIX, Treasury yield indices) and returns latest closing price, daily change, 52-week range and one-year return. Updated every 24 hours; no intraday prices. Use select_identifiers to reduce response size. For historical index prices use get_histories.', inputSchema: marketIndexInputSchema }, (input) => marketIndexHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/market/index/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,sBAAsB,EAAC,MAAM,aAAa,CAAC;AACnD,OAAO,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAGhD,MAAM,UAAU,uBAAuB,CAAC,MAAiB,EAAE,MAAiB;IAC3E,MAAM,CAAC,YAAY,CAAC,kBAAkB,EAAE,EAAE,WAAW,EAAE,+UAA+U,EAAE,WAAW,EAAE,sBAAsB,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9d,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterDescription, getFilterExpression, getSortBySchema } from '../../../utils/filters.js';
|
|
3
|
+
export const marketIndexInputSchema = z.object({
|
|
4
|
+
search_text: z.string().optional().describe('Free-text query (e.g., "GSPC.INDX", "S&P 500", partial symbol, partial name).'),
|
|
5
|
+
select_identifiers: z.array(z.string()).optional().describe('A list of field names to include in the response. When provided, each item contains only the specified fields. When not provided or null, the full field set is returned. "symbol" and "logo" are always returned regardless of the value passed.'),
|
|
6
|
+
symbols: z.array(z.string()).optional().describe('A list of index symbols to retrieve (e.g., GSPC.INDX, DJI.INDX, 000001.SS). When provided, only the specified indices are returned. Symbols that do not exist are excluded; if none are found the result is empty.'),
|
|
7
|
+
show_tickers_without_company_name: z.boolean().optional().describe('Include indices without a name. true - include indices without a name; false - exclude them.'),
|
|
8
|
+
hide_tickers_with_company_name: z.boolean().optional().describe('Exclude indices with a name. true - exclude indices with a name; false - include them.'),
|
|
9
|
+
filters: getFilterExpression().optional().describe(getFilterDescription('"filters": ["regular_market_price_change_percent", ">", 1]')),
|
|
10
|
+
sort_by: getSortBySchema('regular_market_price_change_percent'),
|
|
11
|
+
limit: z.number().int().min(1).max(1000).optional().describe('Maximum number of matched items returned. Default: 100, maximum: 1000.'),
|
|
12
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset (0-based).'),
|
|
13
|
+
tag: z.string().max(255).optional().describe('User-defined request identifier (max 255 characters). Returned in the response; does not affect processing.'),
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/market/index/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAErG,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+EAA+E,CAAC;IAC5H,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC1D,mPAAmP,CACnP;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC/C,oNAAoN,CACpN;IACD,iCAAiC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8FAA8F,CAAC;IAClK,8BAA8B,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wFAAwF,CAAC;IACzJ,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD,oBAAoB,CAAC,4DAA4D,CAAC,CAClF;IACD,OAAO,EAAE,eAAe,CAAC,qCAAqC,CAAC;IAC/D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wEAAwE,CAAC;IACtI,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACnF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6GAA6G,CAAC;CAC3J,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/market/index/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { newsInputSchema } from './schema.js';
|
|
2
2
|
import { newsHandler } from './handler.js';
|
|
3
3
|
export function registerNewsTool(server, client) {
|
|
4
|
-
server.registerTool('get_news', { description: 'Returns
|
|
4
|
+
server.registerTool('get_news', { description: 'Returns news articles and press releases for one asset symbol (stock, ETF, mutual fund, or index): headline, short description, publication date, related tickers, provider, and link to the source. News may appear with a delay of up to 3 days. If no news matches the request, the API returns status code 40400 (Not Found), which is expected and not an error.', inputSchema: newsInputSchema }, (input) => newsHandler(input, client));
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/news/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAGzC,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,MAAiB;IACpE,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/news/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAGzC,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,MAAiB;IACpE,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,uWAAuW,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAChe,CAAC"}
|
|
@@ -1,51 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { getFilterExpression } from '../../utils/filters.js';
|
|
2
|
+
import { getFilterDescription, getFilterExpression, getSortBySchema } from '../../utils/filters.js';
|
|
3
3
|
export const newsInputSchema = z.object({
|
|
4
4
|
symbol: z.string().describe('Asset identifier (ticker symbol).'),
|
|
5
|
-
types: z.array(z.enum(['news', 'press_release'])).optional().describe('News types to include. Supported values: news, press_release. If
|
|
6
|
-
start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('
|
|
7
|
-
end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Supported operators:
|
|
14
|
-
|
|
15
|
-
String fields:
|
|
16
|
-
|
|
17
|
-
like – pattern match (requires % as a wildcard)
|
|
18
|
-
not_like - pattern does not match (requires % as a wildcard)
|
|
19
|
-
contains - value exists in string
|
|
20
|
-
not_contains - value does not exist in string
|
|
21
|
-
startswith - string starts with value
|
|
22
|
-
endswith - string ends with value
|
|
23
|
-
% usage examples:
|
|
24
|
-
|
|
25
|
-
%abc% - matches any string containing "abc"
|
|
26
|
-
abc% - matches any string starting with "abc"
|
|
27
|
-
%abc - matches any string ending with "abc"
|
|
28
|
-
Example:
|
|
29
|
-
|
|
30
|
-
"filters": [
|
|
31
|
-
"title", "<>", null
|
|
32
|
-
]`),
|
|
33
|
-
sort_by: z.array(z.object({
|
|
34
|
-
selector: z.string().describe('Metric used for sorting (e.g., pub_date)'),
|
|
35
|
-
desc: z.boolean().describe('Sorting direction (true for descending, false for ascending).'),
|
|
36
|
-
})).optional().describe(`Optional sorting configuration for result items. Each sorting setup is defined as [selector, desc]:
|
|
37
|
-
|
|
38
|
-
selector - Metric used for sorting (e.g., pub_date).
|
|
39
|
-
desc - Sorting direction (true for descending, false for ascending).
|
|
40
|
-
Sortings can be combined using ,.
|
|
41
|
-
|
|
42
|
-
Example:
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
"selector": "pub_date",
|
|
46
|
-
"desc": true
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
`),
|
|
5
|
+
types: z.array(z.enum(['news', 'press_release'])).optional().describe('News types to include. Supported values: news, press_release. If no values are provided, all supported types are returned.'),
|
|
6
|
+
start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Start of the date range filter (YYYY-MM-DD). If omitted, news from the earliest available date is returned.'),
|
|
7
|
+
end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('End of the date range filter (YYYY-MM-DD). If omitted, news up to the most recent available date is returned.'),
|
|
8
|
+
filters: getFilterExpression().optional().describe(getFilterDescription('"filters": ["title", "contains", "Buyback"]')),
|
|
9
|
+
sort_by: getSortBySchema('pub_date'),
|
|
10
|
+
limit: z.number().int().min(1).max(1000).optional().describe('Maximum number of matched items returned. Default: 100, maximum: 1000.'),
|
|
11
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset (0-based).'),
|
|
50
12
|
});
|
|
51
13
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/tools/news/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,C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AC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;CACnF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/sec-filings/events/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,KAA4B,EAAE,MAAiB;IAC5F,OAAO,MAAM,CAAC,OAAO,CAA2B,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { secFilingsEventsInputSchema } from './schema.js';
|
|
2
|
+
import { secFilingsEventsHandler } from './handler.js';
|
|
3
|
+
export function registerSecFilingsEventsTool(server, client) {
|
|
4
|
+
server.registerTool('get_sec_filings_events', { description: 'Returns SEC filing events for an asset (stocks, ETFs, mutual funds): filing date, form type (10-K, 8-K, ...), accession number, document metadata and source URL. Query by symbol or cik, optionally limited by filing date range. Covers ~8,000 tickers, refreshed every 7 days. Use to build filing histories or monitor new material filings (e.g. 8-K).', inputSchema: secFilingsEventsInputSchema }, (input) => secFilingsEventsHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/sec-filings/events/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,2BAA2B,EAAC,MAAM,aAAa,CAAC;AACxD,OAAO,EAAC,uBAAuB,EAAC,MAAM,cAAc,CAAC;AAGrD,MAAM,UAAU,4BAA4B,CAAC,MAAiB,EAAE,MAAiB;IAChF,MAAM,CAAC,YAAY,CAAC,wBAAwB,EAAE,EAAE,WAAW,EAAE,6VAA6V,EAAE,WAAW,EAAE,2BAA2B,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5f,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterDescription, getFilterExpression, getSortBySchema } from '../../../utils/filters.js';
|
|
3
|
+
export const secFilingsEventsInputSchema = z.object({
|
|
4
|
+
symbol: z.string().min(1).optional().describe('Asset identifier (ticker symbol).'),
|
|
5
|
+
cik: z.string().optional().describe('Central Index Key (CIK).'),
|
|
6
|
+
start_filing_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Start of the filing date range filter (YYYY-MM-DD). Minimum supported date is 1990-01-01.'),
|
|
7
|
+
end_filing_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('End of the filing date range filter (YYYY-MM-DD). Minimum supported date is 1990-01-01.'),
|
|
8
|
+
limit: z.number().int().min(1).optional().describe('Maximum number of matched items returned.'),
|
|
9
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset (0-based).'),
|
|
10
|
+
filters: getFilterExpression().optional().describe(getFilterDescription('"filters": ["form", "=", "8-K"]') + '\nSupported on all fields except file_url.'),
|
|
11
|
+
sort_by: getSortBySchema('cik', 'Results are sorted by filing_date in descending order by default.'),
|
|
12
|
+
tag: z.string().max(255).optional().describe('User-defined request identifier (max 255 characters). Returned in the response; does not affect processing.'),
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/sec-filings/events/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAErG,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IAC/D,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC7E,2FAA2F,CAC3F;IACD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC3E,yFAAyF,CACzF;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAC/F,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACnF,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD,oBAAoB,CAAC,iCAAiC,CAAC,GAAG,4CAA4C,CACtG;IACD,OAAO,EAAE,eAAe,CAAC,KAAK,EAAE,mEAAmE,CAAC;IACpG,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6GAA6G,CAAC;CAC3J,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/sec-filings/events/types.ts"],"names":[],"mappings":""}
|
package/build/utils/filters.js
CHANGED
|
@@ -8,4 +8,33 @@ export function getFilterExpression() {
|
|
|
8
8
|
}
|
|
9
9
|
return z.array(z.union([z.array(z.union([z.string(), z.number(), z.boolean()])).length(3), z.enum(["and", "or"]), z.array(z.unknown()).length(3), z.union([z.string(), z.number(), z.unknown()]), z.any()])).max(3);
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Description of the `filters` parameter for endpoints that support the extended operator set
|
|
13
|
+
* (`=`, `<>`, `>`, `>=`, `<`, `<=`, `in` and string operators, combined with and/or/not).
|
|
14
|
+
*/
|
|
15
|
+
export function getFilterDescription(example) {
|
|
16
|
+
return [
|
|
17
|
+
'Optional filter expressions. Each filter condition is defined as [field, operator, value]. Conditions can be combined using the logical operators and, or, and not.',
|
|
18
|
+
'',
|
|
19
|
+
'Supported operators:',
|
|
20
|
+
'Any field type (numbers, strings, booleans, dates): = (equals), <> (not equal)',
|
|
21
|
+
'Numbers and dates: > (greater than), >= (greater than or equal), < (less than), <= (less than or equal)',
|
|
22
|
+
'List of values: in (matches any value in the list, e.g. ["field", "in", ["value_1", "value_2"]])',
|
|
23
|
+
'Strings: like (pattern match, requires % as a wildcard), not_like (pattern does not match), contains (value exists in string), not_contains (value does not exist in string), startswith, endswith',
|
|
24
|
+
'',
|
|
25
|
+
'% usage examples: %abc% - contains "abc"; abc% - starts with "abc"; %abc - ends with "abc".',
|
|
26
|
+
'String operators are case-sensitive. Dates are compared as text, so pass date values in the same format as the field returns them. Fields that contain arrays cannot be filtered.',
|
|
27
|
+
'',
|
|
28
|
+
`Example: ${example}`,
|
|
29
|
+
].join('\n');
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Zod schema of the `sort_by` parameter: a list of `{selector, desc}` objects.
|
|
33
|
+
*/
|
|
34
|
+
export function getSortBySchema(selectorExample, defaultOrder) {
|
|
35
|
+
return z.array(z.object({
|
|
36
|
+
selector: z.string().describe(`Field used for sorting (e.g., ${selectorExample}).`),
|
|
37
|
+
desc: z.boolean().describe('Sorting direction (true for descending, false for ascending).'),
|
|
38
|
+
})).optional().describe(`Optional sorting configuration. Each sorting setup is an object {selector, desc}; multiple setups can be combined in the array.${defaultOrder ? ' ' + defaultOrder : ''}`);
|
|
39
|
+
}
|
|
11
40
|
//# sourceMappingURL=filters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../src/utils/filters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,UAAU,mBAAmB;IAClC,IAAI,uBAAuB,CAAC,YAAY,EAAE,CAAC;QAC1C,8EAA8E;QAC9E,0EAA0E;QAC1E,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;IACD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrN,CAAC"}
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../src/utils/filters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,0BAA0B,CAAC;AACj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