finimpulse-mcp-server 1.1.0 → 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 +113 -15
- 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 +22 -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/market-price/handler.js +4 -0
- package/build/tools/market-price/handler.js.map +1 -0
- package/build/tools/market-price/index.js +6 -0
- package/build/tools/market-price/index.js.map +1 -0
- package/build/tools/market-price/schema.js +5 -0
- package/build/tools/market-price/schema.js.map +1 -0
- package/build/tools/market-price/types.js +2 -0
- package/build/tools/market-price/types.js.map +1 -0
- package/build/tools/metrics/handler.js +4 -0
- package/build/tools/metrics/handler.js.map +1 -0
- package/build/tools/metrics/index.js +6 -0
- package/build/tools/metrics/index.js.map +1 -0
- package/build/tools/metrics/schema.js +6 -0
- package/build/tools/metrics/schema.js.map +1 -0
- package/build/tools/metrics/types.js +2 -0
- package/build/tools/metrics/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/search-lite/handler.js +4 -0
- package/build/tools/search-lite/handler.js.map +1 -0
- package/build/tools/search-lite/index.js +6 -0
- package/build/tools/search-lite/index.js.map +1 -0
- package/build/tools/search-lite/schema.js +63 -0
- package/build/tools/search-lite/schema.js.map +1 -0
- package/build/tools/search-lite/types.js +2 -0
- package/build/tools/search-lite/types.js.map +1 -0
- 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/tools/summary-lite/handler.js +4 -0
- package/build/tools/summary-lite/handler.js.map +1 -0
- package/build/tools/summary-lite/index.js +6 -0
- package/build/tools/summary-lite/index.js.map +1 -0
- package/build/tools/summary-lite/schema.js +7 -0
- package/build/tools/summary-lite/schema.js.map +1 -0
- package/build/tools/summary-lite/types.js +2 -0
- package/build/tools/summary-lite/types.js.map +1 -0
- package/build/transports/http.js +2 -1
- package/build/transports/http.js.map +1 -1
- package/build/utils/filters.js +29 -0
- package/build/utils/filters.js.map +1 -1
- package/package.json +15 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { marketPriceInputSchema } from './schema.js';
|
|
2
|
+
import { marketPriceHandler } from './handler.js';
|
|
3
|
+
export function registerMarketPriceTool(server, client) {
|
|
4
|
+
server.registerTool('get_market_price', { description: 'Returns the current market price snapshot for a single asset symbol. For US-listed assets the response includes pre-market, regular, and post-market session prices, as well as a current price field reflecting the most recent traded price. For non-US assets, only the regular session and current price are returned. Applicable to stocks, ETFs, and mutual funds.', inputSchema: marketPriceInputSchema }, (input) => marketPriceHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/market-price/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,0WAA0W,EAAE,WAAW,EAAE,sBAAsB,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACzf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/tools/market-price/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;CACvE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/market-price/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/tools/metrics/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAAmB,EAAE,MAAiB;IAC1E,OAAO,MAAM,CAAC,OAAO,CAAkB,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { metricsInputSchema } from './schema.js';
|
|
2
|
+
import { metricsHandler } from './handler.js';
|
|
3
|
+
export function registerMetricsTool(server, client) {
|
|
4
|
+
server.registerTool('get_metrics', { description: 'Returns dividend data, returns, profitability, growth, leverage, and business quality metrics for a single asset symbol. Retrieves a focused set of financial and market metrics covering dividend data, historical returns, profitability, growth, leverage, and business quality indicators. Primarily applicable to stocks.', inputSchema: metricsInputSchema }, (input) => metricsHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/metrics/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAG5C,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,MAAiB;IACvE,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE,EAAE,WAAW,EAAE,gUAAgU,EAAE,WAAW,EAAE,kBAAkB,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAClc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/tools/metrics/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAChE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;CAChF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/metrics/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,CAAC;AACtB,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/tools/news/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,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAChE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACpE,4HAA4H,CAC5H;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACtE,6GAA6G,CAC7G;IACD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACpE,+GAA+G,CAC/G;IACD,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD,oBAAoB,CAAC,6CAA6C,CAAC,CACnE;IACD,OAAO,EAAE,eAAe,CAAC,UAAU,CAAC;IACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC3D,wEAAwE,CACxE;IACD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;CACnF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/tools/search-lite/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,KAAsB,EAAE,MAAiB;IAChF,OAAO,MAAM,CAAC,OAAO,CAAqB,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { searchLiteInputSchema } from './schema.js';
|
|
2
|
+
import { searchLiteHandler } from './handler.js';
|
|
3
|
+
export function registerSearchLiteTool(server, client) {
|
|
4
|
+
server.registerTool('get_search_lite', { description: 'Returns a unified, cross-asset search result for stocks, ETFs, and mutual funds with a focused field set covering core identification, current pricing, and key performance metrics. The response field set is fixed, but it is possible to control which fields are included through the select_identifiers parameter. For a comprehensive field set use the /v1/search endpoint.', inputSchema: searchLiteInputSchema }, (input) => searchLiteHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/search-lite/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,qBAAqB,EAAC,MAAM,aAAa,CAAC;AAClD,OAAO,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAG/C,MAAM,UAAU,sBAAsB,CAAC,MAAiB,EAAE,MAAiB;IAC1E,MAAM,CAAC,YAAY,CAAC,iBAAiB,EAAE,EAAE,WAAW,EAAE,oXAAoX,EAAE,WAAW,EAAE,qBAAqB,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAChgB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { getFilterExpression } from '../../utils/filters.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const searchLiteInputSchema = z.object({
|
|
4
|
+
search_text: z.string().optional().describe('Free-text query (e.g., “NVDA”, “NVIDIA”, partial ticker, 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 in the response contains only the specified fields. When not provided or set to null, the full field set is returned. "symbol" and "logo" are always returned regardless of the value passed.`),
|
|
6
|
+
quote_types: z.array(z.enum(['mutualfund', 'etf', 'stock'])).optional().describe('Controls which asset types are included in the search. If none are provided, all supported asset types are returned.'),
|
|
7
|
+
symbols: z.array(z.string()).optional().describe(`A list of ticker symbols to retrieve. When provided, the response returns only the specified tickers. If a symbol does not exist, it is excluded from the results.`),
|
|
8
|
+
limit: z.number().min(1).max(5000).default(10).optional().describe('Maximum number of matched items returned.'),
|
|
9
|
+
offset: z.number().min(0).optional().describe('Pagination offset (0-based).'),
|
|
10
|
+
filters: getFilterExpression().optional().describe(`Optional filter expressions.
|
|
11
|
+
Each filter condition is defined as: [field, operator, value]. Conditions can be combined using logical operators and/or.
|
|
12
|
+
|
|
13
|
+
Supported operators:
|
|
14
|
+
|
|
15
|
+
Numeric fields:
|
|
16
|
+
|
|
17
|
+
> - greater than
|
|
18
|
+
>= - greater than or equal
|
|
19
|
+
< - less than
|
|
20
|
+
<= - less than or equal
|
|
21
|
+
= - equals
|
|
22
|
+
<> - not equal
|
|
23
|
+
String fields:
|
|
24
|
+
|
|
25
|
+
like – pattern match (requires % as a wildcard)
|
|
26
|
+
not_like - pattern does not match (requires % as a wildcard)
|
|
27
|
+
contains - value exists in string
|
|
28
|
+
not_contains - value does not exist in string
|
|
29
|
+
startswith - string starts with value
|
|
30
|
+
endswith - string ends with value
|
|
31
|
+
% usage examples:
|
|
32
|
+
|
|
33
|
+
%abc% - matches any string containing "abc"
|
|
34
|
+
abc% - matches any string starting with "abc"
|
|
35
|
+
%abc - matches any string ending with "abc"
|
|
36
|
+
Example:
|
|
37
|
+
|
|
38
|
+
"filters": [
|
|
39
|
+
"short_name", "contains", "Market"
|
|
40
|
+
]`),
|
|
41
|
+
sort_by: z.array(z.object({
|
|
42
|
+
selector: z.string().describe('Metric used for sorting (e.g., amount_usd)'),
|
|
43
|
+
desc: z.boolean().describe('Sorting direction (true for descending, false for ascending).'),
|
|
44
|
+
})).optional().describe(`Optional sorting configuration for result items. Each sorting setup is defined as [selector, desc]:
|
|
45
|
+
|
|
46
|
+
selector - Metric used for sorting (e.g., amount_usd).
|
|
47
|
+
desc - Sorting direction (true for descending, false for ascending).
|
|
48
|
+
Sortings can be combined using ,.
|
|
49
|
+
|
|
50
|
+
Example:
|
|
51
|
+
|
|
52
|
+
{
|
|
53
|
+
"selector": "amount_usd",
|
|
54
|
+
"desc": true
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
`),
|
|
58
|
+
has_public_financial_reports: z.boolean().optional().describe('Indicates whether the company provides public financial statements.'),
|
|
59
|
+
show_tickers_without_company_name: z.boolean().optional().describe('Include tickers with missing names. true - include tickers even if the company/fund name is missing; false - exclude tickers without a company/fund name.'),
|
|
60
|
+
hide_tickers_with_company_name: z.boolean().optional().describe('Exclude tickers with available names. true - exclude tickers with a company/fund name; false - include tickers with a company/fund name.'),
|
|
61
|
+
tag: z.string().max(255).optional().describe('User-defined request identifier.'),
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/tools/search-lite/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;IACtH,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC1D,0QAA0Q,CAC1Q;IACD,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sHAAsH,CAAC;IACxM,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC/C,oKAAoK,CACpK;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAC/G,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IAC7E,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BK,CACL;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CACf,CAAC,CAAC,MAAM,CAAC;QACR,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;QAC3E,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;KAC3F,CAAC,CACF,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACpB;;;;;;;;;;;;;IAaE,CACF;IACD,4BAA4B,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qEAAqE,CAAC;IACpI,iCAAiC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2JAA2J,CAAC;IAC/N,8BAA8B,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0IAA0I,CAAC;IAC3M,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;CAChF,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/search-lite/types.ts"],"names":[],"mappings":""}
|
|
@@ -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":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/tools/summary-lite/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 { summaryLiteInputSchema } from './schema.js';
|
|
2
|
+
import { summaryLiteHandler } from './handler.js';
|
|
3
|
+
export function registerSummaryLiteTool(server, client) {
|
|
4
|
+
server.registerTool('get_summary_lite', { description: 'Returns a focused snapshot of key identification, market, and fundamental data for a single asset symbol. Retrieves core identification, current pricing, key valuation metrics, and fundamental data. The response field set is fixed, but it is possible to control which fields are included through the select_identifiers parameter. For a comprehensive field set use the /v1/summary endpoint.', inputSchema: summaryLiteInputSchema }, (input) => summaryLiteHandler(input, client));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/summary-lite/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,uYAAuY,EAAE,WAAW,EAAE,sBAAsB,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACthB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const summaryLiteInputSchema = z.object({
|
|
3
|
+
symbol: z.string().describe('Asset identifier (ticker symbol).'),
|
|
4
|
+
select_identifiers: z.array(z.string()).optional().describe(`A list of field names to include in the response. When provided, the response contains only the specified fields. When not provided or set to null, the full field set is returned. "symbol" and "logo" are always returned regardless of the value passed.`),
|
|
5
|
+
tag: z.string().max(255).optional().describe('User-defined request identifier.'),
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/tools/summary-lite/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAChE,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC1D,6PAA6P,CAC7P;IACD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;CAChF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/summary-lite/types.ts"],"names":[],"mappings":""}
|
package/build/transports/http.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
3
3
|
import { createServer } from '../server.js';
|
|
4
|
-
const AUTH_SERVER_URL = process.env.AUTH_SERVER_URL ?? '
|
|
4
|
+
const AUTH_SERVER_URL = process.env.AUTH_SERVER_URL ?? 'https://data.finimpulse.com';
|
|
5
5
|
const STATIC_API_TOKEN = process.env.API_TOKEN ?? '';
|
|
6
6
|
const apiTokenCache = new Map();
|
|
7
7
|
async function exchangeOAuthToken(oauthToken) {
|
|
@@ -53,6 +53,7 @@ export async function handleMcpRequest(req, res) {
|
|
|
53
53
|
}
|
|
54
54
|
export async function runHttp() {
|
|
55
55
|
const app = express();
|
|
56
|
+
app.set('trust proxy', true);
|
|
56
57
|
app.use(express.json());
|
|
57
58
|
if (!STATIC_API_TOKEN) {
|
|
58
59
|
app.get('/.well-known/oauth-protected-resource', (req, res) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"AAAA,OAAO,OAA4C,MAAM,SAAS,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"AAAA,OAAO,OAA4C,MAAM,SAAS,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,6BAA6B,CAAC;AACrF,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;AACrD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEhD,KAAK,UAAU,kBAAkB,CAAC,UAAkB;IACnD,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC7C,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,IAAI,CAAC;QACJ,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,eAAe,gBAAgB,EAAE;YAC3D,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,UAAU,EAAE,EAAE;SAClD,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC;QACzB,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAA4C,CAAC;QACxE,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,CA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
|
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,MAA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C,KAAK,CACb,CAAC,CAAC,MAAM,CAAC;QACR,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,eAAe,IAAI,CAAC;QACnF,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;KAC3F,CAAC,CACF,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACpB,kIAAkI,YAAY,CAAC,CAAC,CAAC,GAAG,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAC1K,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "finimpulse-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "MCP server for FinImpulse financial market data API",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -23,8 +23,20 @@
|
|
|
23
23
|
"type": "git",
|
|
24
24
|
"url": "git+https://github.com/finimpulse/mcp-server-typescript.git"
|
|
25
25
|
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
|
|
26
|
+
"keywords": [
|
|
27
|
+
"mcp",
|
|
28
|
+
"model-context-protocol",
|
|
29
|
+
"finimpulse",
|
|
30
|
+
"finance",
|
|
31
|
+
"financial-data",
|
|
32
|
+
"stocks",
|
|
33
|
+
"etf",
|
|
34
|
+
"mutual-funds",
|
|
35
|
+
"market-data",
|
|
36
|
+
"ai",
|
|
37
|
+
"llm"
|
|
38
|
+
],
|
|
39
|
+
"author": "FinImpulse",
|
|
28
40
|
"license": "ISC",
|
|
29
41
|
"dependencies": {
|
|
30
42
|
"@modelcontextprotocol/sdk": "^1.26.0",
|