finimpulse-mcp-server 1.0.0 → 1.1.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 +18 -1
- package/build/tools/analysis/analysts/handler.js +4 -0
- package/build/tools/analysis/analysts/handler.js.map +1 -0
- package/build/tools/analysis/analysts/index.js +9 -0
- package/build/tools/analysis/analysts/index.js.map +1 -0
- package/build/tools/analysis/analysts/schema.js +23 -0
- package/build/tools/analysis/analysts/schema.js.map +1 -0
- package/build/tools/analysis/analysts/types.js +2 -0
- package/build/tools/analysis/analysts/types.js.map +1 -0
- package/build/tools/analysis/earnings/handler.js +4 -0
- package/build/tools/analysis/earnings/handler.js.map +1 -0
- package/build/tools/analysis/earnings/index.js +9 -0
- package/build/tools/analysis/earnings/index.js.map +1 -0
- package/build/tools/analysis/earnings/schema.js +41 -0
- package/build/tools/analysis/earnings/schema.js.map +1 -0
- package/build/tools/analysis/earnings/types.js +2 -0
- package/build/tools/analysis/earnings/types.js.map +1 -0
- package/build/tools/analysis/recommendations/handler.js +4 -0
- package/build/tools/analysis/recommendations/handler.js.map +1 -0
- package/build/tools/analysis/recommendations/index.js +9 -0
- package/build/tools/analysis/recommendations/index.js.map +1 -0
- package/build/tools/analysis/recommendations/schema.js +27 -0
- package/build/tools/analysis/recommendations/schema.js.map +1 -0
- package/build/tools/analysis/recommendations/types.js +2 -0
- package/build/tools/analysis/recommendations/types.js.map +1 -0
- package/build/tools/analysis/upgrades-downgrades/handler.js +4 -0
- package/build/tools/analysis/upgrades-downgrades/handler.js.map +1 -0
- package/build/tools/analysis/upgrades-downgrades/index.js +9 -0
- package/build/tools/analysis/upgrades-downgrades/index.js.map +1 -0
- package/build/tools/analysis/upgrades-downgrades/schema.js +27 -0
- package/build/tools/analysis/upgrades-downgrades/schema.js.map +1 -0
- package/build/tools/analysis/upgrades-downgrades/types.js +2 -0
- package/build/tools/analysis/upgrades-downgrades/types.js.map +1 -0
- package/build/tools/index.js +14 -0
- package/build/tools/index.js.map +1 -1
- package/build/tools/options/chain/handler.js +4 -0
- package/build/tools/options/chain/handler.js.map +1 -0
- package/build/tools/options/chain/index.js +9 -0
- package/build/tools/options/chain/index.js.map +1 -0
- package/build/tools/options/chain/schema.js +25 -0
- package/build/tools/options/chain/schema.js.map +1 -0
- package/build/tools/options/chain/types.js +2 -0
- package/build/tools/options/chain/types.js.map +1 -0
- package/build/tools/options/contracts/handler.js +4 -0
- package/build/tools/options/contracts/handler.js.map +1 -0
- package/build/tools/options/contracts/index.js +9 -0
- package/build/tools/options/contracts/index.js.map +1 -0
- package/build/tools/options/contracts/schema.js +5 -0
- package/build/tools/options/contracts/schema.js.map +1 -0
- package/build/tools/options/contracts/types.js +2 -0
- package/build/tools/options/contracts/types.js.map +1 -0
- package/build/tools/options/expirations/handler.js +4 -0
- package/build/tools/options/expirations/handler.js.map +1 -0
- package/build/tools/options/expirations/index.js +9 -0
- package/build/tools/options/expirations/index.js.map +1 -0
- package/build/tools/options/expirations/schema.js +5 -0
- package/build/tools/options/expirations/schema.js.map +1 -0
- package/build/tools/options/expirations/types.js +2 -0
- package/build/tools/options/expirations/types.js.map +1 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FinImpulse MCP Server
|
|
2
2
|
|
|
3
|
-
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that provides structured financial market data to AI systems and development tools through the [FinImpulse API](https://finimpulse.com).
|
|
3
|
+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that provides structured financial market data to AI systems and development tools through the [FinImpulse API](https://finimpulse.com/api/).
|
|
4
4
|
|
|
5
5
|
It allows AI systems to access FinImpulse data — including stocks, ETFs, mutual funds, fundamentals, and market indicators — using a standardized MCP interface. The server acts as a bridge between the FinImpulse API and any MCP-compatible client, enabling LLMs and automation tools to retrieve financial data in a consistent format without building custom integrations.
|
|
6
6
|
|
|
@@ -219,6 +219,23 @@ API_TOKEN=your-api-token npx finimpulse-mcp-server
|
|
|
219
219
|
| `get_holdings_general` | Portfolio composition and holdings-level aggregates: asset allocation, sector exposure. |
|
|
220
220
|
| `get_holdings_top_holdings` | Top holdings list with ticker, name, and weight as % of total net assets. |
|
|
221
221
|
|
|
222
|
+
### Analyst Coverage & Ratings
|
|
223
|
+
|
|
224
|
+
| Tool | Description |
|
|
225
|
+
|------|-------------|
|
|
226
|
+
| `get_analysis_analysts` | Analyst coverage records per analyst: scores, ratings, sentiment, price targets, and announcement dates. |
|
|
227
|
+
| `get_analysis_earnings` | Earnings and estimate data: EPS actuals, earnings vs. revenue, EPS trends, revisions, and growth metrics. |
|
|
228
|
+
| `get_analysis_recommendations` | Analyst recommendation breakdown over time: Strong Buy, Buy, Hold, Sell, and Strong Sell counts per period. |
|
|
229
|
+
| `get_analysis_upgrades_downgrades` | Analyst rating action feed: upgrades, downgrades, reiterations, and price target changes with from/to grades. |
|
|
230
|
+
|
|
231
|
+
### Options
|
|
232
|
+
|
|
233
|
+
| Tool | Description |
|
|
234
|
+
|------|-------------|
|
|
235
|
+
| `get_options_expirations` | Available option expiration dates for an underlying symbol. |
|
|
236
|
+
| `get_options_chain` | Full option chain for a given expiration: calls and puts with pricing, bid/ask, volume, open interest, and implied volatility. |
|
|
237
|
+
| `get_options_contracts` | Single option contract snapshot: pricing, bid/ask, volume, open interest, implied volatility, moneyness, and Greeks. |
|
|
238
|
+
|
|
222
239
|
## Configuration
|
|
223
240
|
|
|
224
241
|
| Environment Variable | Required | Description |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/analysis/analysts/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,KAA4B,EAAE,MAAiB;IAC5F,OAAO,MAAM,CAAC,OAAO,CAA2B,uBAAuB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { analysisAnalystsInputSchema } from './schema.js';
|
|
2
|
+
import { analysisAnalystsHandler } from './handler.js';
|
|
3
|
+
export function registerAnalysisAnalystsTool(server, client) {
|
|
4
|
+
server.registerTool('get_analysis_analysts', {
|
|
5
|
+
description: 'Returns a paginated list of analyst-level coverage records for an asset, including per-analyst scores, current rating, sentiment, price target, and latest announcement date. Primarily intended for stocks — ETFs and mutual funds may return empty results. Use for populating an Analysts table in the Analysis module, filtering by sentiment, or sorting by announcement date.',
|
|
6
|
+
inputSchema: analysisAnalystsInputSchema,
|
|
7
|
+
}, (input) => analysisAnalystsHandler(input, client));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/analysis/analysts/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,CAClB,uBAAuB,EACvB;QACC,WAAW,EAAE,qXAAqX;QAClY,WAAW,EAAE,2BAA2B;KACxC,EACD,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,CACjD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterExpression } from '../../../utils/filters.js';
|
|
3
|
+
export const analysisAnalystsInputSchema = z.object({
|
|
4
|
+
symbol: z.string().min(1).describe('Asset identifier (ticker symbol).'),
|
|
5
|
+
limit: z.number().min(1).max(5000).default(10).optional()
|
|
6
|
+
.describe('Maximum number of analyst records to return.'),
|
|
7
|
+
offset: z.number().min(0).optional()
|
|
8
|
+
.describe('Pagination offset (0-based).'),
|
|
9
|
+
filters: getFilterExpression().optional().describe(`Optional filter expressions. Each condition is defined as [field, operator, value]. Conditions can be combined using "and"/"or".
|
|
10
|
+
|
|
11
|
+
Supported operators:
|
|
12
|
+
Numeric fields: >, >=, <, <=, =, <>
|
|
13
|
+
String fields: like, not_like, contains, not_contains, startswith, endswith
|
|
14
|
+
|
|
15
|
+
Example: [["rating_sentiment", "=", 1], "and", ["analyst", "<>", "Wedbush"]]`),
|
|
16
|
+
sort_by: z.array(z.object({
|
|
17
|
+
selector: z.string().describe('Field to sort by (e.g., announcement_date).'),
|
|
18
|
+
desc: z.boolean().describe('true = descending, false = ascending.'),
|
|
19
|
+
})).optional().describe('Sort configuration. Example: [{"selector": "announcement_date", "desc": true}]'),
|
|
20
|
+
tag: z.string().max(255).optional()
|
|
21
|
+
.describe('User-defined request identifier returned in the response (max 255 characters).'),
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/analysis/analysts/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAE9D,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACvE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;SACvD,QAAQ,CAAC,8CAA8C,CAAC;IAC1D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SAClC,QAAQ,CAAC,8BAA8B,CAAC;IAC1C,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD;;;;;;6EAM2E,CAC3E;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;QAC5E,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;KACnE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gFAAgF,CAAC;IACzG,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;SACjC,QAAQ,CAAC,gFAAgF,CAAC;CAC5F,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/analysis/analysts/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/analysis/earnings/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,KAA4B,EAAE,MAAiB;IAC5F,OAAO,MAAM,CAAC,OAAO,CAA2B,uBAAuB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { analysisEarningsInputSchema } from './schema.js';
|
|
2
|
+
import { analysisEarningsHandler } from './handler.js';
|
|
3
|
+
export function registerAnalysisEarningsTool(server, client) {
|
|
4
|
+
server.registerTool('get_analysis_earnings', {
|
|
5
|
+
description: 'Returns earnings and estimate records for an asset, including EPS actuals, earnings vs. revenue, EPS trends, revisions, and growth metrics. Supports filtering by type and accounting methodology (GAAP/normalized). Primarily intended for stocks — ETFs and mutual funds may return empty results. Use for populating Earnings & Estimates dashboards or feeding earnings analytics pipelines.',
|
|
6
|
+
inputSchema: analysisEarningsInputSchema,
|
|
7
|
+
}, (input) => analysisEarningsHandler(input, client));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/analysis/earnings/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,CAClB,uBAAuB,EACvB;QACC,WAAW,EAAE,kYAAkY;QAC/Y,WAAW,EAAE,2BAA2B;KACxC,EACD,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,CACjD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterExpression } from '../../../utils/filters.js';
|
|
3
|
+
export const analysisEarningsInputSchema = z.object({
|
|
4
|
+
symbol: z.string().min(1).describe('Asset identifier (ticker symbol).'),
|
|
5
|
+
types: z.array(z.enum([
|
|
6
|
+
'eps_actual',
|
|
7
|
+
'earnings_revenue',
|
|
8
|
+
'earnings',
|
|
9
|
+
'revenue',
|
|
10
|
+
'eps_trend',
|
|
11
|
+
'eps_revisions',
|
|
12
|
+
'growth',
|
|
13
|
+
])).optional().describe('List of analysis record types to return. If omitted, all types are returned. ' +
|
|
14
|
+
'Supported values: eps_actual, earnings_revenue, earnings, revenue, eps_trend, eps_revisions, growth.'),
|
|
15
|
+
methodologies: z.array(z.enum(['gaap', 'normalized'])).optional()
|
|
16
|
+
.describe('Accounting methodologies to filter earnings data. Values: "gaap", "normalized".'),
|
|
17
|
+
comparison_symbols: z.array(z.string()).optional()
|
|
18
|
+
.describe('Tickers or indices to include in growth estimate comparisons. S&P 500 is always included by default.'),
|
|
19
|
+
start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
20
|
+
.describe('Start date filter (YYYY-MM-DD).'),
|
|
21
|
+
end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
22
|
+
.describe('End date filter (YYYY-MM-DD).'),
|
|
23
|
+
limit: z.number().min(1).max(5000).default(10).optional()
|
|
24
|
+
.describe('Maximum number of items to return.'),
|
|
25
|
+
offset: z.number().min(0).optional()
|
|
26
|
+
.describe('Pagination offset (0-based).'),
|
|
27
|
+
filters: getFilterExpression().optional().describe(`Optional filter expressions. Each condition is defined as [field, operator, value]. Conditions can be combined using "and"/"or".
|
|
28
|
+
|
|
29
|
+
Supported operators:
|
|
30
|
+
Numeric fields: >, >=, <, <=, =, <>
|
|
31
|
+
String fields: like, not_like, contains, not_contains, startswith, endswith
|
|
32
|
+
|
|
33
|
+
Example: [["actual", "=", 1.57], "and", ["surprise_pct", "<>", 4.52]]`),
|
|
34
|
+
sort_by: z.array(z.object({
|
|
35
|
+
selector: z.string().describe('Field to sort by (e.g., date).'),
|
|
36
|
+
desc: z.boolean().describe('true = descending, false = ascending.'),
|
|
37
|
+
})).optional().describe('Sort configuration. Example: [{"selector": "date", "desc": true}]'),
|
|
38
|
+
tag: z.string().max(255).optional()
|
|
39
|
+
.describe('User-defined request identifier returned in the response (max 255 characters).'),
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/analysis/earnings/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;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SAClC,QAAQ,CAAC,8BAA8B,CAAC;IAC1C,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD;;;;;;sEAMoE,CACpE;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QAC/D,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;KACnE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mEAAmE,CAAC;IAC5F,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;SACjC,QAAQ,CAAC,gFAAgF,CAAC;CAC5F,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/analysis/earnings/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/analysis/recommendations/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAAC,KAAmC,EAAE,MAAiB;IAC1G,OAAO,MAAM,CAAC,OAAO,CAAkC,8BAA8B,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACvG,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { analysisRecommendationsInputSchema } from './schema.js';
|
|
2
|
+
import { analysisRecommendationsHandler } from './handler.js';
|
|
3
|
+
export function registerAnalysisRecommendationsTool(server, client) {
|
|
4
|
+
server.registerTool('get_analysis_recommendations', {
|
|
5
|
+
description: 'Returns analyst recommendation breakdown for a ticker over time (periodic snapshots), including counts for Strong Buy, Buy, Hold, Sell, and Strong Sell. Primarily intended for stocks — ETFs and mutual funds may return empty results. Use for building Recommendations charts or tracking sentiment changes over time.',
|
|
6
|
+
inputSchema: analysisRecommendationsInputSchema,
|
|
7
|
+
}, (input) => analysisRecommendationsHandler(input, client));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/analysis/recommendations/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kCAAkC,EAAC,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAC,8BAA8B,EAAC,MAAM,cAAc,CAAC;AAG5D,MAAM,UAAU,mCAAmC,CAAC,MAAiB,EAAE,MAAiB;IACvF,MAAM,CAAC,YAAY,CAClB,8BAA8B,EAC9B;QACC,WAAW,EAAE,2TAA2T;QACxU,WAAW,EAAE,kCAAkC;KAC/C,EACD,CAAC,KAAK,EAAE,EAAE,CAAC,8BAA8B,CAAC,KAAK,EAAE,MAAM,CAAC,CACxD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterExpression } from '../../../utils/filters.js';
|
|
3
|
+
export const analysisRecommendationsInputSchema = z.object({
|
|
4
|
+
symbol: z.string().min(1).describe('Asset identifier (ticker symbol).'),
|
|
5
|
+
start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
6
|
+
.describe('Start date filter (YYYY-MM-DD).'),
|
|
7
|
+
end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
8
|
+
.describe('End date filter (YYYY-MM-DD).'),
|
|
9
|
+
limit: z.number().min(1).max(5000).default(10).optional()
|
|
10
|
+
.describe('Maximum number of recommendation snapshots to return.'),
|
|
11
|
+
offset: z.number().min(0).optional()
|
|
12
|
+
.describe('Pagination offset (0-based).'),
|
|
13
|
+
filters: getFilterExpression().optional().describe(`Optional filter expressions. Each condition is defined as [field, operator, value]. Conditions can be combined using "and"/"or".
|
|
14
|
+
|
|
15
|
+
Supported operators:
|
|
16
|
+
Numeric fields: >, >=, <, <=, =, <>
|
|
17
|
+
String fields: like, not_like, contains, not_contains, startswith, endswith
|
|
18
|
+
|
|
19
|
+
Example: [["buy", "=", 24], "and", ["hold", "<>", 10]]`),
|
|
20
|
+
sort_by: z.array(z.object({
|
|
21
|
+
selector: z.string().describe('Field to sort by (e.g., date).'),
|
|
22
|
+
desc: z.boolean().describe('true = descending, false = ascending.'),
|
|
23
|
+
})).optional().describe('Sort configuration. Example: [{"selector": "date", "desc": true}]'),
|
|
24
|
+
tag: z.string().max(255).optional()
|
|
25
|
+
.describe('User-defined request identifier returned in the response (max 255 characters).'),
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/analysis/recommendations/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAE9D,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACvE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;SAC5D,QAAQ,CAAC,iCAAiC,CAAC;IAC7C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;SAC1D,QAAQ,CAAC,+BAA+B,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;SACvD,QAAQ,CAAC,uDAAuD,CAAC;IACnE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SAClC,QAAQ,CAAC,8BAA8B,CAAC;IAC1C,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD;;;;;;uDAMqD,CACrD;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QAC/D,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;KACnE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mEAAmE,CAAC;IAC5F,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;SACjC,QAAQ,CAAC,gFAAgF,CAAC;CAC5F,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/analysis/recommendations/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/analysis/upgrades-downgrades/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,KAAsC,EAAE,MAAiB;IAChH,OAAO,MAAM,CAAC,OAAO,CAAqC,kCAAkC,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC9G,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { analysisUpgradesDowngradesInputSchema } from './schema.js';
|
|
2
|
+
import { analysisUpgradesDowngradesHandler } from './handler.js';
|
|
3
|
+
export function registerAnalysisUpgradesDowngradesTool(server, client) {
|
|
4
|
+
server.registerTool('get_analysis_upgrades_downgrades', {
|
|
5
|
+
description: 'Returns a feed of analyst rating actions for a ticker, including upgrades, downgrades, reiterations, and price target changes (from/to grade, action type, current and prior price targets). Primarily intended for stocks — ETFs and mutual funds rarely have analyst rating coverage. Use for populating an Upgrades & Downgrades table or tracking rating action feeds.',
|
|
6
|
+
inputSchema: analysisUpgradesDowngradesInputSchema,
|
|
7
|
+
}, (input) => analysisUpgradesDowngradesHandler(input, client));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/analysis/upgrades-downgrades/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,qCAAqC,EAAC,MAAM,aAAa,CAAC;AAClE,OAAO,EAAC,iCAAiC,EAAC,MAAM,cAAc,CAAC;AAG/D,MAAM,UAAU,sCAAsC,CAAC,MAAiB,EAAE,MAAiB;IAC1F,MAAM,CAAC,YAAY,CAClB,kCAAkC,EAClC;QACC,WAAW,EAAE,4WAA4W;QACzX,WAAW,EAAE,qCAAqC;KAClD,EACD,CAAC,KAAK,EAAE,EAAE,CAAC,iCAAiC,CAAC,KAAK,EAAE,MAAM,CAAC,CAC3D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterExpression } from '../../../utils/filters.js';
|
|
3
|
+
export const analysisUpgradesDowngradesInputSchema = z.object({
|
|
4
|
+
symbol: z.string().min(1).describe('Asset identifier (ticker symbol).'),
|
|
5
|
+
start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
6
|
+
.describe('Start date filter (YYYY-MM-DD).'),
|
|
7
|
+
end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
8
|
+
.describe('End date filter (YYYY-MM-DD).'),
|
|
9
|
+
limit: z.number().min(1).max(5000).default(10).optional()
|
|
10
|
+
.describe('Maximum number of analyst action records to return.'),
|
|
11
|
+
offset: z.number().min(0).optional()
|
|
12
|
+
.describe('Pagination offset (0-based).'),
|
|
13
|
+
filters: getFilterExpression().optional().describe(`Optional filter expressions. Each condition is defined as [field, operator, value]. Conditions can be combined using "and"/"or".
|
|
14
|
+
|
|
15
|
+
Supported operators:
|
|
16
|
+
Numeric fields: >, >=, <, <=, =, <>
|
|
17
|
+
String fields: like, not_like, contains, not_contains, startswith, endswith
|
|
18
|
+
|
|
19
|
+
Example: [["prior_price_target", "=", 330], "and", ["firm", "<>", "Wedbush"]]`),
|
|
20
|
+
sort_by: z.array(z.object({
|
|
21
|
+
selector: z.string().describe('Field to sort by (e.g., grade_date).'),
|
|
22
|
+
desc: z.boolean().describe('true = descending, false = ascending.'),
|
|
23
|
+
})).optional().describe('Sort configuration. Example: [{"selector": "grade_date", "desc": true}]'),
|
|
24
|
+
tag: z.string().max(255).optional()
|
|
25
|
+
.describe('User-defined request identifier returned in the response (max 255 characters).'),
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/analysis/upgrades-downgrades/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAE9D,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACvE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;SAC5D,QAAQ,CAAC,iCAAiC,CAAC;IAC7C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;SAC1D,QAAQ,CAAC,+BAA+B,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;SACvD,QAAQ,CAAC,qDAAqD,CAAC;IACjE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SAClC,QAAQ,CAAC,8BAA8B,CAAC;IAC1C,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD;;;;;;8EAM4E,CAC5E;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QACrE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;KACnE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;IAClG,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;SACjC,QAAQ,CAAC,gFAAgF,CAAC;CAC5F,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/analysis/upgrades-downgrades/types.ts"],"names":[],"mappings":""}
|
package/build/tools/index.js
CHANGED
|
@@ -3,6 +3,10 @@ import { registerHistoriesTool } from './historical/index.js';
|
|
|
3
3
|
import { registerSummaryTool } from './summary/index.js';
|
|
4
4
|
import { registerProfileTool } from './profile/index.js';
|
|
5
5
|
import { registerNewsTool } from './news/index.js';
|
|
6
|
+
import { registerAnalysisAnalystsTool } from './analysis/analysts/index.js';
|
|
7
|
+
import { registerAnalysisEarningsTool } from './analysis/earnings/index.js';
|
|
8
|
+
import { registerAnalysisRecommendationsTool } from './analysis/recommendations/index.js';
|
|
9
|
+
import { registerAnalysisUpgradesDowngradesTool } from './analysis/upgrades-downgrades/index.js';
|
|
6
10
|
import { registerHoldersGeneralTool } from './holders/general/index.js';
|
|
7
11
|
import { registerHoldersInstitutionalTool } from './holders/institutional/index.js';
|
|
8
12
|
import { registerHoldersMutualFundsTool } from './holders/mutual-funds/index.js';
|
|
@@ -18,12 +22,19 @@ import { registerStatisticsRisksTool } from './statistics/risks/index.js';
|
|
|
18
22
|
import { registerStatisticsAnnualReturnsTool } from './statistics/annual-returns/index.js';
|
|
19
23
|
import { registerHoldingsGeneralTool } from './holdings/general/index.js';
|
|
20
24
|
import { registerHoldingsTopHoldingsTool } from './holdings/top-holdings/index.js';
|
|
25
|
+
import { registerOptionsChainTool } from './options/chain/index.js';
|
|
26
|
+
import { registerOptionsContractsTool } from './options/contracts/index.js';
|
|
27
|
+
import { registerOptionsExpirationsTool } from './options/expirations/index.js';
|
|
21
28
|
export function registerAllTools(server, client) {
|
|
22
29
|
registerSearchTool(server, client);
|
|
23
30
|
registerHistoriesTool(server, client);
|
|
24
31
|
registerSummaryTool(server, client);
|
|
25
32
|
registerProfileTool(server, client);
|
|
26
33
|
registerNewsTool(server, client);
|
|
34
|
+
registerAnalysisAnalystsTool(server, client);
|
|
35
|
+
registerAnalysisEarningsTool(server, client);
|
|
36
|
+
registerAnalysisRecommendationsTool(server, client);
|
|
37
|
+
registerAnalysisUpgradesDowngradesTool(server, client);
|
|
27
38
|
registerHoldersGeneralTool(server, client);
|
|
28
39
|
registerHoldersInstitutionalTool(server, client);
|
|
29
40
|
registerHoldersMutualFundsTool(server, client);
|
|
@@ -39,5 +50,8 @@ export function registerAllTools(server, client) {
|
|
|
39
50
|
registerStatisticsAnnualReturnsTool(server, client);
|
|
40
51
|
registerHoldingsGeneralTool(server, client);
|
|
41
52
|
registerHoldingsTopHoldingsTool(server, client);
|
|
53
|
+
registerOptionsChainTool(server, client);
|
|
54
|
+
registerOptionsContractsTool(server, client);
|
|
55
|
+
registerOptionsExpirationsTool(server, client);
|
|
42
56
|
}
|
|
43
57
|
//# 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,qBAAqB,EAAC,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACjD,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,OAAO,EAAC,qCAAqC,EAAC,MAAM,wCAAwC,CAAC;AAC7F,OAAO,EAAC,kCAAkC,EAAC,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAAC,8BAA8B,EAAC,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAC,uCAAuC,EAAC,MAAM,0CAA0C,CAAC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AAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,uCAAuC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxD,6BAA6B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,qCAAqC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,kCAAkC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnD,8BAA8B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,uCAAuC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxD,6BAA6B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,mCAAmC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,+BAA+B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,8BAA8B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/options/chain/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAAwB,EAAE,MAAiB;IACpF,OAAO,MAAM,CAAC,OAAO,CAAuB,mBAAmB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { optionsChainInputSchema } from './schema.js';
|
|
2
|
+
import { optionsChainHandler } from './handler.js';
|
|
3
|
+
export function registerOptionsChainTool(server, client) {
|
|
4
|
+
server.registerTool('get_options_chain', {
|
|
5
|
+
description: 'Returns the full option chain for a single underlying ticker and expiration date, including all call and put contracts with pricing, bid/ask, volume, open interest, implied volatility, and moneyness. Applicable to stocks and ETFs with listed options — mutual funds are not supported. Use get_options_expirations first to discover valid expiration dates. Use for populating an options chain table or feeding strategy builders.',
|
|
6
|
+
inputSchema: optionsChainInputSchema,
|
|
7
|
+
}, (input) => optionsChainHandler(input, client));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/options/chain/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,uBAAuB,EAAC,MAAM,aAAa,CAAC;AACpD,OAAO,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAGjD,MAAM,UAAU,wBAAwB,CAAC,MAAiB,EAAE,MAAiB;IAC5E,MAAM,CAAC,YAAY,CAClB,mBAAmB,EACnB;QACC,WAAW,EAAE,2aAA2a;QACxb,WAAW,EAAE,uBAAuB;KACpC,EACD,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,CAC7C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getFilterExpression } from '../../../utils/filters.js';
|
|
3
|
+
export const optionsChainInputSchema = z.object({
|
|
4
|
+
symbol: z.string().min(1).describe('Asset identifier (ticker symbol).'),
|
|
5
|
+
expiration_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
6
|
+
.describe('Expiration date to retrieve (YYYY-MM-DD). Use get_options_expirations to discover valid dates.'),
|
|
7
|
+
limit: z.number().min(1).max(5000).default(10).optional()
|
|
8
|
+
.describe('Maximum number of contracts to return.'),
|
|
9
|
+
offset: z.number().min(0).optional()
|
|
10
|
+
.describe('Pagination offset (0-based).'),
|
|
11
|
+
filters: getFilterExpression().optional().describe(`Optional filter expressions. Each condition is defined as [field, operator, value]. Conditions can be combined using "and"/"or".
|
|
12
|
+
|
|
13
|
+
Supported operators:
|
|
14
|
+
Numeric fields: >, >=, <, <=, =, <>
|
|
15
|
+
String fields: like, not_like, contains, not_contains, startswith, endswith
|
|
16
|
+
|
|
17
|
+
Example: [["contract_size", "=", "REGULAR"], "and", ["bid", "<>", 0]]`),
|
|
18
|
+
sort_by: z.array(z.object({
|
|
19
|
+
selector: z.string().describe('Field to sort by (e.g., last_trade_date).'),
|
|
20
|
+
desc: z.boolean().describe('true = descending, false = ascending.'),
|
|
21
|
+
})).optional().describe('Sort configuration. Example: [{"selector": "last_trade_date", "desc": true}]'),
|
|
22
|
+
tag: z.string().max(255).optional()
|
|
23
|
+
.describe('User-defined request identifier returned in the response (max 255 characters).'),
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/options/chain/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAE9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACvE,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC;SACtD,QAAQ,CAAC,gGAAgG,CAAC;IAC5G,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;SACvD,QAAQ,CAAC,wCAAwC,CAAC;IACpD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SAClC,QAAQ,CAAC,8BAA8B,CAAC;IAC1C,OAAO,EAAE,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD;;;;;;sEAMoE,CACpE;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;QAC1E,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;KACnE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8EAA8E,CAAC;IACvG,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;SACjC,QAAQ,CAAC,gFAAgF,CAAC;CAC5F,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/options/chain/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/options/contracts/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,KAA4B,EAAE,MAAiB;IAC5F,OAAO,MAAM,CAAC,OAAO,CAA0B,uBAAuB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACxF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { optionsContractsInputSchema } from './schema.js';
|
|
2
|
+
import { optionsContractsHandler } from './handler.js';
|
|
3
|
+
export function registerOptionsContractsTool(server, client) {
|
|
4
|
+
server.registerTool('get_options_contracts', {
|
|
5
|
+
description: 'Returns a single option contract snapshot by its full contract identifier, including pricing, bid/ask, volume, open interest, implied volatility, moneyness, and Greeks (delta, gamma, theta, vega, rho). Applicable to stocks and ETFs with listed options — mutual funds are not supported. Use for contract detail panels, deep-link flows, or refreshing a single contract without reloading the full chain.',
|
|
6
|
+
inputSchema: optionsContractsInputSchema,
|
|
7
|
+
}, (input) => optionsContractsHandler(input, client));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/options/contracts/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,CAClB,uBAAuB,EACvB;QACC,WAAW,EAAE,kZAAkZ;QAC/Z,WAAW,EAAE,2BAA2B;KACxC,EACD,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,CACjD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/options/contracts/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8DAA8D,CAAC;CACzG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/options/contracts/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/options/expirations/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,KAA8B,EAAE,MAAiB;IAChG,OAAO,MAAM,CAAC,OAAO,CAA6B,2BAA2B,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACzH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { optionsExpirationsInputSchema } from './schema.js';
|
|
2
|
+
import { optionsExpirationsHandler } from './handler.js';
|
|
3
|
+
export function registerOptionsExpirationsTool(server, client) {
|
|
4
|
+
server.registerTool('get_options_expirations', {
|
|
5
|
+
description: 'Returns the list of available option expiration dates for a single underlying symbol. Applicable to stocks and ETFs with listed options — mutual funds are not supported. Use as the first step before calling get_options_chain to discover valid expiration dates, build expiration dropdowns, or check whether a symbol has options coverage.',
|
|
6
|
+
inputSchema: optionsExpirationsInputSchema,
|
|
7
|
+
}, (input) => optionsExpirationsHandler(input, client));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/options/expirations/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,6BAA6B,EAAC,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAC,yBAAyB,EAAC,MAAM,cAAc,CAAC;AAGvD,MAAM,UAAU,8BAA8B,CAAC,MAAiB,EAAE,MAAiB;IAClF,MAAM,CAAC,YAAY,CAClB,yBAAyB,EACzB;QACC,WAAW,EAAE,kVAAkV;QAC/V,WAAW,EAAE,6BAA6B;KAC1C,EACD,CAAC,KAAK,EAAE,EAAE,CAAC,yBAAyB,CAAC,KAAK,EAAE,MAAM,CAAC,CACnD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/options/expirations/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,qFAAqF,CAAC;CACzH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/options/expirations/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "finimpulse-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "MCP server for FinImpulse financial market data API",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsc && chmod 755 build/index.js",
|
|
12
12
|
"cli": "node build/index.js",
|
|
13
|
-
"http": "MCP_TRANSPORT=http node build/index.js"
|
|
13
|
+
"http": "MCP_TRANSPORT=http node build/index.js",
|
|
14
|
+
"inspect": "npx @modelcontextprotocol/inspector node build/index.js",
|
|
15
|
+
"inspect:cli": "npx @modelcontextprotocol/inspector --cli node build/index.js",
|
|
16
|
+
"test": "vitest run",
|
|
17
|
+
"test:watch": "vitest"
|
|
14
18
|
},
|
|
15
19
|
"files": [
|
|
16
20
|
"build"
|
|
@@ -31,6 +35,7 @@
|
|
|
31
35
|
"devDependencies": {
|
|
32
36
|
"@types/express": "^5.0.6",
|
|
33
37
|
"@types/node": "^25.2.3",
|
|
34
|
-
"typescript": "^5.9.3"
|
|
38
|
+
"typescript": "^5.9.3",
|
|
39
|
+
"vitest": "^4.1.5"
|
|
35
40
|
}
|
|
36
41
|
}
|