fixparser-plugin-mcp 9.1.7-e016b83b → 9.1.7-e11287f5
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/build/cjs/MCPLocal.js +242 -336
- package/build/cjs/MCPLocal.js.map +2 -2
- package/build/esm/MCPLocal.mjs +242 -336
- package/build/esm/MCPLocal.mjs.map +2 -2
- package/build-examples/cjs/example_mcp_local.js +20 -20
- package/build-examples/cjs/example_mcp_local.js.map +3 -3
- package/build-examples/esm/example_mcp_local.mjs +20 -20
- package/build-examples/esm/example_mcp_local.mjs.map +3 -3
- package/package.json +1 -1
package/build/cjs/MCPLocal.js
CHANGED
|
@@ -27,6 +27,234 @@ var import_server = require("@modelcontextprotocol/sdk/server/index.js");
|
|
|
27
27
|
var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
28
28
|
var import_fixparser = require("fixparser");
|
|
29
29
|
var import_zod = require("zod");
|
|
30
|
+
var toolSchemas = {
|
|
31
|
+
parse: {
|
|
32
|
+
description: "Parses a FIX message and describes it in plain language",
|
|
33
|
+
schema: {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: {
|
|
36
|
+
fixString: { type: "string" }
|
|
37
|
+
},
|
|
38
|
+
required: ["fixString"]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
parseToJSON: {
|
|
42
|
+
description: "Parses a FIX message into JSON",
|
|
43
|
+
schema: {
|
|
44
|
+
type: "object",
|
|
45
|
+
properties: {
|
|
46
|
+
fixString: { type: "string" }
|
|
47
|
+
},
|
|
48
|
+
required: ["fixString"]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
verifyOrder: {
|
|
52
|
+
description: "Verifies order parameters before execution. verifyOrder must be called before executeOrder.",
|
|
53
|
+
schema: {
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
clOrdID: { type: "string" },
|
|
57
|
+
handlInst: {
|
|
58
|
+
type: "string",
|
|
59
|
+
enum: ["1", "2", "3"],
|
|
60
|
+
description: "Handling Instructions: 1=Automated Execution No Intervention, 2=Automated Execution Intervention OK, 3=Manual Order"
|
|
61
|
+
},
|
|
62
|
+
quantity: { type: "string" },
|
|
63
|
+
price: { type: "string" },
|
|
64
|
+
ordType: {
|
|
65
|
+
type: "string",
|
|
66
|
+
enum: [
|
|
67
|
+
"1",
|
|
68
|
+
"2",
|
|
69
|
+
"3",
|
|
70
|
+
"4",
|
|
71
|
+
"5",
|
|
72
|
+
"6",
|
|
73
|
+
"7",
|
|
74
|
+
"8",
|
|
75
|
+
"9",
|
|
76
|
+
"A",
|
|
77
|
+
"B",
|
|
78
|
+
"C",
|
|
79
|
+
"D",
|
|
80
|
+
"E",
|
|
81
|
+
"F",
|
|
82
|
+
"G",
|
|
83
|
+
"H",
|
|
84
|
+
"I",
|
|
85
|
+
"J",
|
|
86
|
+
"K",
|
|
87
|
+
"L",
|
|
88
|
+
"M",
|
|
89
|
+
"P",
|
|
90
|
+
"Q",
|
|
91
|
+
"R",
|
|
92
|
+
"S"
|
|
93
|
+
],
|
|
94
|
+
description: "Order Type: 1=Market, 2=Limit, 3=Stop, 4=StopLimit, 5=MarketOnClose, 6=WithOrWithout, 7=LimitOrBetter, 8=LimitWithOrWithout, 9=OnBasis, A=OnClose, B=LimitOnClose, C=ForexMarket, D=PreviouslyQuoted, E=PreviouslyIndicated, F=ForexLimit, G=ForexSwap, H=ForexPreviouslyQuoted, I=Funari, J=MarketIfTouched, K=MarketWithLeftOverAsLimit, L=PreviousFundValuationPoint, M=NextFundValuationPoint, P=Pegged, Q=CounterOrderSelection, R=StopOnBidOrOffer, S=StopLimitOnBidOrOffer"
|
|
95
|
+
},
|
|
96
|
+
side: {
|
|
97
|
+
type: "string",
|
|
98
|
+
enum: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H"],
|
|
99
|
+
description: "Side: 1=Buy, 2=Sell, 3=BuyMinus, 4=SellPlus, 5=SellShort, 6=SellShortExempt, 7=Undisclosed, 8=Cross, 9=CrossShort, A=CrossShortExempt, B=AsDefined, C=Opposite, D=Subscribe, E=Redeem, F=Lend, G=Borrow, H=SellUndisclosed"
|
|
100
|
+
},
|
|
101
|
+
symbol: { type: "string" },
|
|
102
|
+
timeInForce: {
|
|
103
|
+
type: "string",
|
|
104
|
+
enum: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C"],
|
|
105
|
+
description: "Time In Force: 0=Day, 1=GoodTillCancel, 2=AtTheOpening, 3=ImmediateOrCancel, 4=FillOrKill, 5=GoodTillCrossing, 6=GoodTillDate, 7=AtTheClose, 8=GoodThroughCrossing, 9=AtCrossing, A=GoodForTime, B=GoodForAuction, C=GoodForMonth"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
required: ["clOrdID", "handlInst", "quantity", "price", "ordType", "side", "symbol", "timeInForce"]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
executeOrder: {
|
|
112
|
+
description: "Executes a verified order. verifyOrder must be called before executeOrder. user has to explicitly allow executeOrder.",
|
|
113
|
+
schema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
clOrdID: { type: "string" },
|
|
117
|
+
handlInst: {
|
|
118
|
+
type: "string",
|
|
119
|
+
enum: ["1", "2", "3"],
|
|
120
|
+
description: "Handling Instructions: 1=Automated Execution No Intervention, 2=Automated Execution Intervention OK, 3=Manual Order"
|
|
121
|
+
},
|
|
122
|
+
quantity: { type: "string" },
|
|
123
|
+
price: { type: "string" },
|
|
124
|
+
ordType: {
|
|
125
|
+
type: "string",
|
|
126
|
+
enum: [
|
|
127
|
+
"1",
|
|
128
|
+
"2",
|
|
129
|
+
"3",
|
|
130
|
+
"4",
|
|
131
|
+
"5",
|
|
132
|
+
"6",
|
|
133
|
+
"7",
|
|
134
|
+
"8",
|
|
135
|
+
"9",
|
|
136
|
+
"A",
|
|
137
|
+
"B",
|
|
138
|
+
"C",
|
|
139
|
+
"D",
|
|
140
|
+
"E",
|
|
141
|
+
"F",
|
|
142
|
+
"G",
|
|
143
|
+
"H",
|
|
144
|
+
"I",
|
|
145
|
+
"J",
|
|
146
|
+
"K",
|
|
147
|
+
"L",
|
|
148
|
+
"M",
|
|
149
|
+
"P",
|
|
150
|
+
"Q",
|
|
151
|
+
"R",
|
|
152
|
+
"S"
|
|
153
|
+
],
|
|
154
|
+
description: "Order Type: 1=Market, 2=Limit, 3=Stop, 4=StopLimit, 5=MarketOnClose, 6=WithOrWithout, 7=LimitOrBetter, 8=LimitWithOrWithout, 9=OnBasis, A=OnClose, B=LimitOnClose, C=ForexMarket, D=PreviouslyQuoted, E=PreviouslyIndicated, F=ForexLimit, G=ForexSwap, H=ForexPreviouslyQuoted, I=Funari, J=MarketIfTouched, K=MarketWithLeftOverAsLimit, L=PreviousFundValuationPoint, M=NextFundValuationPoint, P=Pegged, Q=CounterOrderSelection, R=StopOnBidOrOffer, S=StopLimitOnBidOrOffer"
|
|
155
|
+
},
|
|
156
|
+
side: {
|
|
157
|
+
type: "string",
|
|
158
|
+
enum: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H"],
|
|
159
|
+
description: "Side: 1=Buy, 2=Sell, 3=BuyMinus, 4=SellPlus, 5=SellShort, 6=SellShortExempt, 7=Undisclosed, 8=Cross, 9=CrossShort, A=CrossShortExempt, B=AsDefined, C=Opposite, D=Subscribe, E=Redeem, F=Lend, G=Borrow, H=SellUndisclosed"
|
|
160
|
+
},
|
|
161
|
+
symbol: { type: "string" },
|
|
162
|
+
timeInForce: {
|
|
163
|
+
type: "string",
|
|
164
|
+
enum: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C"],
|
|
165
|
+
description: "Time In Force: 0=Day, 1=GoodTillCancel, 2=AtTheOpening, 3=ImmediateOrCancel, 4=FillOrKill, 5=GoodTillCrossing, 6=GoodTillDate, 7=AtTheClose, 8=GoodThroughCrossing, 9=AtCrossing, A=GoodForTime, B=GoodForAuction, C=GoodForMonth"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
required: ["clOrdID", "handlInst", "quantity", "price", "ordType", "side", "symbol", "timeInForce"]
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
marketDataRequest: {
|
|
172
|
+
description: "Requests market data for specified symbols",
|
|
173
|
+
schema: {
|
|
174
|
+
type: "object",
|
|
175
|
+
properties: {
|
|
176
|
+
mdUpdateType: {
|
|
177
|
+
type: "string",
|
|
178
|
+
enum: ["0", "1"],
|
|
179
|
+
description: "Market Data Update Type: 0=Full Refresh, 1=Incremental Refresh"
|
|
180
|
+
},
|
|
181
|
+
symbols: { type: "array", items: { type: "string" } },
|
|
182
|
+
mdReqID: { type: "string" },
|
|
183
|
+
subscriptionRequestType: {
|
|
184
|
+
type: "string",
|
|
185
|
+
enum: ["0", "1", "2"],
|
|
186
|
+
description: "Subscription Request Type: 0=Snapshot, 1=Snapshot + Updates, 2=Disable Previous Snapshot + Update Request"
|
|
187
|
+
},
|
|
188
|
+
mdEntryTypes: {
|
|
189
|
+
type: "array",
|
|
190
|
+
items: {
|
|
191
|
+
type: "string",
|
|
192
|
+
enum: [
|
|
193
|
+
"0",
|
|
194
|
+
"1",
|
|
195
|
+
"2",
|
|
196
|
+
"3",
|
|
197
|
+
"4",
|
|
198
|
+
"5",
|
|
199
|
+
"6",
|
|
200
|
+
"7",
|
|
201
|
+
"8",
|
|
202
|
+
"9",
|
|
203
|
+
"A",
|
|
204
|
+
"B",
|
|
205
|
+
"C",
|
|
206
|
+
"D",
|
|
207
|
+
"E",
|
|
208
|
+
"F",
|
|
209
|
+
"G",
|
|
210
|
+
"H",
|
|
211
|
+
"I",
|
|
212
|
+
"J",
|
|
213
|
+
"K",
|
|
214
|
+
"L",
|
|
215
|
+
"M",
|
|
216
|
+
"N",
|
|
217
|
+
"O",
|
|
218
|
+
"P",
|
|
219
|
+
"Q",
|
|
220
|
+
"R",
|
|
221
|
+
"S",
|
|
222
|
+
"T",
|
|
223
|
+
"U",
|
|
224
|
+
"V",
|
|
225
|
+
"W",
|
|
226
|
+
"X",
|
|
227
|
+
"Y",
|
|
228
|
+
"Z"
|
|
229
|
+
],
|
|
230
|
+
description: "Market Data Entry Types: 0=Bid, 1=Offer, 2=Trade, 3=Index Value, 4=Opening Price, 5=Closing Price, 6=Settlement Price, 7=High Price, 8=Low Price, 9=Trade Volume, A=Open Interest, B=Simulated Sell Price, C=Simulated Buy Price, D=Empty Book, E=Session High Bid, F=Session Low Offer, G=Fixing Price, H=Electronic Volume, I=Threshold Limits and Price Band Variation, J=Clearing Price, K=Open Interest Change, L=Last Trade Price, M=Last Trade Volume, N=Last Trade Time, O=Last Trade Tick, P=Last Trade Exchange, Q=Last Trade ID, R=Last Trade Side, S=Last Trade Price Change, T=Last Trade Price Change Percent, U=Last Trade Price Change Basis Points, V=Last Trade Price Change Points, W=Last Trade Price Change Ticks, X=Last Trade Price Change Ticks Percent, Y=Last Trade Price Change Ticks Basis Points, Z=Last Trade Price Change Ticks Points"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
required: ["mdUpdateType", "symbols", "mdReqID", "subscriptionRequestType", "mdEntryTypes"]
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
getStockGraph: {
|
|
238
|
+
description: "Generates a price chart for a given symbol",
|
|
239
|
+
schema: {
|
|
240
|
+
type: "object",
|
|
241
|
+
properties: {
|
|
242
|
+
symbol: { type: "string" }
|
|
243
|
+
},
|
|
244
|
+
required: ["symbol"]
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
getStockPriceHistory: {
|
|
248
|
+
description: "Returns price history for a given symbol",
|
|
249
|
+
schema: {
|
|
250
|
+
type: "object",
|
|
251
|
+
properties: {
|
|
252
|
+
symbol: { type: "string" }
|
|
253
|
+
},
|
|
254
|
+
required: ["symbol"]
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
};
|
|
30
258
|
var MCPLocal = class {
|
|
31
259
|
parser;
|
|
32
260
|
server = new import_server.Server(
|
|
@@ -36,168 +264,16 @@ var MCPLocal = class {
|
|
|
36
264
|
},
|
|
37
265
|
{
|
|
38
266
|
capabilities: {
|
|
39
|
-
tools:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
required: ["fixString"]
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
parseToJSON: {
|
|
51
|
-
description: "Parses a FIX message into JSON",
|
|
52
|
-
parameters: {
|
|
53
|
-
type: "object",
|
|
54
|
-
properties: {
|
|
55
|
-
fixString: { type: "string" }
|
|
56
|
-
},
|
|
57
|
-
required: ["fixString"]
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
verifyOrder: {
|
|
61
|
-
description: "Verifies order parameters before execution",
|
|
62
|
-
parameters: {
|
|
63
|
-
type: "object",
|
|
64
|
-
properties: {
|
|
65
|
-
clOrdID: { type: "string" },
|
|
66
|
-
handlInst: { type: "string", enum: ["1", "2", "3"] },
|
|
67
|
-
quantity: { type: "string" },
|
|
68
|
-
price: { type: "string" },
|
|
69
|
-
ordType: {
|
|
70
|
-
type: "string",
|
|
71
|
-
enum: [
|
|
72
|
-
"1",
|
|
73
|
-
"2",
|
|
74
|
-
"3",
|
|
75
|
-
"4",
|
|
76
|
-
"5",
|
|
77
|
-
"6",
|
|
78
|
-
"7",
|
|
79
|
-
"8",
|
|
80
|
-
"9",
|
|
81
|
-
"A",
|
|
82
|
-
"B",
|
|
83
|
-
"C",
|
|
84
|
-
"D",
|
|
85
|
-
"E",
|
|
86
|
-
"F",
|
|
87
|
-
"G",
|
|
88
|
-
"H",
|
|
89
|
-
"I",
|
|
90
|
-
"J",
|
|
91
|
-
"K",
|
|
92
|
-
"L",
|
|
93
|
-
"M",
|
|
94
|
-
"P",
|
|
95
|
-
"Q",
|
|
96
|
-
"R",
|
|
97
|
-
"S"
|
|
98
|
-
]
|
|
99
|
-
},
|
|
100
|
-
side: {
|
|
101
|
-
type: "string",
|
|
102
|
-
enum: [
|
|
103
|
-
"1",
|
|
104
|
-
"2",
|
|
105
|
-
"3",
|
|
106
|
-
"4",
|
|
107
|
-
"5",
|
|
108
|
-
"6",
|
|
109
|
-
"7",
|
|
110
|
-
"8",
|
|
111
|
-
"9",
|
|
112
|
-
"A",
|
|
113
|
-
"B",
|
|
114
|
-
"C",
|
|
115
|
-
"D",
|
|
116
|
-
"E",
|
|
117
|
-
"F",
|
|
118
|
-
"G",
|
|
119
|
-
"H"
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
symbol: { type: "string" },
|
|
123
|
-
timeInForce: {
|
|
124
|
-
type: "string",
|
|
125
|
-
enum: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C"]
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
required: [
|
|
129
|
-
"clOrdID",
|
|
130
|
-
"handlInst",
|
|
131
|
-
"quantity",
|
|
132
|
-
"price",
|
|
133
|
-
"ordType",
|
|
134
|
-
"side",
|
|
135
|
-
"symbol",
|
|
136
|
-
"timeInForce"
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
executeOrder: {
|
|
141
|
-
description: "Executes a verified order",
|
|
142
|
-
parameters: {
|
|
143
|
-
type: "object",
|
|
144
|
-
properties: {
|
|
145
|
-
clOrdID: { type: "string" },
|
|
146
|
-
handlInst: { type: "string", enum: ["1", "2", "3"] },
|
|
147
|
-
quantity: { type: "string" },
|
|
148
|
-
price: { type: "string" },
|
|
149
|
-
ordType: { type: "string" },
|
|
150
|
-
side: { type: "string" },
|
|
151
|
-
symbol: { type: "string" },
|
|
152
|
-
timeInForce: { type: "string" }
|
|
153
|
-
},
|
|
154
|
-
required: [
|
|
155
|
-
"clOrdID",
|
|
156
|
-
"handlInst",
|
|
157
|
-
"quantity",
|
|
158
|
-
"price",
|
|
159
|
-
"ordType",
|
|
160
|
-
"side",
|
|
161
|
-
"symbol",
|
|
162
|
-
"timeInForce"
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
marketDataRequest: {
|
|
167
|
-
description: "Requests market data for specified symbols",
|
|
168
|
-
parameters: {
|
|
169
|
-
type: "object",
|
|
170
|
-
properties: {
|
|
171
|
-
mdUpdateType: { type: "string", enum: ["0", "1"] },
|
|
172
|
-
symbols: { type: "array", items: { type: "string" } },
|
|
173
|
-
mdReqID: { type: "string" },
|
|
174
|
-
subscriptionRequestType: { type: "string", enum: ["0", "1", "2"] },
|
|
175
|
-
mdEntryTypes: { type: "array", items: { type: "string" } }
|
|
176
|
-
},
|
|
177
|
-
required: ["mdUpdateType", "symbols", "mdReqID", "subscriptionRequestType", "mdEntryTypes"]
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
getStockGraph: {
|
|
181
|
-
description: "Generates a price chart for a given symbol",
|
|
182
|
-
parameters: {
|
|
183
|
-
type: "object",
|
|
184
|
-
properties: {
|
|
185
|
-
symbol: { type: "string" }
|
|
186
|
-
},
|
|
187
|
-
required: ["symbol"]
|
|
188
|
-
}
|
|
267
|
+
tools: Object.entries(toolSchemas).reduce(
|
|
268
|
+
(acc, [name, { description, schema }]) => {
|
|
269
|
+
acc[name] = {
|
|
270
|
+
description,
|
|
271
|
+
parameters: schema
|
|
272
|
+
};
|
|
273
|
+
return acc;
|
|
189
274
|
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
parameters: {
|
|
193
|
-
type: "object",
|
|
194
|
-
properties: {
|
|
195
|
-
symbol: { type: "string" }
|
|
196
|
-
},
|
|
197
|
-
required: ["symbol"]
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
275
|
+
{}
|
|
276
|
+
)
|
|
201
277
|
}
|
|
202
278
|
}
|
|
203
279
|
);
|
|
@@ -292,181 +368,11 @@ var MCPLocal = class {
|
|
|
292
368
|
import_zod.z.object({ method: import_zod.z.literal("tools/list") }),
|
|
293
369
|
async (request, extra) => {
|
|
294
370
|
return {
|
|
295
|
-
tools: [
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
type: "object",
|
|
301
|
-
properties: {
|
|
302
|
-
fixString: { type: "string" }
|
|
303
|
-
},
|
|
304
|
-
required: ["fixString"]
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
name: "parseToJSON",
|
|
309
|
-
description: "Parses a FIX message into JSON",
|
|
310
|
-
inputSchema: {
|
|
311
|
-
type: "object",
|
|
312
|
-
properties: {
|
|
313
|
-
fixString: { type: "string" }
|
|
314
|
-
},
|
|
315
|
-
required: ["fixString"]
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
name: "verifyOrder",
|
|
320
|
-
description: "Verifies order parameters before execution",
|
|
321
|
-
inputSchema: {
|
|
322
|
-
type: "object",
|
|
323
|
-
properties: {
|
|
324
|
-
clOrdID: { type: "string" },
|
|
325
|
-
handlInst: { type: "string", enum: ["1", "2", "3"] },
|
|
326
|
-
quantity: { type: "string" },
|
|
327
|
-
price: { type: "string" },
|
|
328
|
-
ordType: {
|
|
329
|
-
type: "string",
|
|
330
|
-
enum: [
|
|
331
|
-
"1",
|
|
332
|
-
"2",
|
|
333
|
-
"3",
|
|
334
|
-
"4",
|
|
335
|
-
"5",
|
|
336
|
-
"6",
|
|
337
|
-
"7",
|
|
338
|
-
"8",
|
|
339
|
-
"9",
|
|
340
|
-
"A",
|
|
341
|
-
"B",
|
|
342
|
-
"C",
|
|
343
|
-
"D",
|
|
344
|
-
"E",
|
|
345
|
-
"F",
|
|
346
|
-
"G",
|
|
347
|
-
"H",
|
|
348
|
-
"I",
|
|
349
|
-
"J",
|
|
350
|
-
"K",
|
|
351
|
-
"L",
|
|
352
|
-
"M",
|
|
353
|
-
"P",
|
|
354
|
-
"Q",
|
|
355
|
-
"R",
|
|
356
|
-
"S"
|
|
357
|
-
]
|
|
358
|
-
},
|
|
359
|
-
side: {
|
|
360
|
-
type: "string",
|
|
361
|
-
enum: [
|
|
362
|
-
"1",
|
|
363
|
-
"2",
|
|
364
|
-
"3",
|
|
365
|
-
"4",
|
|
366
|
-
"5",
|
|
367
|
-
"6",
|
|
368
|
-
"7",
|
|
369
|
-
"8",
|
|
370
|
-
"9",
|
|
371
|
-
"A",
|
|
372
|
-
"B",
|
|
373
|
-
"C",
|
|
374
|
-
"D",
|
|
375
|
-
"E",
|
|
376
|
-
"F",
|
|
377
|
-
"G",
|
|
378
|
-
"H"
|
|
379
|
-
]
|
|
380
|
-
},
|
|
381
|
-
symbol: { type: "string" },
|
|
382
|
-
timeInForce: {
|
|
383
|
-
type: "string",
|
|
384
|
-
enum: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C"]
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
required: [
|
|
388
|
-
"clOrdID",
|
|
389
|
-
"handlInst",
|
|
390
|
-
"quantity",
|
|
391
|
-
"price",
|
|
392
|
-
"ordType",
|
|
393
|
-
"side",
|
|
394
|
-
"symbol",
|
|
395
|
-
"timeInForce"
|
|
396
|
-
]
|
|
397
|
-
}
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
name: "executeOrder",
|
|
401
|
-
description: "Executes a verified order",
|
|
402
|
-
inputSchema: {
|
|
403
|
-
type: "object",
|
|
404
|
-
properties: {
|
|
405
|
-
clOrdID: { type: "string" },
|
|
406
|
-
handlInst: { type: "string", enum: ["1", "2", "3"] },
|
|
407
|
-
quantity: { type: "string" },
|
|
408
|
-
price: { type: "string" },
|
|
409
|
-
ordType: { type: "string" },
|
|
410
|
-
side: { type: "string" },
|
|
411
|
-
symbol: { type: "string" },
|
|
412
|
-
timeInForce: { type: "string" }
|
|
413
|
-
},
|
|
414
|
-
required: [
|
|
415
|
-
"clOrdID",
|
|
416
|
-
"handlInst",
|
|
417
|
-
"quantity",
|
|
418
|
-
"price",
|
|
419
|
-
"ordType",
|
|
420
|
-
"side",
|
|
421
|
-
"symbol",
|
|
422
|
-
"timeInForce"
|
|
423
|
-
]
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
name: "marketDataRequest",
|
|
428
|
-
description: "Requests market data for specified symbols",
|
|
429
|
-
inputSchema: {
|
|
430
|
-
type: "object",
|
|
431
|
-
properties: {
|
|
432
|
-
mdUpdateType: { type: "string", enum: ["0", "1"] },
|
|
433
|
-
symbols: { type: "array", items: { type: "string" } },
|
|
434
|
-
mdReqID: { type: "string" },
|
|
435
|
-
subscriptionRequestType: { type: "string", enum: ["0", "1", "2"] },
|
|
436
|
-
mdEntryTypes: { type: "array", items: { type: "string" } }
|
|
437
|
-
},
|
|
438
|
-
required: [
|
|
439
|
-
"mdUpdateType",
|
|
440
|
-
"symbols",
|
|
441
|
-
"mdReqID",
|
|
442
|
-
"subscriptionRequestType",
|
|
443
|
-
"mdEntryTypes"
|
|
444
|
-
]
|
|
445
|
-
}
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
name: "getStockGraph",
|
|
449
|
-
description: "Generates a price chart for a given symbol",
|
|
450
|
-
inputSchema: {
|
|
451
|
-
type: "object",
|
|
452
|
-
properties: {
|
|
453
|
-
symbol: { type: "string" }
|
|
454
|
-
},
|
|
455
|
-
required: ["symbol"]
|
|
456
|
-
}
|
|
457
|
-
},
|
|
458
|
-
{
|
|
459
|
-
name: "getStockPriceHistory",
|
|
460
|
-
description: "Returns price history for a given symbol",
|
|
461
|
-
inputSchema: {
|
|
462
|
-
type: "object",
|
|
463
|
-
properties: {
|
|
464
|
-
symbol: { type: "string" }
|
|
465
|
-
},
|
|
466
|
-
required: ["symbol"]
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
]
|
|
371
|
+
tools: Object.entries(toolSchemas).map(([name, { description, schema }]) => ({
|
|
372
|
+
name,
|
|
373
|
+
description,
|
|
374
|
+
inputSchema: schema
|
|
375
|
+
}))
|
|
470
376
|
};
|
|
471
377
|
}
|
|
472
378
|
);
|