@aibtc/mcp-server 1.71.0 → 1.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -3
- package/dist/bridge/index.js +2 -2
- package/dist/config/networks.js +4 -1
- package/dist/index.js +118 -42
- package/dist/tools/arxiv-research.tools.d.ts +1 -1
- package/dist/tools/arxiv-research.tools.js +6 -6
- package/dist/tools/at-stake-legion.tools.d.ts +1 -1
- package/dist/tools/at-stake-legion.tools.js +14 -14
- package/dist/tools/at-stake.tools.d.ts +1 -1
- package/dist/tools/at-stake.tools.js +17 -17
- package/dist/tools/bitcoin.tools.d.ts +1 -1
- package/dist/tools/bitcoin.tools.js +12 -12
- package/dist/tools/bitflow.tools.d.ts +1 -1
- package/dist/tools/bitflow.tools.js +21 -21
- package/dist/tools/bns.tools.d.ts +1 -1
- package/dist/tools/bns.tools.js +18 -18
- package/dist/tools/bounty-hint.d.ts +1 -1
- package/dist/tools/bounty-scanner.tools.d.ts +1 -1
- package/dist/tools/bounty-scanner.tools.js +20 -20
- package/dist/tools/child-inscription.tools.d.ts +1 -1
- package/dist/tools/child-inscription.tools.js +6 -6
- package/dist/tools/competition.tools.d.ts +1 -1
- package/dist/tools/competition.tools.js +4 -4
- package/dist/tools/contract.tools.d.ts +1 -1
- package/dist/tools/contract.tools.js +8 -8
- package/dist/tools/credentials.tools.d.ts +1 -1
- package/dist/tools/credentials.tools.js +8 -8
- package/dist/tools/defi.tools.d.ts +1 -1
- package/dist/tools/defi.tools.js +21 -21
- package/dist/tools/dual-stacking.tools.d.ts +1 -1
- package/dist/tools/dual-stacking.tools.js +7 -7
- package/dist/tools/earning.tools.d.ts +1 -1
- package/dist/tools/earning.tools.js +2 -2
- package/dist/tools/endpoint.tools.d.ts +1 -1
- package/dist/tools/endpoint.tools.js +14 -13
- package/dist/tools/identity.tools.d.ts +1 -1
- package/dist/tools/identity.tools.js +19 -19
- package/dist/tools/inbox-x402.tools.d.ts +1 -1
- package/dist/tools/inbox-x402.tools.js +2 -2
- package/dist/tools/inbox.tools.d.ts +1 -1
- package/dist/tools/inbox.tools.js +2 -2
- package/dist/tools/index.d.ts +6 -3
- package/dist/tools/index.js +69 -58
- package/dist/tools/inference-marketplace.tools.d.ts +1 -1
- package/dist/tools/inference-marketplace.tools.js +10 -10
- package/dist/tools/jingswap.tools.d.ts +1 -1
- package/dist/tools/jingswap.tools.js +30 -30
- package/dist/tools/legion.tools.d.ts +1 -1
- package/dist/tools/legion.tools.js +20 -20
- package/dist/tools/lightning.tools.d.ts +1 -1
- package/dist/tools/lightning.tools.js +14 -14
- package/dist/tools/mempool.tools.d.ts +1 -1
- package/dist/tools/mempool.tools.js +5 -5
- package/dist/tools/news.tools.d.ts +1 -1
- package/dist/tools/news.tools.js +2 -1
- package/dist/tools/nft.tools.d.ts +1 -1
- package/dist/tools/nft.tools.js +12 -12
- package/dist/tools/nonce.tools.d.ts +1 -1
- package/dist/tools/nonce.tools.js +8 -8
- package/dist/tools/nostr.tools.d.ts +1 -1
- package/dist/tools/nostr.tools.js +12 -12
- package/dist/tools/openrouter.tools.d.ts +1 -1
- package/dist/tools/openrouter.tools.js +4 -4
- package/dist/tools/ordinals-marketplace.tools.d.ts +1 -1
- package/dist/tools/ordinals-marketplace.tools.js +10 -10
- package/dist/tools/ordinals-p2p.tools.d.ts +1 -1
- package/dist/tools/ordinals-p2p.tools.js +18 -18
- package/dist/tools/ordinals.tools.d.ts +1 -1
- package/dist/tools/ordinals.tools.js +8 -8
- package/dist/tools/pillar-direct.tools.d.ts +1 -1
- package/dist/tools/pillar-direct.tools.js +36 -36
- package/dist/tools/pillar.tools.d.ts +1 -1
- package/dist/tools/pillar.tools.js +28 -26
- package/dist/tools/profiles.d.ts +51 -0
- package/dist/tools/profiles.js +111 -0
- package/dist/tools/psbt.tools.d.ts +1 -1
- package/dist/tools/psbt.tools.js +8 -8
- package/dist/tools/query.tools.d.ts +1 -1
- package/dist/tools/query.tools.js +12 -12
- package/dist/tools/relay-diagnostic.tools.d.ts +1 -1
- package/dist/tools/relay-diagnostic.tools.js +3 -3
- package/dist/tools/reputation.tools.d.ts +1 -1
- package/dist/tools/reputation.tools.js +22 -22
- package/dist/tools/runes.tools.d.ts +1 -1
- package/dist/tools/runes.tools.js +18 -18
- package/dist/tools/sbtc.tools.d.ts +1 -1
- package/dist/tools/sbtc.tools.js +12 -12
- package/dist/tools/scaffold.tools.d.ts +1 -1
- package/dist/tools/scaffold.tools.js +4 -4
- package/dist/tools/settings.tools.d.ts +1 -1
- package/dist/tools/settings.tools.js +9 -9
- package/dist/tools/signing.tools.d.ts +1 -1
- package/dist/tools/signing.tools.js +20 -20
- package/dist/tools/souldinals.tools.d.ts +1 -1
- package/dist/tools/souldinals.tools.js +10 -10
- package/dist/tools/stacking-lottery.tools.d.ts +1 -1
- package/dist/tools/stacking-lottery.tools.js +11 -11
- package/dist/tools/stacking.tools.d.ts +1 -1
- package/dist/tools/stacking.tools.js +13 -13
- package/dist/tools/stacks-market.tools.d.ts +1 -1
- package/dist/tools/stacks-market.tools.js +22 -22
- package/dist/tools/styx.tools.d.ts +1 -1
- package/dist/tools/styx.tools.js +11 -11
- package/dist/tools/taproot-multisig.tools.d.ts +1 -1
- package/dist/tools/taproot-multisig.tools.js +5 -5
- package/dist/tools/tenero.tools.d.ts +1 -1
- package/dist/tools/tenero.tools.js +22 -22
- package/dist/tools/tokens.tools.d.ts +1 -1
- package/dist/tools/tokens.tools.js +10 -10
- package/dist/tools/transfer.tools.d.ts +1 -1
- package/dist/tools/transfer.tools.js +4 -4
- package/dist/tools/wallet-management.tools.d.ts +1 -1
- package/dist/tools/wallet-management.tools.js +16 -16
- package/dist/tools/wallet.tools.d.ts +1 -1
- package/dist/tools/wallet.tools.js +2 -2
- package/dist/tools/yield-dashboard.tools.d.ts +1 -1
- package/dist/tools/yield-dashboard.tools.js +5 -5
- package/dist/tools/yield-hunter.tools.d.ts +1 -1
- package/dist/tools/yield-hunter.tools.js +6 -6
- package/dist/utils/fee.js +1 -1
- package/package.json +4 -3
- package/skill/SKILL.md +1 -1
|
@@ -127,7 +127,7 @@ Filters:
|
|
|
127
127
|
Each bounty record includes a derived 'status' field computed from its timestamps.
|
|
128
128
|
|
|
129
129
|
No authentication required.`,
|
|
130
|
-
inputSchema: {
|
|
130
|
+
inputSchema: z.object({
|
|
131
131
|
status: bountyStatusSchema
|
|
132
132
|
.optional()
|
|
133
133
|
.describe("Filter by computed status. Default: 'active' (excludes terminal states)."),
|
|
@@ -139,7 +139,7 @@ No authentication required.`,
|
|
|
139
139
|
tag: z.string().optional().describe("Filter by a single tag"),
|
|
140
140
|
limit: z.number().int().min(1).max(100).optional().describe("Max results (default 20, max 100)"),
|
|
141
141
|
offset: z.number().int().min(0).optional().describe("Pagination offset"),
|
|
142
|
-
},
|
|
142
|
+
}),
|
|
143
143
|
}, async ({ status, poster, submitter, tag, limit, offset }) => {
|
|
144
144
|
try {
|
|
145
145
|
const params = new URLSearchParams();
|
|
@@ -175,9 +175,9 @@ Returns the bounty record, the first page of submissions, and:
|
|
|
175
175
|
- 'payment' hint (when status='winner-announced'): expectedMemo='BNTY:{bountyId}', recipientStxAddress, amountSats, sbtcContract
|
|
176
176
|
|
|
177
177
|
No authentication required.`,
|
|
178
|
-
inputSchema: {
|
|
178
|
+
inputSchema: z.object({
|
|
179
179
|
bounty_id: z.string().describe("Bounty ID"),
|
|
180
|
-
},
|
|
180
|
+
}),
|
|
181
181
|
}, async ({ bounty_id }) => {
|
|
182
182
|
try {
|
|
183
183
|
const data = await getJson(`${BOUNTY_BASE}/${encodeURIComponent(bounty_id)}`);
|
|
@@ -196,11 +196,11 @@ No authentication required.`,
|
|
|
196
196
|
Submissions are public (the inbox is public, so are bounty submissions).
|
|
197
197
|
|
|
198
198
|
No authentication required.`,
|
|
199
|
-
inputSchema: {
|
|
199
|
+
inputSchema: z.object({
|
|
200
200
|
bounty_id: z.string().describe("Bounty ID"),
|
|
201
201
|
limit: z.number().int().min(1).max(100).optional().describe("Max results (default 20)"),
|
|
202
202
|
offset: z.number().int().min(0).optional().describe("Pagination offset"),
|
|
203
|
-
},
|
|
203
|
+
}),
|
|
204
204
|
}, async ({ bounty_id, limit, offset }) => {
|
|
205
205
|
try {
|
|
206
206
|
const params = new URLSearchParams();
|
|
@@ -231,7 +231,7 @@ Fields:
|
|
|
231
231
|
- tags: optional list (max 5 tags, max 24 chars each)
|
|
232
232
|
|
|
233
233
|
Signs with BIP-322 over: "AIBTC Bounty Create | {posterBtc} | {title} | {description} | {rewardSats} | {expiresAt} | {tagsCommaJoined} | {signedAt}"`,
|
|
234
|
-
inputSchema: {
|
|
234
|
+
inputSchema: z.object({
|
|
235
235
|
title: z.string().min(1).max(120).describe("Bounty title (max 120 chars)"),
|
|
236
236
|
description: z.string().min(1).max(4000).describe("Task description (max 4000 chars)"),
|
|
237
237
|
reward_sats: z.number().int().positive().describe("Reward in satoshis"),
|
|
@@ -239,7 +239,7 @@ Signs with BIP-322 over: "AIBTC Bounty Create | {posterBtc} | {title} | {descrip
|
|
|
239
239
|
.string()
|
|
240
240
|
.describe("ISO 8601 expiry timestamp (e.g. '2026-06-01T00:00:00Z'). Min 1 hour, max 365 days from now."),
|
|
241
241
|
tags: z.array(z.string().max(24)).max(5).optional().describe("Up to 5 tags"),
|
|
242
|
-
},
|
|
242
|
+
}),
|
|
243
243
|
}, async ({ title, description, reward_sats, expires_at, tags }) => {
|
|
244
244
|
try {
|
|
245
245
|
const account = await requireBtcAccount();
|
|
@@ -281,11 +281,11 @@ Fields:
|
|
|
281
281
|
|
|
282
282
|
Signs with BIP-322 over: "AIBTC Bounty Submit | {bountyId} | {submitterBtc} | {message} | {contentUrl} | {signedAt}"
|
|
283
283
|
(contentUrl is the empty string when omitted)`,
|
|
284
|
-
inputSchema: {
|
|
284
|
+
inputSchema: z.object({
|
|
285
285
|
bounty_id: z.string().describe("Bounty ID to submit to"),
|
|
286
286
|
message: z.string().min(1).max(2000).describe("Submission message (max 2000 chars)"),
|
|
287
287
|
content_url: z.string().optional().describe("Optional link to the deliverable"),
|
|
288
|
-
},
|
|
288
|
+
}),
|
|
289
289
|
}, async ({ bounty_id, message, content_url }) => {
|
|
290
290
|
try {
|
|
291
291
|
const account = await requireBtcAccount();
|
|
@@ -320,10 +320,10 @@ to use for the payout. The poster has 7 days after acceptedAt to prove payment
|
|
|
320
320
|
with bounty_paid before the bounty flips to 'abandoned'.
|
|
321
321
|
|
|
322
322
|
Signs with BIP-322 over: "AIBTC Bounty Accept | {bountyId} | {submissionId} | {signedAt}"`,
|
|
323
|
-
inputSchema: {
|
|
323
|
+
inputSchema: z.object({
|
|
324
324
|
bounty_id: z.string().describe("Bounty ID"),
|
|
325
325
|
submission_id: z.string().describe("Submission ID to accept as the winner"),
|
|
326
|
-
},
|
|
326
|
+
}),
|
|
327
327
|
}, async ({ bounty_id, submission_id }) => {
|
|
328
328
|
try {
|
|
329
329
|
const account = await requireBtcAccount();
|
|
@@ -358,12 +358,12 @@ recipient = winner STX, amount ≥ rewardSats, memo equals 'BNTY:{bountyId}' byt
|
|
|
358
358
|
tx time > acceptedAt − 60s. The same txid cannot pay two bounties.
|
|
359
359
|
|
|
360
360
|
Signs with BIP-322 over: "AIBTC Bounty Paid | {bountyId} | {txid} | {signedAt}"`,
|
|
361
|
-
inputSchema: {
|
|
361
|
+
inputSchema: z.object({
|
|
362
362
|
bounty_id: z.string().describe("Bounty ID being paid"),
|
|
363
363
|
txid: z
|
|
364
364
|
.string()
|
|
365
365
|
.describe("Confirmed Stacks tx ID for the sBTC transfer with memo 'BNTY:{bountyId}'"),
|
|
366
|
-
},
|
|
366
|
+
}),
|
|
367
367
|
}, async ({ bounty_id, txid }) => {
|
|
368
368
|
try {
|
|
369
369
|
const account = await requireBtcAccount();
|
|
@@ -388,9 +388,9 @@ Signs with BIP-322 over: "AIBTC Bounty Paid | {bountyId} | {txid} | {signedAt}"`
|
|
|
388
388
|
description: `Cancel a bounty. Only the poster can call this, and only while status is 'open' or 'judging' (i.e. before any submission has been accepted).
|
|
389
389
|
|
|
390
390
|
Signs with BIP-322 over: "AIBTC Bounty Cancel | {bountyId} | {signedAt}"`,
|
|
391
|
-
inputSchema: {
|
|
391
|
+
inputSchema: z.object({
|
|
392
392
|
bounty_id: z.string().describe("Bounty ID to cancel"),
|
|
393
|
-
},
|
|
393
|
+
}),
|
|
394
394
|
}, async ({ bounty_id }) => {
|
|
395
395
|
try {
|
|
396
396
|
const account = await requireBtcAccount();
|
|
@@ -419,7 +419,7 @@ which are still open for submissions, which are in 'judging', and which need a w
|
|
|
419
419
|
Pass status='paid' / 'cancelled' / 'abandoned' to see specific terminal states. Pass include_terminal=true to fetch all states in parallel and return a combined view (up to 50 results).
|
|
420
420
|
|
|
421
421
|
No authentication required.`,
|
|
422
|
-
inputSchema: {
|
|
422
|
+
inputSchema: z.object({
|
|
423
423
|
btc_address: z
|
|
424
424
|
.string()
|
|
425
425
|
.optional()
|
|
@@ -431,7 +431,7 @@ No authentication required.`,
|
|
|
431
431
|
.boolean()
|
|
432
432
|
.optional()
|
|
433
433
|
.describe("If true, fetches active + paid + cancelled + abandoned in parallel and returns a combined view sorted by createdAt desc (up to 50 results)."),
|
|
434
|
-
},
|
|
434
|
+
}),
|
|
435
435
|
}, async ({ btc_address, status, include_terminal }) => {
|
|
436
436
|
try {
|
|
437
437
|
let address = btc_address;
|
|
@@ -461,7 +461,7 @@ on any row to see whether your specific submission was the one accepted, and whe
|
|
|
461
461
|
By default returns up to 50 active (non-terminal) bounties. Pass include_terminal=true for a combined view across all states.
|
|
462
462
|
|
|
463
463
|
No authentication required.`,
|
|
464
|
-
inputSchema: {
|
|
464
|
+
inputSchema: z.object({
|
|
465
465
|
btc_address: z
|
|
466
466
|
.string()
|
|
467
467
|
.optional()
|
|
@@ -473,7 +473,7 @@ No authentication required.`,
|
|
|
473
473
|
.boolean()
|
|
474
474
|
.optional()
|
|
475
475
|
.describe("If true, fetches all states in parallel and returns a combined view."),
|
|
476
|
-
},
|
|
476
|
+
}),
|
|
477
477
|
}, async ({ btc_address, status, include_terminal }) => {
|
|
478
478
|
try {
|
|
479
479
|
let address = btc_address;
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
* - inscribe_child: Step 1 - Broadcast commit tx for child inscription
|
|
11
11
|
* - inscribe_child_reveal: Step 2 - Broadcast reveal tx after commit confirms
|
|
12
12
|
*/
|
|
13
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
13
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
14
14
|
export declare function registerChildInscriptionTools(server: McpServer): void;
|
|
15
15
|
//# sourceMappingURL=child-inscription.tools.d.ts.map
|
|
@@ -24,7 +24,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
24
24
|
description: "Calculate the total cost (in satoshis) for creating a child inscription. " +
|
|
25
25
|
"Accounts for the extra parent UTXO input and parent return output in the reveal transaction. " +
|
|
26
26
|
"Content should be provided as base64-encoded string.",
|
|
27
|
-
inputSchema: {
|
|
27
|
+
inputSchema: z.object({
|
|
28
28
|
contentType: z
|
|
29
29
|
.string()
|
|
30
30
|
.describe("MIME type (e.g., 'text/plain', 'image/png')"),
|
|
@@ -36,7 +36,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
36
36
|
.positive()
|
|
37
37
|
.optional()
|
|
38
38
|
.describe("Fee rate in sat/vB (optional, defaults to current medium fee)"),
|
|
39
|
-
},
|
|
39
|
+
}),
|
|
40
40
|
}, async ({ contentType, contentBase64, feeRate }) => {
|
|
41
41
|
try {
|
|
42
42
|
const body = Buffer.from(contentBase64, "base64");
|
|
@@ -90,7 +90,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
90
90
|
"This broadcasts the commit tx and returns immediately. After it confirms " +
|
|
91
91
|
"(typically 10-60 min), use `inscribe_child_reveal` to complete.\n\n" +
|
|
92
92
|
"Returns: commitTxid, revealAddress, revealAmount, parentInscriptionId, feeRate",
|
|
93
|
-
inputSchema: {
|
|
93
|
+
inputSchema: z.object({
|
|
94
94
|
contentType: z
|
|
95
95
|
.string()
|
|
96
96
|
.describe("MIME type (e.g., 'text/plain', 'image/png', 'text/html')"),
|
|
@@ -104,7 +104,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
104
104
|
.union([z.enum(["fast", "medium", "slow"]), z.number().positive()])
|
|
105
105
|
.optional()
|
|
106
106
|
.describe("Fee rate: 'fast' (~10 min), 'medium' (~30 min), 'slow' (~1 hr), or number in sat/vB (default: medium)"),
|
|
107
|
-
},
|
|
107
|
+
}),
|
|
108
108
|
}, async ({ contentType, contentBase64, parentInscriptionId, feeRate }) => {
|
|
109
109
|
try {
|
|
110
110
|
// Check wallet session
|
|
@@ -205,7 +205,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
205
205
|
"The reveal tx spends both the commit output and the parent inscription UTXO, " +
|
|
206
206
|
"returning the parent to your address and creating the child inscription.\n\n" +
|
|
207
207
|
"Returns: inscriptionId ({revealTxid}i0), parentInscriptionId on success",
|
|
208
|
-
inputSchema: {
|
|
208
|
+
inputSchema: z.object({
|
|
209
209
|
commitTxid: z
|
|
210
210
|
.string()
|
|
211
211
|
.length(64)
|
|
@@ -227,7 +227,7 @@ export function registerChildInscriptionTools(server) {
|
|
|
227
227
|
.union([z.enum(["fast", "medium", "slow"]), z.number().positive()])
|
|
228
228
|
.optional()
|
|
229
229
|
.describe("Fee rate for reveal tx (default: medium)"),
|
|
230
|
-
},
|
|
230
|
+
}),
|
|
231
231
|
}, async ({ commitTxid, revealAmount, contentType, contentBase64, parentInscriptionId, feeRate, }) => {
|
|
232
232
|
try {
|
|
233
233
|
// Check wallet session
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
* API spec + verifier implementation: aibtcdev/landing-page#734 (Phase 3.1).
|
|
20
20
|
* Schema source of truth: docs/rfc-d1-schema.md §swaps (migration 005).
|
|
21
21
|
*/
|
|
22
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
22
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
23
23
|
export declare function registerCompetitionTools(server: McpServer): void;
|
|
24
24
|
//# sourceMappingURL=competition.tools.d.ts.map
|
|
@@ -296,7 +296,7 @@ over the agent's swaps where \`tx_status === "success"\`. Prices come from Tener
|
|
|
296
296
|
- \`methodology: "mark_to_current"\`, \`priced_at\`: unix-millis stamp.
|
|
297
297
|
|
|
298
298
|
To be eligible for scoring, the agent needs **both** an aibtc.com website registration (dual-sig flow at https://aibtc.com) **and** an ERC-8004 agent_id (via \`identity_register\`). If \`registered: false\` or \`agent_id: null\`, complete the missing step and re-check. Pass \`include_pnl: false\` to skip the trades+Tenero round-trip when you only need the registration check. If no address is provided, uses the active wallet's Stacks address.`,
|
|
299
|
-
inputSchema: {
|
|
299
|
+
inputSchema: z.object({
|
|
300
300
|
address: stacksAddressSchema
|
|
301
301
|
.optional()
|
|
302
302
|
.describe("Stacks address of the agent. Defaults to the active wallet."),
|
|
@@ -304,7 +304,7 @@ To be eligible for scoring, the agent needs **both** an aibtc.com website regist
|
|
|
304
304
|
.boolean()
|
|
305
305
|
.optional()
|
|
306
306
|
.describe("Compute and attach `campaign_stats` (mark-to-current P&L over the agent's successful swaps). Defaults to true. Set false to skip the trades + Tenero round-trips when you only need the registration check."),
|
|
307
|
-
},
|
|
307
|
+
}),
|
|
308
308
|
}, async ({ address, include_pnl }) => {
|
|
309
309
|
try {
|
|
310
310
|
const target = await resolveAddress(address);
|
|
@@ -325,7 +325,7 @@ To be eligible for scoring, the agent needs **both** an aibtc.com website regist
|
|
|
325
325
|
description: `List an agent's trades from the concluded AIBTC trading competition.
|
|
326
326
|
|
|
327
327
|
Covers txids the agent submitted while the competition ran and txids discovered via passive address monitoring. Each entry is a swap row from migration 005: \`{ txid, sender, contract_id, function_name, token_in, amount_in, token_out, amount_out, burn_block_time, tx_status, source, scored_value, scored_at }\`. \`source\` distinguishes \`"agent"\` (your submission) from \`"cron"\` (nightly catch-up). Response: \`{ trades, next_cursor }\` — opaque cursor for pagination. If no address is provided, uses the active wallet's Stacks address.`,
|
|
328
|
-
inputSchema: {
|
|
328
|
+
inputSchema: z.object({
|
|
329
329
|
address: stacksAddressSchema
|
|
330
330
|
.optional()
|
|
331
331
|
.describe("Stacks address of the agent. Defaults to the active wallet."),
|
|
@@ -339,7 +339,7 @@ Covers txids the agent submitted while the competition ran and txids discovered
|
|
|
339
339
|
.string()
|
|
340
340
|
.optional()
|
|
341
341
|
.describe("Opaque pagination cursor from a previous response."),
|
|
342
|
-
},
|
|
342
|
+
}),
|
|
343
343
|
}, async ({ address, limit, cursor }) => {
|
|
344
344
|
try {
|
|
345
345
|
const target = await resolveAddress(address);
|
|
@@ -93,7 +93,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
93
93
|
- STX: {type: 'stx', principal: 'SP...', conditionCode: 'eq'|'gt'|'gte'|'lt'|'lte', amount: '1000000'}
|
|
94
94
|
- FT: {type: 'ft', principal: 'SP...', asset: 'SP...contract', assetName: 'token-name', conditionCode: 'eq', amount: '1000'}
|
|
95
95
|
- NFT: {type: 'nft', principal: 'SP...', asset: 'SP...contract', assetName: 'nft-name', tokenId: '1', notSend?: boolean}`,
|
|
96
|
-
inputSchema: {
|
|
96
|
+
inputSchema: z.object({
|
|
97
97
|
contractAddress: z.string().describe("The contract deployer's address (e.g., SP2...)"),
|
|
98
98
|
contractName: z.string().describe("The contract name (e.g., 'my-token')"),
|
|
99
99
|
functionName: z.string().describe("The function to call (e.g., 'transfer')"),
|
|
@@ -114,7 +114,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
114
114
|
.optional()
|
|
115
115
|
.describe("Optional fee: 'low' | 'medium' | 'high' preset or micro-STX amount. Clamped to 50,000 uSTX max for contract calls. If omitted, medium-priority fee is auto-resolved. Ignored when sponsored=true."),
|
|
116
116
|
sponsored: sponsoredSchema,
|
|
117
|
-
},
|
|
117
|
+
}),
|
|
118
118
|
}, async ({ contractAddress, contractName, functionName, functionArgs, postConditionMode, postConditions, fee, sponsored }) => {
|
|
119
119
|
try {
|
|
120
120
|
const account = await getAccount();
|
|
@@ -162,7 +162,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
162
162
|
// Deploy contract
|
|
163
163
|
server.registerTool("deploy_contract", {
|
|
164
164
|
description: "Deploy a Clarity smart contract to the Stacks blockchain.",
|
|
165
|
-
inputSchema: {
|
|
165
|
+
inputSchema: z.object({
|
|
166
166
|
contractName: z.string().describe("Unique name for the contract (lowercase, hyphens allowed)"),
|
|
167
167
|
codeBody: z.string().describe("The complete Clarity source code"),
|
|
168
168
|
fee: z
|
|
@@ -170,7 +170,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
170
170
|
.optional()
|
|
171
171
|
.describe("Optional fee: 'low' | 'medium' | 'high' preset or micro-STX amount. Clamped to 50,000 uSTX max for deployments. If omitted, medium-priority fee is auto-resolved. Ignored when sponsored=true."),
|
|
172
172
|
sponsored: sponsoredSchema,
|
|
173
|
-
},
|
|
173
|
+
}),
|
|
174
174
|
}, async ({ contractName, codeBody, fee, sponsored }) => {
|
|
175
175
|
try {
|
|
176
176
|
const account = await getAccount();
|
|
@@ -203,9 +203,9 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
203
203
|
// Get transaction status
|
|
204
204
|
server.registerTool("get_transaction_status", {
|
|
205
205
|
description: "Check the status of a Stacks transaction by its txid.",
|
|
206
|
-
inputSchema: {
|
|
206
|
+
inputSchema: z.object({
|
|
207
207
|
txid: z.string().describe("The transaction ID (64 character hex string)"),
|
|
208
|
-
},
|
|
208
|
+
}),
|
|
209
209
|
}, async ({ txid }) => {
|
|
210
210
|
try {
|
|
211
211
|
const status = await getTransactionStatus(txid, NETWORK);
|
|
@@ -223,7 +223,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
223
223
|
// Call read-only function
|
|
224
224
|
server.registerTool("call_read_only_function", {
|
|
225
225
|
description: "Call a read-only function on a smart contract (no signing required).",
|
|
226
|
-
inputSchema: {
|
|
226
|
+
inputSchema: z.object({
|
|
227
227
|
contractId: z.string().describe("Contract ID in format: address.contract-name"),
|
|
228
228
|
functionName: z.string().describe("The read-only function to call"),
|
|
229
229
|
functionArgs: z
|
|
@@ -231,7 +231,7 @@ Post conditions constrain what assets the transaction can move. Each condition i
|
|
|
231
231
|
.default([])
|
|
232
232
|
.describe("Function arguments. For explicit types: {type: 'uint'|'int'|'principal'|..., value: ...}"),
|
|
233
233
|
senderAddress: z.string().optional().describe("Optional sender address for the call"),
|
|
234
|
-
},
|
|
234
|
+
}),
|
|
235
235
|
}, async ({ contractId, functionName, functionArgs, senderAddress }) => {
|
|
236
236
|
try {
|
|
237
237
|
const hiro = getHiroApi(NETWORK);
|
|
@@ -22,7 +22,7 @@ export function registerCredentialsTools(server) {
|
|
|
22
22
|
*/
|
|
23
23
|
server.registerTool("credentials_list", {
|
|
24
24
|
description: "List all stored credentials. Shows service names, key names, and last-updated timestamps. Does NOT reveal credential values.",
|
|
25
|
-
inputSchema: {},
|
|
25
|
+
inputSchema: z.object({}),
|
|
26
26
|
}, async () => {
|
|
27
27
|
try {
|
|
28
28
|
await ensureUnlocked();
|
|
@@ -42,10 +42,10 @@ export function registerCredentialsTools(server) {
|
|
|
42
42
|
*/
|
|
43
43
|
server.registerTool("credentials_get", {
|
|
44
44
|
description: "Retrieve a stored credential value by service and key. Returns the decrypted value. WARNING: The returned value is sensitive — do not log or display it unnecessarily.",
|
|
45
|
-
inputSchema: {
|
|
45
|
+
inputSchema: z.object({
|
|
46
46
|
service: z.string().min(1).describe("Service name (e.g. 'github', 'openrouter')"),
|
|
47
47
|
key: z.string().min(1).describe("Key name within the service (e.g. 'api_key', 'token')"),
|
|
48
|
-
},
|
|
48
|
+
}),
|
|
49
49
|
}, async ({ service, key }) => {
|
|
50
50
|
try {
|
|
51
51
|
await ensureUnlocked();
|
|
@@ -74,14 +74,14 @@ export function registerCredentialsTools(server) {
|
|
|
74
74
|
*/
|
|
75
75
|
server.registerTool("credentials_set", {
|
|
76
76
|
description: "Store or update a credential. Encrypts the value with AES-256-GCM and saves to ~/.aibtc/credentials.enc. If the service/key pair already exists, it is updated.",
|
|
77
|
-
inputSchema: {
|
|
77
|
+
inputSchema: z.object({
|
|
78
78
|
service: z.string().min(1).describe("Service name (e.g. 'github', 'openrouter')"),
|
|
79
79
|
key: z.string().min(1).describe("Key name within the service (e.g. 'api_key', 'token')"),
|
|
80
80
|
value: z
|
|
81
81
|
.string()
|
|
82
82
|
.min(1)
|
|
83
83
|
.describe("The credential value to store — WARNING: sensitive"),
|
|
84
|
-
},
|
|
84
|
+
}),
|
|
85
85
|
}, async ({ service, key, value }) => {
|
|
86
86
|
try {
|
|
87
87
|
await ensureUnlocked();
|
|
@@ -104,10 +104,10 @@ export function registerCredentialsTools(server) {
|
|
|
104
104
|
*/
|
|
105
105
|
server.registerTool("credentials_delete", {
|
|
106
106
|
description: "Remove a stored credential by service and key. The encrypted store file is rewritten without the deleted entry.",
|
|
107
|
-
inputSchema: {
|
|
107
|
+
inputSchema: z.object({
|
|
108
108
|
service: z.string().min(1).describe("Service name (e.g. 'github', 'openrouter')"),
|
|
109
109
|
key: z.string().min(1).describe("Key name within the service (e.g. 'api_key', 'token')"),
|
|
110
|
-
},
|
|
110
|
+
}),
|
|
111
111
|
}, async ({ service, key }) => {
|
|
112
112
|
try {
|
|
113
113
|
await ensureUnlocked();
|
|
@@ -130,7 +130,7 @@ export function registerCredentialsTools(server) {
|
|
|
130
130
|
*/
|
|
131
131
|
server.registerTool("credentials_unlock", {
|
|
132
132
|
description: "Verify that the credential store password works and show store info. Uses ARC_CREDS_PASSWORD env var. Creates a new empty store if none exists.",
|
|
133
|
-
inputSchema: {},
|
|
133
|
+
inputSchema: z.object({}),
|
|
134
134
|
}, async () => {
|
|
135
135
|
try {
|
|
136
136
|
await credentials.unlock();
|
package/dist/tools/defi.tools.js
CHANGED
|
@@ -15,11 +15,11 @@ Returns the expected output amount for swapping tokenX to tokenY.
|
|
|
15
15
|
Use full contract IDs for tokens (e.g., 'SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-wstx-v2').
|
|
16
16
|
|
|
17
17
|
Note: ALEX DEX is only available on mainnet.`,
|
|
18
|
-
inputSchema: {
|
|
18
|
+
inputSchema: z.object({
|
|
19
19
|
tokenX: z.string().describe("Input token contract ID"),
|
|
20
20
|
tokenY: z.string().describe("Output token contract ID"),
|
|
21
21
|
amountIn: z.string().describe("Amount of tokenX to swap (in smallest units)"),
|
|
22
|
-
},
|
|
22
|
+
}),
|
|
23
23
|
}, async ({ tokenX, tokenY, amountIn }) => {
|
|
24
24
|
try {
|
|
25
25
|
if (NETWORK !== "mainnet") {
|
|
@@ -54,7 +54,7 @@ Swaps tokenX for tokenY using the ALEX AMM.
|
|
|
54
54
|
Use full contract IDs for tokens.
|
|
55
55
|
|
|
56
56
|
Note: ALEX DEX is only available on mainnet.`,
|
|
57
|
-
inputSchema: {
|
|
57
|
+
inputSchema: z.object({
|
|
58
58
|
tokenX: z.string().describe("Input token contract ID"),
|
|
59
59
|
tokenY: z.string().describe("Output token contract ID"),
|
|
60
60
|
amountIn: z.string().describe("Amount of tokenX to swap (in smallest units)"),
|
|
@@ -63,7 +63,7 @@ Note: ALEX DEX is only available on mainnet.`,
|
|
|
63
63
|
.optional()
|
|
64
64
|
.default("0")
|
|
65
65
|
.describe("Minimum acceptable output amount (slippage protection)"),
|
|
66
|
-
},
|
|
66
|
+
}),
|
|
67
67
|
}, async ({ tokenX, tokenY, amountIn, minAmountOut }) => {
|
|
68
68
|
try {
|
|
69
69
|
if (NETWORK !== "mainnet") {
|
|
@@ -99,10 +99,10 @@ Note: ALEX DEX is only available on mainnet.`,
|
|
|
99
99
|
Returns reserve balances and pool details for a token pair.
|
|
100
100
|
|
|
101
101
|
Note: ALEX DEX is only available on mainnet.`,
|
|
102
|
-
inputSchema: {
|
|
102
|
+
inputSchema: z.object({
|
|
103
103
|
tokenX: z.string().describe("First token contract ID"),
|
|
104
104
|
tokenY: z.string().describe("Second token contract ID"),
|
|
105
|
-
},
|
|
105
|
+
}),
|
|
106
106
|
}, async ({ tokenX, tokenY }) => {
|
|
107
107
|
try {
|
|
108
108
|
if (NETWORK !== "mainnet") {
|
|
@@ -140,13 +140,13 @@ Returns pool ID, token pair, and factor (fee tier) for each pool.
|
|
|
140
140
|
Use this to find which tokens can be swapped before calling alex_swap.
|
|
141
141
|
|
|
142
142
|
Note: ALEX DEX is only available on mainnet.`,
|
|
143
|
-
inputSchema: {
|
|
143
|
+
inputSchema: z.object({
|
|
144
144
|
limit: z
|
|
145
145
|
.number()
|
|
146
146
|
.optional()
|
|
147
147
|
.default(50)
|
|
148
148
|
.describe("Maximum number of pools to return (default 50)"),
|
|
149
|
-
},
|
|
149
|
+
}),
|
|
150
150
|
}, async ({ limit }) => {
|
|
151
151
|
try {
|
|
152
152
|
if (NETWORK !== "mainnet") {
|
|
@@ -187,7 +187,7 @@ Each asset includes its symbol, name, and contract ID.
|
|
|
187
187
|
Supported assets: wSTX, sBTC, stSTX, USDC, USDH, stSTXbtc.
|
|
188
188
|
|
|
189
189
|
Note: Zest Protocol is only available on mainnet.`,
|
|
190
|
-
inputSchema: {},
|
|
190
|
+
inputSchema: z.object({}),
|
|
191
191
|
}, async () => {
|
|
192
192
|
try {
|
|
193
193
|
if (NETWORK !== "mainnet") {
|
|
@@ -223,13 +223,13 @@ Returns collateral, debt, health factor, and LTV data across all assets.
|
|
|
223
223
|
The position query returns USD-denominated totals.
|
|
224
224
|
|
|
225
225
|
Note: Zest Protocol is only available on mainnet.`,
|
|
226
|
-
inputSchema: {
|
|
226
|
+
inputSchema: z.object({
|
|
227
227
|
asset: z.string().default("sBTC").describe("Asset symbol (e.g., 'sBTC', 'USDC') or full contract ID"),
|
|
228
228
|
address: z
|
|
229
229
|
.string()
|
|
230
230
|
.optional()
|
|
231
231
|
.describe("User address (uses wallet if not specified)"),
|
|
232
|
-
},
|
|
232
|
+
}),
|
|
233
233
|
}, async ({ asset, address }) => {
|
|
234
234
|
try {
|
|
235
235
|
if (NETWORK !== "mainnet") {
|
|
@@ -272,10 +272,10 @@ You can use the asset symbol (e.g., 'sBTC', 'USDC') or full contract ID.
|
|
|
272
272
|
Supported assets: wSTX, sBTC, stSTX, USDC, USDH, stSTXbtc.
|
|
273
273
|
|
|
274
274
|
Note: Zest Protocol is only available on mainnet.`,
|
|
275
|
-
inputSchema: {
|
|
275
|
+
inputSchema: z.object({
|
|
276
276
|
asset: z.string().describe("Asset symbol (e.g., 'sBTC', 'USDC') or full contract ID"),
|
|
277
277
|
amount: z.string().describe("Amount to supply (in smallest units)"),
|
|
278
|
-
},
|
|
278
|
+
}),
|
|
279
279
|
}, async ({ asset, amount }) => {
|
|
280
280
|
try {
|
|
281
281
|
if (NETWORK !== "mainnet") {
|
|
@@ -310,10 +310,10 @@ Removes collateral and redeems for underlying assets in one atomic operation.
|
|
|
310
310
|
You can use the asset symbol (e.g., 'sBTC', 'USDC') or full contract ID.
|
|
311
311
|
|
|
312
312
|
Note: Amount is in zToken shares. Zest Protocol is only available on mainnet.`,
|
|
313
|
-
inputSchema: {
|
|
313
|
+
inputSchema: z.object({
|
|
314
314
|
asset: z.string().describe("Asset symbol (e.g., 'sBTC', 'USDC') or full contract ID"),
|
|
315
315
|
amount: z.string().describe("Amount of zToken shares to withdraw"),
|
|
316
|
-
},
|
|
316
|
+
}),
|
|
317
317
|
}, async ({ asset, amount }) => {
|
|
318
318
|
try {
|
|
319
319
|
if (NETWORK !== "mainnet") {
|
|
@@ -351,10 +351,10 @@ You can use the asset symbol (e.g., 'USDC', 'sBTC') or full contract ID.
|
|
|
351
351
|
Three LTV tiers: ~75% (borrow limit), ~85% (partial liquidation), ~95% (full liquidation).
|
|
352
352
|
|
|
353
353
|
Note: Zest Protocol is only available on mainnet.`,
|
|
354
|
-
inputSchema: {
|
|
354
|
+
inputSchema: z.object({
|
|
355
355
|
asset: z.string().describe("Asset symbol (e.g., 'sBTC', 'USDC') or full contract ID"),
|
|
356
356
|
amount: z.string().describe("Amount to borrow (in smallest units)"),
|
|
357
|
-
},
|
|
357
|
+
}),
|
|
358
358
|
}, async ({ asset, amount }) => {
|
|
359
359
|
try {
|
|
360
360
|
if (NETWORK !== "mainnet") {
|
|
@@ -392,10 +392,10 @@ Note: zest_supply already handles this atomically via supply-collateral-add.
|
|
|
392
392
|
This tool is only needed if you used vault deposit separately.
|
|
393
393
|
|
|
394
394
|
Mainnet only.`,
|
|
395
|
-
inputSchema: {
|
|
395
|
+
inputSchema: z.object({
|
|
396
396
|
asset: z.string().describe("Asset symbol (e.g., 'sBTC', 'USDC') or full contract ID"),
|
|
397
397
|
amount: z.string().describe("Amount of zTokens to add as collateral (in smallest units)"),
|
|
398
|
-
},
|
|
398
|
+
}),
|
|
399
399
|
}, async ({ asset, amount }) => {
|
|
400
400
|
try {
|
|
401
401
|
if (NETWORK !== "mainnet") {
|
|
@@ -430,14 +430,14 @@ Repays borrowed assets plus accrued interest.
|
|
|
430
430
|
You can use the asset symbol (e.g., 'USDC', 'sBTC') or full contract ID.
|
|
431
431
|
|
|
432
432
|
Note: Zest Protocol is only available on mainnet.`,
|
|
433
|
-
inputSchema: {
|
|
433
|
+
inputSchema: z.object({
|
|
434
434
|
asset: z.string().describe("Asset symbol (e.g., 'sBTC', 'USDC') or full contract ID"),
|
|
435
435
|
amount: z.string().describe("Amount to repay (in smallest units)"),
|
|
436
436
|
onBehalfOf: z
|
|
437
437
|
.string()
|
|
438
438
|
.optional()
|
|
439
439
|
.describe("Optional: repay on behalf of another address"),
|
|
440
|
-
},
|
|
440
|
+
}),
|
|
441
441
|
}, async ({ asset, amount, onBehalfOf }) => {
|
|
442
442
|
try {
|
|
443
443
|
if (NETWORK !== "mainnet") {
|
|
@@ -103,12 +103,12 @@ Returns enrollment state for both the current and next cycle, the APR range
|
|
|
103
103
|
(higher with more stacked STX), minimum enrollment amount, and current cycle data.
|
|
104
104
|
|
|
105
105
|
Note: Dual Stacking is only available on mainnet.`,
|
|
106
|
-
inputSchema: {
|
|
106
|
+
inputSchema: z.object({
|
|
107
107
|
address: z
|
|
108
108
|
.string()
|
|
109
109
|
.optional()
|
|
110
110
|
.describe("Address to check. Uses configured wallet if not provided."),
|
|
111
|
-
},
|
|
111
|
+
}),
|
|
112
112
|
}, async ({ address }) => {
|
|
113
113
|
try {
|
|
114
114
|
if (NETWORK !== "mainnet") {
|
|
@@ -231,7 +231,7 @@ The rollback parameter lets you look up rewards from a specific snapshot offset
|
|
|
231
231
|
within the cycle (default 0 = most recent).
|
|
232
232
|
|
|
233
233
|
Note: Dual Stacking is only available on mainnet.`,
|
|
234
|
-
inputSchema: {
|
|
234
|
+
inputSchema: z.object({
|
|
235
235
|
cycle: z.number().describe("Cycle number to query rewards for"),
|
|
236
236
|
address: z
|
|
237
237
|
.string()
|
|
@@ -242,7 +242,7 @@ Note: Dual Stacking is only available on mainnet.`,
|
|
|
242
242
|
.optional()
|
|
243
243
|
.default(0)
|
|
244
244
|
.describe("Snapshot rollback offset within the cycle (default 0)"),
|
|
245
|
-
},
|
|
245
|
+
}),
|
|
246
246
|
}, async ({ cycle, address, rollback }) => {
|
|
247
247
|
try {
|
|
248
248
|
if (NETWORK !== "mainnet") {
|
|
@@ -290,12 +290,12 @@ address than the signing wallet. If omitted, rewards go to the signing wallet.
|
|
|
290
290
|
Requires an unlocked wallet with sufficient sBTC balance.
|
|
291
291
|
|
|
292
292
|
Note: Dual Stacking is only available on mainnet.`,
|
|
293
|
-
inputSchema: {
|
|
293
|
+
inputSchema: z.object({
|
|
294
294
|
rewardAddress: z
|
|
295
295
|
.string()
|
|
296
296
|
.optional()
|
|
297
297
|
.describe("Optional Stacks address to receive sBTC rewards. Uses signing wallet address if not provided."),
|
|
298
|
-
},
|
|
298
|
+
}),
|
|
299
299
|
}, async ({ rewardAddress }) => {
|
|
300
300
|
try {
|
|
301
301
|
if (NETWORK !== "mainnet") {
|
|
@@ -337,7 +337,7 @@ the start of the next PoX cycle; you continue to earn rewards for the current cy
|
|
|
337
337
|
Requires an unlocked wallet.
|
|
338
338
|
|
|
339
339
|
Note: Dual Stacking is only available on mainnet.`,
|
|
340
|
-
inputSchema: {},
|
|
340
|
+
inputSchema: z.object({}),
|
|
341
341
|
}, async () => {
|
|
342
342
|
try {
|
|
343
343
|
if (NETWORK !== "mainnet") {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* DeFi yields, bounties, deploy paid endpoints). News correspondent and the
|
|
11
11
|
* trading competition are intentionally excluded from this menu.
|
|
12
12
|
*/
|
|
13
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
13
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
14
14
|
export interface EarningStrategy {
|
|
15
15
|
/** Stable id for filtering. */
|
|
16
16
|
id: string;
|
|
@@ -71,12 +71,12 @@ Each entry: \`{ id, name, assets, returns, summary, start_with, reference? }\` w
|
|
|
71
71
|
Optional \`asset\` filter (e.g. "STX", "sBTC") returns only strategies that put that asset to work — useful for "what can I do with the STX I hold?". Matching is case-insensitive substring over each strategy's \`assets\`.
|
|
72
72
|
|
|
73
73
|
Aligned with aibtc.com. The trading competition and news correspondent are intentionally not part of this menu.`,
|
|
74
|
-
inputSchema: {
|
|
74
|
+
inputSchema: z.object({
|
|
75
75
|
asset: z
|
|
76
76
|
.string()
|
|
77
77
|
.optional()
|
|
78
78
|
.describe('Optional asset filter (e.g. "STX", "sBTC"). Returns only strategies that use a matching asset.'),
|
|
79
|
-
},
|
|
79
|
+
}),
|
|
80
80
|
}, async ({ asset }) => {
|
|
81
81
|
try {
|
|
82
82
|
const filtered = asset
|