@finchagentic/mcp 4.0.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/LICENSE +21 -0
- package/README.md +345 -0
- package/dist/_http-cache.js +96 -0
- package/dist/agent-loop.js +231 -0
- package/dist/annotations.js +113 -0
- package/dist/cli.js +1195 -0
- package/dist/clink-input.js +15 -0
- package/dist/config.js +132 -0
- package/dist/convex.js +151 -0
- package/dist/dex-pair.js +54 -0
- package/dist/enrichment-router.js +315 -0
- package/dist/index.js +256 -0
- package/dist/llm.js +323 -0
- package/dist/local-memory.js +102 -0
- package/dist/local-vault.js +454 -0
- package/dist/output-schemas.js +551 -0
- package/dist/prompts.js +111 -0
- package/dist/public-url.js +107 -0
- package/dist/resources.js +116 -0
- package/dist/server.js +300 -0
- package/dist/signal-gate.js +57 -0
- package/dist/token-decimals.js +26 -0
- package/dist/token-gate.js +88 -0
- package/dist/tool-filter.js +44 -0
- package/dist/tools/_solidity-scan.js +313 -0
- package/dist/tools/agents.js +729 -0
- package/dist/tools/automation.js +314 -0
- package/dist/tools/base-mcp.js +478 -0
- package/dist/tools/base.js +269 -0
- package/dist/tools/chronicle.js +268 -0
- package/dist/tools/coder.js +94 -0
- package/dist/tools/deep-research.js +1416 -0
- package/dist/tools/defi.js +291 -0
- package/dist/tools/equity.js +364 -0
- package/dist/tools/events.js +182 -0
- package/dist/tools/framework.js +150 -0
- package/dist/tools/github.js +514 -0
- package/dist/tools/insider.js +264 -0
- package/dist/tools/insight.js +634 -0
- package/dist/tools/market.js +555 -0
- package/dist/tools/memory.js +1046 -0
- package/dist/tools/miroshark.js +343 -0
- package/dist/tools/monitor.js +319 -0
- package/dist/tools/os.js +226 -0
- package/dist/tools/packets.js +296 -0
- package/dist/tools/research-chain.js +226 -0
- package/dist/tools/research-compare.js +280 -0
- package/dist/tools/research.js +188 -0
- package/dist/tools/rh-bridge.js +148 -0
- package/dist/tools/rh-mcp.js +1411 -0
- package/dist/tools/rh-orders.js +471 -0
- package/dist/tools/scanner.js +534 -0
- package/dist/tools/vault.js +764 -0
- package/dist/tools/wallet.js +200 -0
- package/dist/types.js +2 -0
- package/dist/wallet.js +184 -0
- package/package.json +87 -0
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Central registry of MCP tool `outputSchema` declarations (spec 2025-06-18).
|
|
3
|
+
//
|
|
4
|
+
// A tool that declares an outputSchema SHOULD also return `structuredContent`
|
|
5
|
+
// conforming to it (its handler does; the human-readable `content` text stays
|
|
6
|
+
// for backward compatibility). Keeping every schema in one file - rather than
|
|
7
|
+
// inline on each tool definition across ~25 modules - makes the machine-readable
|
|
8
|
+
// surface reviewable in one place, mirrors how annotations.ts centralises
|
|
9
|
+
// behavioural hints, and lets a new tool opt in by adding one entry here plus a
|
|
10
|
+
// structuredContent return in its handler (no tool-definition edit needed).
|
|
11
|
+
//
|
|
12
|
+
// Attached to the listed tools by withAnnotations() (annotations.ts) at
|
|
13
|
+
// tools/list time. Only tools whose handler genuinely emits matching
|
|
14
|
+
// structuredContent belong here.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.OUTPUT_SCHEMAS = void 0;
|
|
17
|
+
const number_null = { type: ["number", "null"] };
|
|
18
|
+
const string_null = { type: ["string", "null"] };
|
|
19
|
+
exports.OUTPUT_SCHEMAS = {
|
|
20
|
+
// ── market ────────────────────────────────────────────────────────────────
|
|
21
|
+
get_token_data: {
|
|
22
|
+
type: "object",
|
|
23
|
+
properties: {
|
|
24
|
+
symbol: string_null,
|
|
25
|
+
name: string_null,
|
|
26
|
+
priceUsd: number_null,
|
|
27
|
+
change24hPct: number_null,
|
|
28
|
+
marketCapUsd: number_null,
|
|
29
|
+
marketCapRank: number_null,
|
|
30
|
+
volume24hUsd: number_null,
|
|
31
|
+
high24hUsd: number_null,
|
|
32
|
+
low24hUsd: number_null,
|
|
33
|
+
athUsd: number_null,
|
|
34
|
+
athChangePct: number_null,
|
|
35
|
+
source: { type: "string" },
|
|
36
|
+
},
|
|
37
|
+
required: ["symbol", "name", "source"],
|
|
38
|
+
},
|
|
39
|
+
get_base_token_data: {
|
|
40
|
+
type: "object",
|
|
41
|
+
properties: {
|
|
42
|
+
address: { type: "string" },
|
|
43
|
+
symbol: string_null,
|
|
44
|
+
name: string_null,
|
|
45
|
+
priceUsd: number_null,
|
|
46
|
+
change1hPct: number_null,
|
|
47
|
+
change6hPct: number_null,
|
|
48
|
+
change24hPct: number_null,
|
|
49
|
+
volume24hUsd: number_null,
|
|
50
|
+
liquidityUsd: number_null,
|
|
51
|
+
marketCapUsd: number_null,
|
|
52
|
+
fdvUsd: number_null,
|
|
53
|
+
pairAgeDays: number_null,
|
|
54
|
+
listedOnCoingecko: { type: "boolean" },
|
|
55
|
+
coingeckoId: string_null,
|
|
56
|
+
source: { type: "string" },
|
|
57
|
+
},
|
|
58
|
+
required: ["address", "source", "listedOnCoingecko"],
|
|
59
|
+
},
|
|
60
|
+
compare_tokens: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
count: { type: "number" },
|
|
64
|
+
unknown: { type: "array", items: { type: "string" } },
|
|
65
|
+
tokens: {
|
|
66
|
+
type: "array",
|
|
67
|
+
items: {
|
|
68
|
+
type: "object",
|
|
69
|
+
properties: {
|
|
70
|
+
symbol: string_null,
|
|
71
|
+
name: string_null,
|
|
72
|
+
priceUsd: number_null,
|
|
73
|
+
change24hPct: number_null,
|
|
74
|
+
change7dPct: number_null,
|
|
75
|
+
marketCapUsd: number_null,
|
|
76
|
+
marketCapRank: number_null,
|
|
77
|
+
volume24hUsd: number_null,
|
|
78
|
+
athChangePct: number_null,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
required: ["count", "tokens"],
|
|
84
|
+
},
|
|
85
|
+
// ── scanner ───────────────────────────────────────────────────────────────
|
|
86
|
+
score_token: {
|
|
87
|
+
type: "object",
|
|
88
|
+
properties: {
|
|
89
|
+
address: { type: "string" },
|
|
90
|
+
symbol: { type: "string" },
|
|
91
|
+
priceUsd: { type: "number" },
|
|
92
|
+
liquidityUsd: { type: "number" },
|
|
93
|
+
score: { type: "number", description: "0–100 dip-reversal score" },
|
|
94
|
+
pattern: { type: ["string", "null"], description: "DEEP-REVERSAL | REVERSAL | DIP-BUY | SHALLOW-DIP, or null when gates failed" },
|
|
95
|
+
passed: { type: "boolean", description: "false when hard gates failed" },
|
|
96
|
+
gateFailures: { type: "array", items: { type: "string" } },
|
|
97
|
+
breakdown: { type: "object", additionalProperties: true },
|
|
98
|
+
},
|
|
99
|
+
required: ["address", "symbol", "score", "passed"],
|
|
100
|
+
},
|
|
101
|
+
check_token: {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
address: { type: "string" },
|
|
105
|
+
verdict: { type: "string", enum: ["DANGER", "CAUTION", "SAFE"] },
|
|
106
|
+
rugScore: { type: "number", description: "0–100, higher = riskier" },
|
|
107
|
+
isHoneypot: { type: "boolean" },
|
|
108
|
+
isMintable: { type: "boolean" },
|
|
109
|
+
isFreezeAuth: { type: "boolean" },
|
|
110
|
+
isOpenSource: { type: "boolean" },
|
|
111
|
+
lpLockedPct: { type: "number" },
|
|
112
|
+
buyTax: { type: "number" },
|
|
113
|
+
sellTax: { type: "number" },
|
|
114
|
+
holderCount: number_null,
|
|
115
|
+
},
|
|
116
|
+
required: ["address", "verdict", "rugScore"],
|
|
117
|
+
},
|
|
118
|
+
// ── wallet ────────────────────────────────────────────────────────────────
|
|
119
|
+
get_wallet_balance: {
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: {
|
|
122
|
+
address: { type: "string" },
|
|
123
|
+
chain: { type: "string" },
|
|
124
|
+
ethBalance: { type: "number" },
|
|
125
|
+
usdcBalance: { type: "number" },
|
|
126
|
+
ethPriceUsd: number_null,
|
|
127
|
+
ethValueUsd: number_null,
|
|
128
|
+
},
|
|
129
|
+
required: ["address", "chain", "ethBalance", "usdcBalance"],
|
|
130
|
+
},
|
|
131
|
+
// ── Robinhood Chain ─────────────────────────────────────────────────────────
|
|
132
|
+
rh_safety_check: {
|
|
133
|
+
type: "object",
|
|
134
|
+
properties: {
|
|
135
|
+
address: { type: "string" },
|
|
136
|
+
symbol: string_null,
|
|
137
|
+
name: string_null,
|
|
138
|
+
riskScore: { type: "number", description: "0–100, higher = riskier" },
|
|
139
|
+
tier: { type: "string", enum: ["DANGER", "CAUTION", "SOME RISK", "LOOKS OK"] },
|
|
140
|
+
verified: { type: ["boolean", "null"] },
|
|
141
|
+
contractName: string_null,
|
|
142
|
+
reputation: string_null,
|
|
143
|
+
holdersCount: number_null,
|
|
144
|
+
creator: string_null,
|
|
145
|
+
launchpad: { type: ["object", "null"], additionalProperties: true },
|
|
146
|
+
flags: { type: "array", items: { type: "string" } },
|
|
147
|
+
},
|
|
148
|
+
required: ["address", "riskScore", "tier", "flags"],
|
|
149
|
+
},
|
|
150
|
+
rh_analyze: {
|
|
151
|
+
type: "object",
|
|
152
|
+
properties: {
|
|
153
|
+
address: { type: "string" },
|
|
154
|
+
symbol: string_null,
|
|
155
|
+
name: string_null,
|
|
156
|
+
priceUsd: number_null,
|
|
157
|
+
change1hPct: number_null,
|
|
158
|
+
change24hPct: number_null,
|
|
159
|
+
liquidityUsd: number_null,
|
|
160
|
+
volume24hUsd: number_null,
|
|
161
|
+
fdvUsd: number_null,
|
|
162
|
+
marketCapUsd: number_null,
|
|
163
|
+
buys24h: number_null,
|
|
164
|
+
sells24h: number_null,
|
|
165
|
+
pairAgeDays: number_null,
|
|
166
|
+
riskScore: { type: "number", description: "0–100, higher = riskier" },
|
|
167
|
+
tier: { type: "string", enum: ["EXTREME", "HIGH", "MEDIUM", "LOWER"] },
|
|
168
|
+
flags: { type: "array", items: { type: "string" } },
|
|
169
|
+
},
|
|
170
|
+
required: ["address", "riskScore", "tier", "flags"],
|
|
171
|
+
},
|
|
172
|
+
rh_mcp_list_stocks: {
|
|
173
|
+
type: "object",
|
|
174
|
+
properties: {
|
|
175
|
+
count: { type: "number" },
|
|
176
|
+
stocks: {
|
|
177
|
+
type: "array",
|
|
178
|
+
items: {
|
|
179
|
+
type: "object",
|
|
180
|
+
properties: {
|
|
181
|
+
symbol: { type: "string" },
|
|
182
|
+
name: { type: "string" },
|
|
183
|
+
address: { type: "string" },
|
|
184
|
+
},
|
|
185
|
+
required: ["symbol", "name", "address"],
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
required: ["count", "stocks"],
|
|
190
|
+
},
|
|
191
|
+
// ── Base ────────────────────────────────────────────────────────────────────
|
|
192
|
+
base_mcp_resolve: {
|
|
193
|
+
type: "object",
|
|
194
|
+
properties: {
|
|
195
|
+
input: { type: "string" },
|
|
196
|
+
address: string_null,
|
|
197
|
+
name: string_null,
|
|
198
|
+
resolved: { type: "boolean" },
|
|
199
|
+
},
|
|
200
|
+
required: ["input", "resolved"],
|
|
201
|
+
},
|
|
202
|
+
// ── SEC equities ────────────────────────────────────────────────────────────
|
|
203
|
+
stock_events: {
|
|
204
|
+
type: "object",
|
|
205
|
+
properties: {
|
|
206
|
+
ticker: { type: "string" },
|
|
207
|
+
companyName: string_null,
|
|
208
|
+
signalOnly: { type: "boolean" },
|
|
209
|
+
count: { type: "number" },
|
|
210
|
+
events: {
|
|
211
|
+
type: "array",
|
|
212
|
+
items: {
|
|
213
|
+
type: "object",
|
|
214
|
+
properties: {
|
|
215
|
+
filingDate: { type: "string" },
|
|
216
|
+
reportDate: string_null,
|
|
217
|
+
codes: { type: "array", items: { type: "string" } },
|
|
218
|
+
hasSignal: { type: "boolean" },
|
|
219
|
+
url: { type: "string" },
|
|
220
|
+
},
|
|
221
|
+
required: ["filingDate", "codes", "hasSignal", "url"],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
required: ["ticker", "count", "events"],
|
|
226
|
+
},
|
|
227
|
+
stock_insider: {
|
|
228
|
+
type: "object",
|
|
229
|
+
properties: {
|
|
230
|
+
ticker: { type: "string" },
|
|
231
|
+
companyName: string_null,
|
|
232
|
+
filingsParsed: { type: "number" },
|
|
233
|
+
skippedOtherIssuer: { type: "number" },
|
|
234
|
+
buys: { type: "object", additionalProperties: true, description: "{ count, shares, valueUsd } of open-market discretionary buys" },
|
|
235
|
+
sells: { type: "object", additionalProperties: true, description: "{ count, shares, valueUsd } of open-market discretionary sells" },
|
|
236
|
+
netBuyValueUsd: { type: "number", description: "buys value − sells value (discretionary only)" },
|
|
237
|
+
automaticCount: { type: "number", description: "non-discretionary txns (grants, RSU tax, option exercises)" },
|
|
238
|
+
transactions: {
|
|
239
|
+
type: "array",
|
|
240
|
+
description: "Up to 12 most-recent discretionary transactions",
|
|
241
|
+
items: { type: "object", additionalProperties: true },
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
required: ["ticker", "buys", "sells", "transactions"],
|
|
245
|
+
},
|
|
246
|
+
// ── GitHub ──────────────────────────────────────────────────────────────────
|
|
247
|
+
github_list_repos: {
|
|
248
|
+
type: "object",
|
|
249
|
+
properties: {
|
|
250
|
+
username: string_null,
|
|
251
|
+
count: { type: "number" },
|
|
252
|
+
repos: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
253
|
+
},
|
|
254
|
+
required: ["count", "repos"],
|
|
255
|
+
},
|
|
256
|
+
github_list_prs: {
|
|
257
|
+
type: "object",
|
|
258
|
+
properties: {
|
|
259
|
+
owner: { type: "string" },
|
|
260
|
+
repo: { type: "string" },
|
|
261
|
+
state: { type: "string" },
|
|
262
|
+
count: { type: "number" },
|
|
263
|
+
prs: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
264
|
+
},
|
|
265
|
+
required: ["owner", "repo", "count", "prs"],
|
|
266
|
+
},
|
|
267
|
+
github_get_pr: {
|
|
268
|
+
type: "object",
|
|
269
|
+
properties: {
|
|
270
|
+
number: { type: "number" },
|
|
271
|
+
title: { type: "string" },
|
|
272
|
+
state: { type: "string" },
|
|
273
|
+
draft: { type: "boolean" },
|
|
274
|
+
author: string_null,
|
|
275
|
+
head: string_null,
|
|
276
|
+
base: string_null,
|
|
277
|
+
additions: { type: "number" },
|
|
278
|
+
deletions: { type: "number" },
|
|
279
|
+
changedFiles: { type: "number" },
|
|
280
|
+
url: { type: "string" },
|
|
281
|
+
files: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
282
|
+
reviewCount: { type: "number" },
|
|
283
|
+
commentCount: { type: "number" },
|
|
284
|
+
},
|
|
285
|
+
required: ["number", "title", "state", "files"],
|
|
286
|
+
},
|
|
287
|
+
github_list_issues: {
|
|
288
|
+
type: "object",
|
|
289
|
+
properties: {
|
|
290
|
+
owner: { type: "string" },
|
|
291
|
+
repo: { type: "string" },
|
|
292
|
+
state: { type: "string" },
|
|
293
|
+
count: { type: "number" },
|
|
294
|
+
issues: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
295
|
+
},
|
|
296
|
+
required: ["owner", "repo", "count", "issues"],
|
|
297
|
+
},
|
|
298
|
+
github_get_issue: {
|
|
299
|
+
type: "object",
|
|
300
|
+
properties: {
|
|
301
|
+
number: { type: "number" },
|
|
302
|
+
title: { type: "string" },
|
|
303
|
+
state: { type: "string" },
|
|
304
|
+
author: string_null,
|
|
305
|
+
labels: { type: "array", items: { type: "string" } },
|
|
306
|
+
assignees: { type: "array", items: { type: "string" } },
|
|
307
|
+
commentCount: { type: "number" },
|
|
308
|
+
url: { type: "string" },
|
|
309
|
+
createdAt: string_null,
|
|
310
|
+
},
|
|
311
|
+
required: ["number", "title", "state"],
|
|
312
|
+
},
|
|
313
|
+
github_get_file: {
|
|
314
|
+
type: "object",
|
|
315
|
+
properties: {
|
|
316
|
+
owner: { type: "string" },
|
|
317
|
+
repo: { type: "string" },
|
|
318
|
+
path: { type: "string" },
|
|
319
|
+
ref: string_null,
|
|
320
|
+
isFile: { type: "boolean" },
|
|
321
|
+
sizeBytes: number_null,
|
|
322
|
+
sha: string_null,
|
|
323
|
+
url: string_null,
|
|
324
|
+
language: { type: "string" },
|
|
325
|
+
truncated: { type: "boolean" },
|
|
326
|
+
content: { type: "string" },
|
|
327
|
+
},
|
|
328
|
+
required: ["owner", "repo", "path", "isFile"],
|
|
329
|
+
},
|
|
330
|
+
github_get_commits: {
|
|
331
|
+
type: "object",
|
|
332
|
+
properties: {
|
|
333
|
+
owner: { type: "string" },
|
|
334
|
+
repo: { type: "string" },
|
|
335
|
+
branch: string_null,
|
|
336
|
+
path: string_null,
|
|
337
|
+
count: { type: "number" },
|
|
338
|
+
commits: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
339
|
+
},
|
|
340
|
+
required: ["owner", "repo", "count", "commits"],
|
|
341
|
+
},
|
|
342
|
+
github_search_code: {
|
|
343
|
+
type: "object",
|
|
344
|
+
properties: {
|
|
345
|
+
query: { type: "string" },
|
|
346
|
+
totalCount: { type: "number" },
|
|
347
|
+
count: { type: "number" },
|
|
348
|
+
results: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
349
|
+
},
|
|
350
|
+
required: ["query", "count", "results"],
|
|
351
|
+
},
|
|
352
|
+
// ── chronicle ───────────────────────────────────────────────────────────────
|
|
353
|
+
chronicle_list: {
|
|
354
|
+
type: "object",
|
|
355
|
+
properties: {
|
|
356
|
+
type: string_null,
|
|
357
|
+
count: { type: "number" },
|
|
358
|
+
entries: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
359
|
+
},
|
|
360
|
+
required: ["count", "entries"],
|
|
361
|
+
},
|
|
362
|
+
chronicle_search: {
|
|
363
|
+
type: "object",
|
|
364
|
+
properties: {
|
|
365
|
+
query: { type: "string" },
|
|
366
|
+
type: string_null,
|
|
367
|
+
count: { type: "number" },
|
|
368
|
+
entries: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
369
|
+
},
|
|
370
|
+
required: ["query", "count", "entries"],
|
|
371
|
+
},
|
|
372
|
+
chronicle_stats: {
|
|
373
|
+
type: "object",
|
|
374
|
+
properties: {
|
|
375
|
+
days: { type: "number" },
|
|
376
|
+
totalEvents: { type: "number" },
|
|
377
|
+
activeDays: { type: "number" },
|
|
378
|
+
avgPerDay: { type: "number" },
|
|
379
|
+
byType: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
380
|
+
busiestDays: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
381
|
+
},
|
|
382
|
+
required: ["days", "totalEvents", "byType"],
|
|
383
|
+
},
|
|
384
|
+
// ── automation / monitor / packet ───────────────────────────────────────────
|
|
385
|
+
list_automations: {
|
|
386
|
+
type: "object",
|
|
387
|
+
properties: {
|
|
388
|
+
count: { type: "number" },
|
|
389
|
+
automations: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
390
|
+
},
|
|
391
|
+
required: ["count", "automations"],
|
|
392
|
+
},
|
|
393
|
+
get_automation_runs: {
|
|
394
|
+
type: "object",
|
|
395
|
+
properties: {
|
|
396
|
+
automationId: { type: "string" },
|
|
397
|
+
count: { type: "number" },
|
|
398
|
+
runs: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
399
|
+
},
|
|
400
|
+
required: ["automationId", "count", "runs"],
|
|
401
|
+
},
|
|
402
|
+
list_monitors: {
|
|
403
|
+
type: "object",
|
|
404
|
+
properties: {
|
|
405
|
+
count: { type: "number" },
|
|
406
|
+
monitors: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
407
|
+
},
|
|
408
|
+
required: ["count", "monitors"],
|
|
409
|
+
},
|
|
410
|
+
packet_list: {
|
|
411
|
+
type: "object",
|
|
412
|
+
properties: {
|
|
413
|
+
count: { type: "number" },
|
|
414
|
+
packets: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
415
|
+
},
|
|
416
|
+
required: ["count", "packets"],
|
|
417
|
+
},
|
|
418
|
+
// ── memory ──────────────────────────────────────────────────────────────────
|
|
419
|
+
memory_search: {
|
|
420
|
+
type: "object",
|
|
421
|
+
properties: {
|
|
422
|
+
query: { type: "string" },
|
|
423
|
+
count: { type: "number" },
|
|
424
|
+
memories: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
425
|
+
},
|
|
426
|
+
required: ["query", "count", "memories"],
|
|
427
|
+
},
|
|
428
|
+
memory_context: {
|
|
429
|
+
type: "object",
|
|
430
|
+
properties: {
|
|
431
|
+
topic: { type: "string" },
|
|
432
|
+
count: { type: "number" },
|
|
433
|
+
memories: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
434
|
+
},
|
|
435
|
+
required: ["topic", "count", "memories"],
|
|
436
|
+
},
|
|
437
|
+
memory_profile: {
|
|
438
|
+
type: "object",
|
|
439
|
+
properties: {
|
|
440
|
+
space: string_null,
|
|
441
|
+
total: { type: "number" },
|
|
442
|
+
status: { type: "string" },
|
|
443
|
+
},
|
|
444
|
+
required: ["total", "status"],
|
|
445
|
+
},
|
|
446
|
+
memory_list: {
|
|
447
|
+
type: "object",
|
|
448
|
+
properties: {
|
|
449
|
+
tag: string_null,
|
|
450
|
+
count: { type: "number" },
|
|
451
|
+
memories: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
452
|
+
},
|
|
453
|
+
required: ["count", "memories"],
|
|
454
|
+
},
|
|
455
|
+
// ── agents ──────────────────────────────────────────────────────────────────
|
|
456
|
+
list_agents: {
|
|
457
|
+
type: "object",
|
|
458
|
+
properties: {
|
|
459
|
+
count: { type: "number" },
|
|
460
|
+
agents: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
461
|
+
},
|
|
462
|
+
required: ["count", "agents"],
|
|
463
|
+
},
|
|
464
|
+
agent_ledger: {
|
|
465
|
+
type: "object",
|
|
466
|
+
properties: {
|
|
467
|
+
name: { type: "string" },
|
|
468
|
+
count: { type: "number" },
|
|
469
|
+
versions: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
470
|
+
},
|
|
471
|
+
required: ["name", "count", "versions"],
|
|
472
|
+
},
|
|
473
|
+
agent_runs: {
|
|
474
|
+
type: "object",
|
|
475
|
+
properties: {
|
|
476
|
+
name: { type: "string" },
|
|
477
|
+
count: { type: "number" },
|
|
478
|
+
runs: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
479
|
+
},
|
|
480
|
+
required: ["name", "count", "runs"],
|
|
481
|
+
},
|
|
482
|
+
// ── scanner / orders / wallet ────────────────────────────────────────────────
|
|
483
|
+
scan_market: {
|
|
484
|
+
type: "object",
|
|
485
|
+
properties: {
|
|
486
|
+
mode: { type: "string", enum: ["dips", "momentum"] },
|
|
487
|
+
scanned: { type: "number" },
|
|
488
|
+
count: { type: "number" },
|
|
489
|
+
results: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
490
|
+
},
|
|
491
|
+
required: ["mode", "scanned", "count", "results"],
|
|
492
|
+
},
|
|
493
|
+
rh_orders_list: {
|
|
494
|
+
type: "object",
|
|
495
|
+
properties: {
|
|
496
|
+
count: { type: "number" },
|
|
497
|
+
orders: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
498
|
+
},
|
|
499
|
+
required: ["count", "orders"],
|
|
500
|
+
},
|
|
501
|
+
get_wallet_address: {
|
|
502
|
+
type: "object",
|
|
503
|
+
properties: {
|
|
504
|
+
address: { type: "string" },
|
|
505
|
+
chain: { type: "string" },
|
|
506
|
+
chainId: { type: "number" },
|
|
507
|
+
},
|
|
508
|
+
required: ["address", "chain", "chainId"],
|
|
509
|
+
},
|
|
510
|
+
// ── market overview / history / defi yields ─────────────────────────────────
|
|
511
|
+
market_overview: {
|
|
512
|
+
type: "object",
|
|
513
|
+
properties: {
|
|
514
|
+
fearGreedValue: number_null,
|
|
515
|
+
fearGreedClass: string_null,
|
|
516
|
+
totalMarketCapUsd: number_null,
|
|
517
|
+
marketCap24hChangePct: number_null,
|
|
518
|
+
btcDominancePct: number_null,
|
|
519
|
+
ethDominancePct: number_null,
|
|
520
|
+
defiTvlUsd: number_null,
|
|
521
|
+
activeCoins: number_null,
|
|
522
|
+
trending: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
523
|
+
},
|
|
524
|
+
required: ["trending"],
|
|
525
|
+
},
|
|
526
|
+
token_history: {
|
|
527
|
+
type: "object",
|
|
528
|
+
properties: {
|
|
529
|
+
symbol: { type: "string" },
|
|
530
|
+
days: { type: "number" },
|
|
531
|
+
currentPriceUsd: number_null,
|
|
532
|
+
openPrice: { type: "number" },
|
|
533
|
+
closePrice: { type: "number" },
|
|
534
|
+
periodChangePct: number_null,
|
|
535
|
+
periodHighUsd: { type: "number" },
|
|
536
|
+
periodLowUsd: { type: "number" },
|
|
537
|
+
candles: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
538
|
+
},
|
|
539
|
+
required: ["symbol", "days", "candles"],
|
|
540
|
+
},
|
|
541
|
+
get_defi_yields: {
|
|
542
|
+
type: "object",
|
|
543
|
+
properties: {
|
|
544
|
+
token: string_null,
|
|
545
|
+
minApy: { type: "number" },
|
|
546
|
+
count: { type: "number" },
|
|
547
|
+
pools: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
548
|
+
},
|
|
549
|
+
required: ["count", "pools"],
|
|
550
|
+
},
|
|
551
|
+
};
|
package/dist/prompts.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// MCP Prompts surface for finch.
|
|
3
|
+
//
|
|
4
|
+
// Exposes a small curated set of high-leverage workflows as MCP Prompts so
|
|
5
|
+
// they appear as slash commands / quick actions in clients that support it
|
|
6
|
+
// (Claude Desktop, Cursor, Windsurf, Zed). Each Prompt is a parameterized
|
|
7
|
+
// template that resolves to a single message guiding the LLM to call the
|
|
8
|
+
// right tool chain - they don't run the tools themselves.
|
|
9
|
+
//
|
|
10
|
+
// Kept intentionally small. Prompts are discoverable in the UI, so quality
|
|
11
|
+
// matters more than count. If users routinely need a workflow we don't
|
|
12
|
+
// have here, that's a signal to add it - not to dump 30 templates.
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.listPrompts = listPrompts;
|
|
15
|
+
exports.getPrompt = getPrompt;
|
|
16
|
+
const PROMPTS = [
|
|
17
|
+
{
|
|
18
|
+
name: "crypto-thesis",
|
|
19
|
+
description: "Generate a bull/bear thesis for a crypto asset with verified live price (CoinGecko + DexScreener).",
|
|
20
|
+
arguments: [
|
|
21
|
+
{ name: "token", description: "Token symbol (e.g. BTC, ETH, SOL)", required: true },
|
|
22
|
+
{ name: "context", description: "Optional additional context - your stance, timeframe, watching for catalysts", required: false },
|
|
23
|
+
],
|
|
24
|
+
build: ({ token, context }) => `Call the \`market_thesis\` tool for token=${token}${context ? ` with context="${context}"` : ""}. ` +
|
|
25
|
+
`If the tool returns an error about live price unavailability, do NOT improvise a thesis from training data - report the error verbatim and suggest the user retry in 30s.`,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "trade-plan",
|
|
29
|
+
description: "Build a structured trade plan (entry, stop loss, take profit) with verified live price.",
|
|
30
|
+
arguments: [
|
|
31
|
+
{ name: "token", description: "Token symbol", required: true },
|
|
32
|
+
{ name: "side", description: "long or short (default: long)", required: false },
|
|
33
|
+
{ name: "risk", description: "conservative | moderate | aggressive (default: moderate)", required: false },
|
|
34
|
+
],
|
|
35
|
+
build: ({ token, side, risk }) => `Call the \`trade_plan\` tool with token=${token}` +
|
|
36
|
+
`${side ? `, side=${side}` : ""}` +
|
|
37
|
+
`${risk ? `, riskTolerance=${risk}` : ""}. ` +
|
|
38
|
+
`Show the tool output verbatim including the verified-price source line. ` +
|
|
39
|
+
`If the tool refuses for missing live data, do NOT fabricate entry/SL/TP from memory.`,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "deep-research",
|
|
43
|
+
description: "Kick off multi-stage deep research with date anchoring and live enrichment. Saves report to vault.",
|
|
44
|
+
arguments: [
|
|
45
|
+
{ name: "topic", description: "Research topic - be specific (e.g. 'Aerodrome TVL trend Q2 2026', not 'Aerodrome')", required: true },
|
|
46
|
+
],
|
|
47
|
+
build: ({ topic }) => `Call the \`deep_research\` tool with topic="${topic}". ` +
|
|
48
|
+
`This runs ~30-60s in the background. The result lands in vault as a research entry - surface the tool's text output to the user including any citations and the vault key for follow-up.`,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "daily-brief",
|
|
52
|
+
description: "Morning market brief: key prices, trending tokens, your prior vault context.",
|
|
53
|
+
arguments: [],
|
|
54
|
+
build: () => `1. Call \`get_market_data\` with no token to get the overall market overview (BTC/ETH/SOL + top 20 + trending).\n` +
|
|
55
|
+
`2. Call \`memory_context\` with topic="market preferences" to surface the user's saved DeFi / trading preferences.\n` +
|
|
56
|
+
`3. Call \`vault_search\` with query="market" limit=3 to find recent thesis/research entries.\n` +
|
|
57
|
+
`4. Synthesize into a 3-section brief: (a) Market state, (b) Watchlist movers, (c) Aligned with user's prior notes.\n` +
|
|
58
|
+
`Keep total under 250 words. End with one specific question the user might want to act on today.`,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "vault-recall",
|
|
62
|
+
description: "Semantic search across the vault - works at paragraph level for large entries (blob chunking).",
|
|
63
|
+
arguments: [
|
|
64
|
+
{ name: "query", description: "What you're looking for (natural language)", required: true },
|
|
65
|
+
{ name: "type", description: "Optional filter: research | execution | workflow | prompt | file | memory", required: false },
|
|
66
|
+
],
|
|
67
|
+
build: ({ query, type }) => `Call \`vault_search\` with query="${query}"${type ? `, type=${type}` : ""}. ` +
|
|
68
|
+
`Show the top 5 results with their keys and best-matching previews. ` +
|
|
69
|
+
`If results include chunk hits inside large entries, the count badge will indicate (N chunk hits) - surface that to the user.`,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "spawn-tracker",
|
|
73
|
+
description: "Spawn a persistent agent to track an ongoing topic across sessions.",
|
|
74
|
+
arguments: [
|
|
75
|
+
{ name: "name", description: "Agent name (will become its vault key)", required: true },
|
|
76
|
+
{ name: "goal", description: "What the agent is tracking - be specific", required: true },
|
|
77
|
+
],
|
|
78
|
+
build: ({ name, goal }) => `Call \`agent_spawn\` with name="${name}", goal="${goal}". ` +
|
|
79
|
+
`Confirm the agent's vault key with the user. ` +
|
|
80
|
+
`Suggest they can update progress later with \`agent_update name=${name} progress="..."\` or read the latest state with \`agent_recall name=${name}\`.`,
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
function listPrompts() {
|
|
84
|
+
return PROMPTS.map(({ build: _build, ...meta }) => meta);
|
|
85
|
+
}
|
|
86
|
+
function getPrompt(name, args) {
|
|
87
|
+
const prompt = PROMPTS.find((p) => p.name === name);
|
|
88
|
+
if (!prompt) {
|
|
89
|
+
throw new Error(`Unknown prompt: ${name}`);
|
|
90
|
+
}
|
|
91
|
+
// Validate required args - return a hint instead of throwing so the UI
|
|
92
|
+
// surfaces a friendly error.
|
|
93
|
+
for (const arg of prompt.arguments ?? []) {
|
|
94
|
+
if (arg.required && !(arg.name in args)) {
|
|
95
|
+
return {
|
|
96
|
+
description: prompt.description,
|
|
97
|
+
messages: [{
|
|
98
|
+
role: "user",
|
|
99
|
+
content: { type: "text", text: `Missing required argument: ${arg.name}. ${arg.description}` },
|
|
100
|
+
}],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
description: prompt.description,
|
|
106
|
+
messages: [{
|
|
107
|
+
role: "user",
|
|
108
|
+
content: { type: "text", text: prompt.build(args) },
|
|
109
|
+
}],
|
|
110
|
+
};
|
|
111
|
+
}
|