finimpulse-mcp-server 1.0.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -16
- 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 +22 -0
- package/build/tools/index.js.map +1 -1
- 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/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/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/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/package.json +22 -5
package/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
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
|
|
|
7
|
+
> **Hosted server available.** You can connect any Streamable HTTP MCP client directly to `https://mcp.finimpulse.com/mcp` and authenticate via OAuth — no API token setup required. See [Quick Start](#quick-start) below.
|
|
8
|
+
|
|
7
9
|
## How It Works
|
|
8
10
|
|
|
9
11
|
```
|
|
@@ -40,12 +42,96 @@ The MCP server translates tool calls from AI clients into FinImpulse API request
|
|
|
40
42
|
|
|
41
43
|
## Requirements
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
You can use FinImpulse MCP in two ways:
|
|
46
|
+
|
|
47
|
+
- **Hosted (recommended):** no requirements other than a [FinImpulse account](https://app.finimpulse.com). Authentication is handled via OAuth in the browser — no manual API token management.
|
|
48
|
+
- **Local (stdio):** [Node.js](https://nodejs.org/) 18+ and a FinImpulse API token (obtain it in the [FinImpulse Dashboard](https://app.finimpulse.com/developer/settings)).
|
|
45
49
|
|
|
46
50
|
## Quick Start
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
There are two ways to connect: use the hosted server at `https://mcp.finimpulse.com/mcp` (Streamable HTTP + OAuth), or run the server locally via `npx`.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### Option 1 — Hosted server (OAuth)
|
|
57
|
+
|
|
58
|
+
The FinImpulse-hosted MCP endpoint is available at:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
https://mcp.finimpulse.com/mcp
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
It uses the [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) transport and OAuth 2.0 — when you first connect, your MCP client will open a browser window to authorize access against your FinImpulse account. The client then stores the access token and forwards it automatically on every request. No API token needs to be configured by hand.
|
|
65
|
+
|
|
66
|
+
#### Cursor
|
|
67
|
+
|
|
68
|
+
Open `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project-level) and add:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"finimpulse": {
|
|
74
|
+
"url": "https://mcp.finimpulse.com/mcp"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### VS Code (Copilot)
|
|
81
|
+
|
|
82
|
+
Open your VS Code `settings.json` and add:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"mcp": {
|
|
87
|
+
"servers": {
|
|
88
|
+
"finimpulse": {
|
|
89
|
+
"url": "https://mcp.finimpulse.com/mcp"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
#### Claude Desktop
|
|
97
|
+
|
|
98
|
+
Claude Desktop does not yet speak Streamable HTTP natively. Bridge through `mcp-remote`, which handles the OAuth flow in your browser and forwards requests over stdio:
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"mcpServers": {
|
|
103
|
+
"finimpulse": {
|
|
104
|
+
"command": "npx",
|
|
105
|
+
"args": ["-y", "mcp-remote", "https://mcp.finimpulse.com/mcp"]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### ChatGPT
|
|
112
|
+
|
|
113
|
+
In the ChatGPT desktop app go to **Settings → Connectors → Add custom connector** and enter:
|
|
114
|
+
|
|
115
|
+
- URL: `https://mcp.finimpulse.com/mcp`
|
|
116
|
+
- Authentication: OAuth
|
|
117
|
+
|
|
118
|
+
#### Windsurf / Cline / other Streamable-HTTP clients
|
|
119
|
+
|
|
120
|
+
Any MCP client that supports the Streamable HTTP transport can use the URL directly:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
https://mcp.finimpulse.com/mcp
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
For clients that only support stdio, use the `mcp-remote` bridge shown in the Claude Desktop example.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### Option 2 — Local (stdio via npx)
|
|
131
|
+
|
|
132
|
+
If you prefer to run the server in-process on your machine, use the npm package. You'll need a FinImpulse API token from the [FinImpulse Dashboard](https://app.finimpulse.com/developer/settings).
|
|
133
|
+
|
|
134
|
+
#### Claude Desktop
|
|
49
135
|
|
|
50
136
|
Open `claude_desktop_config.json`:
|
|
51
137
|
|
|
@@ -69,7 +155,7 @@ Add the server configuration:
|
|
|
69
155
|
}
|
|
70
156
|
```
|
|
71
157
|
|
|
72
|
-
|
|
158
|
+
#### Claude Code
|
|
73
159
|
|
|
74
160
|
```bash
|
|
75
161
|
claude mcp add finimpulse -- npx -y finimpulse-mcp-server
|
|
@@ -77,11 +163,7 @@ claude mcp add finimpulse -- npx -y finimpulse-mcp-server
|
|
|
77
163
|
|
|
78
164
|
Then set the `API_TOKEN` environment variable or pass it inline.
|
|
79
165
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
ChatGPT supports MCP via its desktop app. Add the server in **Settings → MCP Servers** with the same `npx` command.
|
|
83
|
-
|
|
84
|
-
### Cursor
|
|
166
|
+
#### Cursor
|
|
85
167
|
|
|
86
168
|
Open `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project-level) and add:
|
|
87
169
|
|
|
@@ -99,7 +181,7 @@ Open `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project-level) and add
|
|
|
99
181
|
}
|
|
100
182
|
```
|
|
101
183
|
|
|
102
|
-
|
|
184
|
+
#### Windsurf
|
|
103
185
|
|
|
104
186
|
Open `~/.codeium/windsurf/mcp_config.json` and add:
|
|
105
187
|
|
|
@@ -117,7 +199,7 @@ Open `~/.codeium/windsurf/mcp_config.json` and add:
|
|
|
117
199
|
}
|
|
118
200
|
```
|
|
119
201
|
|
|
120
|
-
|
|
202
|
+
#### VS Code (Copilot)
|
|
121
203
|
|
|
122
204
|
Open your VS Code `settings.json` and add:
|
|
123
205
|
|
|
@@ -137,13 +219,13 @@ Open your VS Code `settings.json` and add:
|
|
|
137
219
|
}
|
|
138
220
|
```
|
|
139
221
|
|
|
140
|
-
|
|
222
|
+
#### Gemini CLI
|
|
141
223
|
|
|
142
224
|
```bash
|
|
143
225
|
gemini mcp add finimpulse -- npx -y finimpulse-mcp-server
|
|
144
226
|
```
|
|
145
227
|
|
|
146
|
-
|
|
228
|
+
#### Cline
|
|
147
229
|
|
|
148
230
|
Open Cline settings, go to **MCP Servers**, and add a new server with this config:
|
|
149
231
|
|
|
@@ -161,7 +243,7 @@ Open Cline settings, go to **MCP Servers**, and add a new server with this confi
|
|
|
161
243
|
}
|
|
162
244
|
```
|
|
163
245
|
|
|
164
|
-
|
|
246
|
+
#### Any MCP-Compatible Client (stdio)
|
|
165
247
|
|
|
166
248
|
```bash
|
|
167
249
|
API_TOKEN=your-api-token npx finimpulse-mcp-server
|
|
@@ -219,11 +301,32 @@ API_TOKEN=your-api-token npx finimpulse-mcp-server
|
|
|
219
301
|
| `get_holdings_general` | Portfolio composition and holdings-level aggregates: asset allocation, sector exposure. |
|
|
220
302
|
| `get_holdings_top_holdings` | Top holdings list with ticker, name, and weight as % of total net assets. |
|
|
221
303
|
|
|
304
|
+
### Analyst Coverage & Ratings
|
|
305
|
+
|
|
306
|
+
| Tool | Description |
|
|
307
|
+
|------|-------------|
|
|
308
|
+
| `get_analysis_analysts` | Analyst coverage records per analyst: scores, ratings, sentiment, price targets, and announcement dates. |
|
|
309
|
+
| `get_analysis_earnings` | Earnings and estimate data: EPS actuals, earnings vs. revenue, EPS trends, revisions, and growth metrics. |
|
|
310
|
+
| `get_analysis_recommendations` | Analyst recommendation breakdown over time: Strong Buy, Buy, Hold, Sell, and Strong Sell counts per period. |
|
|
311
|
+
| `get_analysis_upgrades_downgrades` | Analyst rating action feed: upgrades, downgrades, reiterations, and price target changes with from/to grades. |
|
|
312
|
+
|
|
313
|
+
### Options
|
|
314
|
+
|
|
315
|
+
| Tool | Description |
|
|
316
|
+
|------|-------------|
|
|
317
|
+
| `get_options_expirations` | Available option expiration dates for an underlying symbol. |
|
|
318
|
+
| `get_options_chain` | Full option chain for a given expiration: calls and puts with pricing, bid/ask, volume, open interest, and implied volatility. |
|
|
319
|
+
| `get_options_contracts` | Single option contract snapshot: pricing, bid/ask, volume, open interest, implied volatility, moneyness, and Greeks. |
|
|
320
|
+
|
|
222
321
|
## Configuration
|
|
223
322
|
|
|
323
|
+
When using the **hosted** server (`https://mcp.finimpulse.com/mcp`) no environment variables are required — your MCP client handles OAuth automatically.
|
|
324
|
+
|
|
325
|
+
The variables below apply only when running the server **locally** (stdio via `npx` or your own deployment):
|
|
326
|
+
|
|
224
327
|
| Environment Variable | Required | Description |
|
|
225
328
|
|---------------------|----------|-------------|
|
|
226
|
-
| `API_TOKEN` | Yes | Your FinImpulse API token |
|
|
329
|
+
| `API_TOKEN` | Yes (local stdio) | Your FinImpulse API token |
|
|
227
330
|
|
|
228
331
|
## Development
|
|
229
332
|
|
|
@@ -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/anal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"],"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;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,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACrB,YAAY;QACZ,kBAAkB;QAClB,UAAU;QACV,SAAS;QACT,WAAW;QACX,eAAe;QACf,QAAQ;KACR,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACtB,+EAA+E;QAC/E,sGAAsG,CACtG;IACD,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SAC/D,QAAQ,CAAC,iFAAiF,CAAC;IAC7F,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;SAChD,QA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appings":""}
|
|
@@ -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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C,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
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { registerSearchTool } from './search/index.js';
|
|
2
|
+
import { registerSearchLiteTool } from './search-lite/index.js';
|
|
2
3
|
import { registerHistoriesTool } from './historical/index.js';
|
|
3
4
|
import { registerSummaryTool } from './summary/index.js';
|
|
5
|
+
import { registerSummaryLiteTool } from './summary-lite/index.js';
|
|
4
6
|
import { registerProfileTool } from './profile/index.js';
|
|
5
7
|
import { registerNewsTool } from './news/index.js';
|
|
8
|
+
import { registerMarketPriceTool } from './market-price/index.js';
|
|
9
|
+
import { registerMetricsTool } from './metrics/index.js';
|
|
10
|
+
import { registerAnalysisAnalystsTool } from './analysis/analysts/index.js';
|
|
11
|
+
import { registerAnalysisEarningsTool } from './analysis/earnings/index.js';
|
|
12
|
+
import { registerAnalysisRecommendationsTool } from './analysis/recommendations/index.js';
|
|
13
|
+
import { registerAnalysisUpgradesDowngradesTool } from './analysis/upgrades-downgrades/index.js';
|
|
6
14
|
import { registerHoldersGeneralTool } from './holders/general/index.js';
|
|
7
15
|
import { registerHoldersInstitutionalTool } from './holders/institutional/index.js';
|
|
8
16
|
import { registerHoldersMutualFundsTool } from './holders/mutual-funds/index.js';
|
|
@@ -18,12 +26,23 @@ import { registerStatisticsRisksTool } from './statistics/risks/index.js';
|
|
|
18
26
|
import { registerStatisticsAnnualReturnsTool } from './statistics/annual-returns/index.js';
|
|
19
27
|
import { registerHoldingsGeneralTool } from './holdings/general/index.js';
|
|
20
28
|
import { registerHoldingsTopHoldingsTool } from './holdings/top-holdings/index.js';
|
|
29
|
+
import { registerOptionsChainTool } from './options/chain/index.js';
|
|
30
|
+
import { registerOptionsContractsTool } from './options/contracts/index.js';
|
|
31
|
+
import { registerOptionsExpirationsTool } from './options/expirations/index.js';
|
|
21
32
|
export function registerAllTools(server, client) {
|
|
22
33
|
registerSearchTool(server, client);
|
|
34
|
+
registerSearchLiteTool(server, client);
|
|
23
35
|
registerHistoriesTool(server, client);
|
|
24
36
|
registerSummaryTool(server, client);
|
|
37
|
+
registerSummaryLiteTool(server, client);
|
|
25
38
|
registerProfileTool(server, client);
|
|
26
39
|
registerNewsTool(server, client);
|
|
40
|
+
registerMarketPriceTool(server, client);
|
|
41
|
+
registerMetricsTool(server, client);
|
|
42
|
+
registerAnalysisAnalystsTool(server, client);
|
|
43
|
+
registerAnalysisEarningsTool(server, client);
|
|
44
|
+
registerAnalysisRecommendationsTool(server, client);
|
|
45
|
+
registerAnalysisUpgradesDowngradesTool(server, client);
|
|
27
46
|
registerHoldersGeneralTool(server, client);
|
|
28
47
|
registerHoldersInstitutionalTool(server, client);
|
|
29
48
|
registerHoldersMutualFundsTool(server, client);
|
|
@@ -39,5 +58,8 @@ export function registerAllTools(server, client) {
|
|
|
39
58
|
registerStatisticsAnnualReturnsTool(server, client);
|
|
40
59
|
registerHoldingsGeneralTool(server, client);
|
|
41
60
|
registerHoldingsTopHoldingsTool(server, client);
|
|
61
|
+
registerOptionsChainTool(server, client);
|
|
62
|
+
registerOptionsContractsTool(server, client);
|
|
63
|
+
registerOptionsExpirationsTool(server, client);
|
|
42
64
|
}
|
|
43
65
|
//# 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;AACjG,OAAO,EAAC,6BAA6B,EAAC,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAC,2BAA2B,EAAC,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAC,mCAAmC,EAAC,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAC,2BAA2B,EAAC,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAC,+BAA+B,EAAC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":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AM,CAAC,CAAC;IACjD,8BAA8B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,2BAA2B,CAAC,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/market-price/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,KAAuB,EAAE,MAAiB;IAClF,OAAO,MAAM,CAAC,OAAO,CAAsB,oBAAoB,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC3G,CAAC"}
|
|
@@ -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":""}
|
|
@@ -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":""}
|
|
@@ -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,EA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E,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/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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QAAQ,GAAG,GAAG,GAAG,CAAC,QAAQ,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACxD,GAAG,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,qBAAqB,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;IAC/C,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;IAC9C,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;IAEjD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;IAC9C,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,0CAA0C,IAAI,EAAE,CAAC,CAAC,CAAC;AACzF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "finimpulse-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.1",
|
|
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"
|
|
@@ -19,8 +23,20 @@
|
|
|
19
23
|
"type": "git",
|
|
20
24
|
"url": "git+https://github.com/finimpulse/mcp-server-typescript.git"
|
|
21
25
|
},
|
|
22
|
-
"keywords": [
|
|
23
|
-
|
|
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",
|
|
24
40
|
"license": "ISC",
|
|
25
41
|
"dependencies": {
|
|
26
42
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
@@ -31,6 +47,7 @@
|
|
|
31
47
|
"devDependencies": {
|
|
32
48
|
"@types/express": "^5.0.6",
|
|
33
49
|
"@types/node": "^25.2.3",
|
|
34
|
-
"typescript": "^5.9.3"
|
|
50
|
+
"typescript": "^5.9.3",
|
|
51
|
+
"vitest": "^4.1.5"
|
|
35
52
|
}
|
|
36
53
|
}
|