@continuumdao/ctm-mpc-defi 0.2.3 → 0.2.4
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/dist/agent/catalog.cjs +406 -31
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +836 -1
- package/dist/agent/catalog.js +389 -32
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/aave-v4/SKILL.md +120 -14
- package/dist/agent/skills/curve-dao/SKILL.md +125 -6
- package/dist/agent/skills/uniswap-v4/SKILL.md +187 -11
- package/dist/index.cjs +756 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +757 -5
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/curve-dao/index.cjs +15 -2
- package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/curve-dao/index.js +15 -2
- package/dist/protocols/evm/curve-dao/index.js.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs +1007 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.d.ts +304 -4
- package/dist/protocols/evm/uniswap-v4/index.js +965 -3
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/package.json +1 -1
package/dist/agent/catalog.cjs
CHANGED
|
@@ -133,6 +133,52 @@ var uniswapV4ProtocolModule = {
|
|
|
133
133
|
amount: { type: "string", required: true, description: "Amount for quote" },
|
|
134
134
|
type: { type: "EXACT_INPUT | EXACT_OUTPUT", required: true, description: "Trade type" }
|
|
135
135
|
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: "uniswap-v4.mint-liquidity",
|
|
139
|
+
protocolId: UNISWAP_V4_PROTOCOL_ID,
|
|
140
|
+
chainCategory: "evm",
|
|
141
|
+
description: "Mint a new Uniswap V4 concentrated liquidity position (Position Manager NFT)",
|
|
142
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
143
|
+
params: {
|
|
144
|
+
lpResponse: { type: "object", required: true, description: "Full LP API create response" },
|
|
145
|
+
nativeWrapped: { type: "address", required: false, description: "WETH when pool uses native ETH" },
|
|
146
|
+
poolReference: { type: "string", required: false, description: "V4 pool id" },
|
|
147
|
+
uniswapApiKey: { type: "string", required: true, description: "Uniswap API key" }
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "uniswap-v4.increase-liquidity",
|
|
152
|
+
protocolId: UNISWAP_V4_PROTOCOL_ID,
|
|
153
|
+
chainCategory: "evm",
|
|
154
|
+
description: "Increase liquidity on an existing Uniswap V4 position NFT",
|
|
155
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
156
|
+
params: {
|
|
157
|
+
nftTokenId: { type: "string", required: true, description: "Position NFT token id" },
|
|
158
|
+
lpResponse: { type: "object", required: true, description: "Full LP API increase response" }
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: "uniswap-v4.decrease-liquidity",
|
|
163
|
+
protocolId: UNISWAP_V4_PROTOCOL_ID,
|
|
164
|
+
chainCategory: "evm",
|
|
165
|
+
description: "Decrease liquidity on an existing Uniswap V4 position NFT",
|
|
166
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
167
|
+
params: {
|
|
168
|
+
nftTokenId: { type: "string", required: true, description: "Position NFT token id" },
|
|
169
|
+
lpResponse: { type: "object", required: true, description: "Full LP API decrease response" }
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: "uniswap-v4.collect-fees",
|
|
174
|
+
protocolId: UNISWAP_V4_PROTOCOL_ID,
|
|
175
|
+
chainCategory: "evm",
|
|
176
|
+
description: "Collect accrued fees from a Uniswap V4 position NFT",
|
|
177
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
178
|
+
params: {
|
|
179
|
+
nftTokenId: { type: "string", required: true, description: "Position NFT token id" },
|
|
180
|
+
lpResponse: { type: "object", required: true, description: "Full LP API claim response" }
|
|
181
|
+
}
|
|
136
182
|
}
|
|
137
183
|
]
|
|
138
184
|
};
|
|
@@ -523,6 +569,133 @@ var mcpUniswapV4BuildSwapMultisignInputSchema = evmMultisignCommonInputSchema.ex
|
|
|
523
569
|
swapDeadlineUnix: zod.z.number().describe("Same deadline passed to create_swap"),
|
|
524
570
|
slippagePercent: zod.z.number().optional().describe("Extra approve headroom for EXACT_OUTPUT")
|
|
525
571
|
});
|
|
572
|
+
var lpExistingPoolSchema = zod.z.object({
|
|
573
|
+
token0Address: evmAddressSchema,
|
|
574
|
+
token1Address: evmAddressSchema,
|
|
575
|
+
poolReference: zod.z.string().min(1).describe("V4 pool id (bytes32 hex)")
|
|
576
|
+
});
|
|
577
|
+
var lpNewPoolSchema = zod.z.object({
|
|
578
|
+
token0Address: evmAddressSchema,
|
|
579
|
+
token1Address: evmAddressSchema,
|
|
580
|
+
fee: zod.z.number().int().nonnegative(),
|
|
581
|
+
tickSpacing: zod.z.number().int().positive(),
|
|
582
|
+
hooks: evmAddressSchema.optional(),
|
|
583
|
+
initialPrice: zod.z.string().min(1).describe("sqrtRatioX96 string for new pool")
|
|
584
|
+
});
|
|
585
|
+
var lpIndependentTokenSchema = zod.z.object({
|
|
586
|
+
tokenAddress: evmAddressSchema.describe("0x0 for native ETH"),
|
|
587
|
+
amount: zod.z.string().min(1).describe("Amount in token base units (wei)")
|
|
588
|
+
});
|
|
589
|
+
var lpPriceBoundsSchema = zod.z.object({
|
|
590
|
+
minPrice: zod.z.string().min(1),
|
|
591
|
+
maxPrice: zod.z.string().min(1)
|
|
592
|
+
});
|
|
593
|
+
var lpTickBoundsSchema = zod.z.object({
|
|
594
|
+
tickLower: zod.z.number().int(),
|
|
595
|
+
tickUpper: zod.z.number().int()
|
|
596
|
+
});
|
|
597
|
+
var lpCommonApiInputSchema = zod.z.object({
|
|
598
|
+
uniswapApiKey: zod.z.string().min(1),
|
|
599
|
+
walletAddress: evmAddressSchema.optional(),
|
|
600
|
+
chainId: zod.z.union([zod.z.number().int().positive(), zod.z.string().min(1)]),
|
|
601
|
+
slippageTolerance: zod.z.number().optional(),
|
|
602
|
+
simulateTransaction: zod.z.boolean().optional(),
|
|
603
|
+
baseUrl: zod.z.string().optional(),
|
|
604
|
+
keyGen: zod.z.string().optional(),
|
|
605
|
+
managementNodeUrl: zod.z.string().optional()
|
|
606
|
+
});
|
|
607
|
+
var mcpUniswapV4LpCreatePositionInputSchema = lpCommonApiInputSchema.extend({
|
|
608
|
+
existingPool: lpExistingPoolSchema.optional(),
|
|
609
|
+
newPool: lpNewPoolSchema.optional(),
|
|
610
|
+
independentToken: lpIndependentTokenSchema,
|
|
611
|
+
priceBounds: lpPriceBoundsSchema.optional(),
|
|
612
|
+
tickBounds: lpTickBoundsSchema.optional()
|
|
613
|
+
});
|
|
614
|
+
var mcpUniswapV4LpCreatePositionOutputSchema = jsonObjectSchema;
|
|
615
|
+
var mcpUniswapV4LpIncreaseInputSchema = lpCommonApiInputSchema.extend({
|
|
616
|
+
token0Address: evmAddressSchema,
|
|
617
|
+
token1Address: evmAddressSchema,
|
|
618
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
619
|
+
independentToken: lpIndependentTokenSchema
|
|
620
|
+
});
|
|
621
|
+
var mcpUniswapV4LpIncreaseOutputSchema = jsonObjectSchema;
|
|
622
|
+
var mcpUniswapV4LpDecreaseInputSchema = lpCommonApiInputSchema.extend({
|
|
623
|
+
token0Address: evmAddressSchema,
|
|
624
|
+
token1Address: evmAddressSchema,
|
|
625
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
626
|
+
liquidityPercentageToDecrease: zod.z.number().int().min(1).max(100)
|
|
627
|
+
});
|
|
628
|
+
var mcpUniswapV4LpDecreaseOutputSchema = jsonObjectSchema;
|
|
629
|
+
var mcpUniswapV4LpClaimInputSchema = lpCommonApiInputSchema.extend({
|
|
630
|
+
tokenId: zod.z.union([zod.z.string(), zod.z.number()])
|
|
631
|
+
});
|
|
632
|
+
var mcpUniswapV4LpClaimOutputSchema = jsonObjectSchema;
|
|
633
|
+
var mcpUniswapV4LpListPositionsInputSchema = zod.z.object({
|
|
634
|
+
chainId: zod.z.union([zod.z.number().int().positive(), zod.z.string().min(1)]),
|
|
635
|
+
keyGenId: zod.z.string().min(1).optional(),
|
|
636
|
+
walletAddress: evmAddressSchema.optional(),
|
|
637
|
+
positionManagerAddress: evmAddressSchema.optional()
|
|
638
|
+
});
|
|
639
|
+
var mcpUniswapV4LpListPositionsOutputSchema = zod.z.object({
|
|
640
|
+
source: zod.z.literal("token_registry"),
|
|
641
|
+
positions: zod.z.array(
|
|
642
|
+
zod.z.object({
|
|
643
|
+
tokenId: zod.z.string(),
|
|
644
|
+
positionManager: evmAddressSchema,
|
|
645
|
+
owner: evmAddressSchema,
|
|
646
|
+
name: zod.z.string().optional(),
|
|
647
|
+
symbol: zod.z.string().optional()
|
|
648
|
+
})
|
|
649
|
+
)
|
|
650
|
+
});
|
|
651
|
+
var mcpUniswapV4RegisterPositionNftInputSchema = zod.z.object({
|
|
652
|
+
chainId: zod.z.union([zod.z.number().int().positive(), zod.z.string().min(1)]),
|
|
653
|
+
tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
654
|
+
keyGenId: zod.z.string().min(1).optional(),
|
|
655
|
+
positionManagerAddress: evmAddressSchema.optional(),
|
|
656
|
+
name: zod.z.string().optional(),
|
|
657
|
+
symbol: zod.z.string().optional(),
|
|
658
|
+
tokenURI: zod.z.string().optional()
|
|
659
|
+
});
|
|
660
|
+
var mcpUniswapV4RegisterPositionNftOutputSchema = zod.z.object({
|
|
661
|
+
message: zod.z.string(),
|
|
662
|
+
tokenId: zod.z.string(),
|
|
663
|
+
positionManager: evmAddressSchema
|
|
664
|
+
});
|
|
665
|
+
var mcpUniswapV4RegisterPositionFromMintTxInputSchema = zod.z.object({
|
|
666
|
+
chainId: zod.z.union([zod.z.number().int().positive(), zod.z.string().min(1)]),
|
|
667
|
+
txHash: zod.z.string().min(1),
|
|
668
|
+
keyGenId: zod.z.string().min(1).optional(),
|
|
669
|
+
walletAddress: evmAddressSchema.optional(),
|
|
670
|
+
rpcUrl: zod.z.string().optional(),
|
|
671
|
+
positionManagerAddress: evmAddressSchema.optional()
|
|
672
|
+
});
|
|
673
|
+
var mcpUniswapV4RegisterPositionFromMintTxOutputSchema = zod.z.object({
|
|
674
|
+
message: zod.z.string(),
|
|
675
|
+
tokenId: zod.z.string(),
|
|
676
|
+
positionManager: evmAddressSchema,
|
|
677
|
+
registered: zod.z.boolean()
|
|
678
|
+
});
|
|
679
|
+
var lpBuildCommonSchema = {
|
|
680
|
+
lpResponse: jsonObjectSchema.describe("Full LP API response (create/increase/decrease/claim)"),
|
|
681
|
+
nativeWrapped: evmAddressSchema.optional(),
|
|
682
|
+
poolReference: zod.z.string().optional()
|
|
683
|
+
};
|
|
684
|
+
var mcpUniswapV4BuildMintLiquidityMultisignInputSchema = evmMultisignCommonInputSchema.extend(
|
|
685
|
+
lpBuildCommonSchema
|
|
686
|
+
);
|
|
687
|
+
var mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema = evmMultisignCommonInputSchema.extend({
|
|
688
|
+
...lpBuildCommonSchema,
|
|
689
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()])
|
|
690
|
+
});
|
|
691
|
+
var mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema = evmMultisignCommonInputSchema.extend({
|
|
692
|
+
...lpBuildCommonSchema,
|
|
693
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()])
|
|
694
|
+
});
|
|
695
|
+
var mcpUniswapV4BuildCollectFeesMultisignInputSchema = evmMultisignCommonInputSchema.extend({
|
|
696
|
+
...lpBuildCommonSchema,
|
|
697
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()])
|
|
698
|
+
});
|
|
526
699
|
var mcpCurveDaoQuoteInputSchema = zod.z.object({
|
|
527
700
|
chainId: zod.z.number().int().positive().describe("EVM chain id (rpcUrl resolved from get_chain_registry rpcGateway)"),
|
|
528
701
|
rpcUrl: zod.z.string().min(1).optional().describe("JSON-RPC URL; continuum-mcp-server injects from chain registry \u2014 do not pass a public RPC URL"),
|
|
@@ -611,29 +784,44 @@ var mcpSkySusdsDepositInputSchema = mcpMultisignInput({
|
|
|
611
784
|
var mcpSkySusdsRedeemInputSchema = mcpMultisignInput({
|
|
612
785
|
sharesHuman: zod.z.string().min(1)
|
|
613
786
|
});
|
|
787
|
+
var mcpAaveV4MarketIdSchema = zod.z.string().min(1).optional().describe("UI market segment: main (Plus), core, or bluechip (Prime). Default main.");
|
|
788
|
+
var mcpAaveV4HealthPreviewSchema = {
|
|
789
|
+
skipHealthPreview: zod.z.boolean().optional().describe("Skip Aave v4 health-factor preview before withdraw/borrow/repay (not recommended)."),
|
|
790
|
+
acknowledgeHealthRisk: zod.z.boolean().optional().describe(
|
|
791
|
+
"Required true when preview returns a confirm-level health risk (withdraw/borrow/repay)."
|
|
792
|
+
)
|
|
793
|
+
};
|
|
614
794
|
var mcpAaveV4DepositInputSchema = mcpMultisignInput({
|
|
615
|
-
spoke: evmAddressSchema,
|
|
616
|
-
underlying: evmAddressSchema
|
|
795
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 continuum-mcp-server resolves spoke from Aave v4 API."),
|
|
796
|
+
underlying: evmAddressSchema.describe(
|
|
797
|
+
"Asset to supply. Native ETH: 0x0 or wrapped native with isNativeIn true."
|
|
798
|
+
),
|
|
617
799
|
amountHuman: zod.z.string().min(1),
|
|
618
|
-
marketId:
|
|
800
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
801
|
+
isNativeIn: zod.z.boolean().optional().describe("Wrap native to wrapped native before supply (e.g. ETH \u2192 WETH)."),
|
|
802
|
+
enableAsCollateralAfterSupply: zod.z.boolean().optional().describe("Append setUsingAsCollateral after supply in the same batch.")
|
|
619
803
|
});
|
|
620
804
|
var mcpAaveV4WithdrawInputSchema = mcpMultisignInput({
|
|
621
|
-
spoke: evmAddressSchema,
|
|
622
|
-
underlying: evmAddressSchema,
|
|
805
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
806
|
+
underlying: evmAddressSchema.describe("Supplied asset to withdraw."),
|
|
623
807
|
amountHuman: zod.z.string().min(1),
|
|
624
|
-
marketId:
|
|
808
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
809
|
+
...mcpAaveV4HealthPreviewSchema
|
|
625
810
|
});
|
|
626
811
|
var mcpAaveV4BorrowInputSchema = mcpMultisignInput({
|
|
627
|
-
spoke: evmAddressSchema,
|
|
628
|
-
underlying: evmAddressSchema,
|
|
812
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
813
|
+
underlying: evmAddressSchema.describe("Debt asset to borrow (e.g. USDC), not collateral."),
|
|
629
814
|
amountHuman: zod.z.string().min(1),
|
|
630
|
-
marketId:
|
|
815
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
816
|
+
collateralUnderlying: evmAddressSchema.optional().describe("Collateral token already supplied; helps pick hub when debt exists on multiple hubs."),
|
|
817
|
+
...mcpAaveV4HealthPreviewSchema
|
|
631
818
|
});
|
|
632
819
|
var mcpAaveV4RepayInputSchema = mcpMultisignInput({
|
|
633
|
-
spoke: evmAddressSchema,
|
|
634
|
-
underlying: evmAddressSchema,
|
|
820
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
821
|
+
underlying: evmAddressSchema.describe("Debt token to repay."),
|
|
635
822
|
amountHuman: zod.z.string().min(1),
|
|
636
|
-
marketId:
|
|
823
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
824
|
+
...mcpAaveV4HealthPreviewSchema
|
|
637
825
|
});
|
|
638
826
|
var mcpEulerV2IsolatedLendInputSchema = mcpMultisignInput({
|
|
639
827
|
vault: evmAddressSchema,
|
|
@@ -880,8 +1068,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
880
1068
|
actionId: "aave-v4.deposit",
|
|
881
1069
|
protocolId: "aave-v4",
|
|
882
1070
|
chainCategory: "evm",
|
|
883
|
-
description: "Build Aave v4 Spoke supply/deposit batch.",
|
|
884
|
-
prerequisites: ["
|
|
1071
|
+
description: "Build Aave v4 Spoke supply/deposit batch (wrap native, approve, supply).",
|
|
1072
|
+
prerequisites: ["keyGenId", "chainId", "underlying", "amountHuman", "get_defi_protocol_skill for hubs/spokes"],
|
|
885
1073
|
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
886
1074
|
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4DepositBatch" },
|
|
887
1075
|
inputZod: mcpAaveV4DepositInputSchema
|
|
@@ -891,8 +1079,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
891
1079
|
actionId: "aave-v4.withdraw",
|
|
892
1080
|
protocolId: "aave-v4",
|
|
893
1081
|
chainCategory: "evm",
|
|
894
|
-
description: "Build Aave v4 Spoke withdraw
|
|
895
|
-
prerequisites: ["
|
|
1082
|
+
description: "Build Aave v4 Spoke withdraw; health-factor preview when user has borrow debt.",
|
|
1083
|
+
prerequisites: ["keyGenId", "chainId", "underlying (supplied asset)", "amountHuman"],
|
|
896
1084
|
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
897
1085
|
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeWithdraw" },
|
|
898
1086
|
inputZod: mcpAaveV4WithdrawInputSchema
|
|
@@ -902,8 +1090,14 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
902
1090
|
actionId: "aave-v4.borrow",
|
|
903
1091
|
protocolId: "aave-v4",
|
|
904
1092
|
chainCategory: "evm",
|
|
905
|
-
description: "Build Aave v4 Spoke borrow
|
|
906
|
-
prerequisites: [
|
|
1093
|
+
description: "Build Aave v4 Spoke borrow; underlying is debt asset; collateral must be supplied first.",
|
|
1094
|
+
prerequisites: [
|
|
1095
|
+
"keyGenId",
|
|
1096
|
+
"chainId",
|
|
1097
|
+
"underlying (debt token)",
|
|
1098
|
+
"amountHuman",
|
|
1099
|
+
"collateral supplied via deposit"
|
|
1100
|
+
],
|
|
907
1101
|
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
908
1102
|
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeBorrow" },
|
|
909
1103
|
inputZod: mcpAaveV4BorrowInputSchema
|
|
@@ -913,8 +1107,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
913
1107
|
actionId: "aave-v4.repay",
|
|
914
1108
|
protocolId: "aave-v4",
|
|
915
1109
|
chainCategory: "evm",
|
|
916
|
-
description: "Build Aave v4 Spoke repay
|
|
917
|
-
prerequisites: ["
|
|
1110
|
+
description: "Build Aave v4 Spoke repay (approve if needed + repay).",
|
|
1111
|
+
prerequisites: ["keyGenId", "chainId", "underlying (debt token)", "amountHuman"],
|
|
918
1112
|
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
919
1113
|
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeRepay" },
|
|
920
1114
|
inputZod: mcpAaveV4RepayInputSchema
|
|
@@ -1004,7 +1198,11 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1004
1198
|
protocolId: "uniswap-v4",
|
|
1005
1199
|
chainCategory: "evm",
|
|
1006
1200
|
description: "Fetch a Uniswap V4 Trade API quote (POST /v1/quote). Returns classic quote JSON including quote.input/output amounts and routing. Does NOT create a sign request \u2014 use ctm_uniswap_v4_create_swap and ctm_uniswap_v4_build_swap_multisign after quoting. Requires uniswapApiKey and swapper (MPC executor address) or keyGen + managementNodeUrl to resolve swapper.",
|
|
1007
|
-
prerequisites: [
|
|
1201
|
+
prerequisites: [
|
|
1202
|
+
"UNISWAP_API_KEY in node Variables",
|
|
1203
|
+
"get_defi_protocol_skill for full quote \u2192 create_swap \u2192 build flow",
|
|
1204
|
+
"keyGenId (resolves swapper)"
|
|
1205
|
+
],
|
|
1008
1206
|
followUp: ["ctm_uniswap_v4_create_swap", "ctm_uniswap_v4_build_swap_multisign"],
|
|
1009
1207
|
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapTradeQuote" },
|
|
1010
1208
|
inputZod: mcpUniswapV4QuoteInputSchema,
|
|
@@ -1016,7 +1214,10 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1016
1214
|
protocolId: "uniswap-v4",
|
|
1017
1215
|
chainCategory: "evm",
|
|
1018
1216
|
description: "Call Uniswap Trade API POST /v1/swap to build Universal Router calldata from a prior quote. Returns { swap: { to, data, value, gasLimit? }, requestId? }. Does NOT produce a multiSignRequest \u2014 call ctm_uniswap_v4_build_swap_multisign next.",
|
|
1019
|
-
prerequisites: [
|
|
1217
|
+
prerequisites: [
|
|
1218
|
+
"ctm_uniswap_v4_quote output (fullQuoteFromPermit)",
|
|
1219
|
+
"get_defi_protocol_skill for deadline and field alignment"
|
|
1220
|
+
],
|
|
1020
1221
|
followUp: ["ctm_uniswap_v4_build_swap_multisign"],
|
|
1021
1222
|
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapCreateSwap" },
|
|
1022
1223
|
inputZod: mcpUniswapV4CreateSwapInputSchema,
|
|
@@ -1029,16 +1230,171 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1029
1230
|
chainCategory: "evm",
|
|
1030
1231
|
description: "Build mpc-auth multiSignRequest body for a Uniswap V4 swap. May batch 1\u20133 EVM txs: ERC-20 approve(s) to Permit2/router path + Universal Router swap (or 1 tx for native-in). Estimates gas, serializes unsigned txs, sets proposalTxParams. Output must be signed and POSTed to /multiSignRequest by the caller.",
|
|
1031
1232
|
prerequisites: [
|
|
1032
|
-
"ctm_uniswap_v4_create_swap output",
|
|
1033
|
-
"
|
|
1034
|
-
"executorAddress matching MPC wallet",
|
|
1035
|
-
"RPC URL and chainDetail from node chain config"
|
|
1233
|
+
"ctm_uniswap_v4_create_swap output + matching quote snapshot and swapDeadlineUnix",
|
|
1234
|
+
"keyGenId + chainId + purposeText"
|
|
1036
1235
|
],
|
|
1037
1236
|
followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
|
|
1038
1237
|
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "buildEvmMultisignBodyUniswapV4SkipPermit2Batch" },
|
|
1039
1238
|
inputZod: mcpUniswapV4BuildSwapMultisignInputSchema,
|
|
1040
1239
|
outputZod: multisignOutputSchema
|
|
1041
1240
|
}),
|
|
1241
|
+
defineMcpTool({
|
|
1242
|
+
name: "ctm_uniswap_v4_lp_create_position",
|
|
1243
|
+
actionId: "uniswap-v4.lp-create",
|
|
1244
|
+
protocolId: "uniswap-v4",
|
|
1245
|
+
chainCategory: "evm",
|
|
1246
|
+
description: "Call Uniswap LP API POST /lp/create for a new V4 position. Returns token amounts and `create` transaction calldata. Does NOT create a sign request \u2014 call ctm_uniswap_v4_build_mint_liquidity_multisign next.",
|
|
1247
|
+
prerequisites: ["UNISWAP_API_KEY", "get_defi_protocol_skill for LP flow"],
|
|
1248
|
+
followUp: ["ctm_uniswap_v4_build_mint_liquidity_multisign"],
|
|
1249
|
+
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpCreatePosition" },
|
|
1250
|
+
inputZod: mcpUniswapV4LpCreatePositionInputSchema,
|
|
1251
|
+
outputZod: mcpUniswapV4LpCreatePositionOutputSchema
|
|
1252
|
+
}),
|
|
1253
|
+
defineMcpTool({
|
|
1254
|
+
name: "ctm_uniswap_v4_build_mint_liquidity_multisign",
|
|
1255
|
+
actionId: "uniswap-v4.mint-liquidity",
|
|
1256
|
+
protocolId: "uniswap-v4",
|
|
1257
|
+
chainCategory: "evm",
|
|
1258
|
+
description: "Build mpc-auth multiSignRequest for minting a Uniswap V4 LP position. Batches ERC-20 approve(s) + Position Manager tx from LP create response.",
|
|
1259
|
+
prerequisites: ["ctm_uniswap_v4_lp_create_position output", "keyGenId + chainId + purposeText"],
|
|
1260
|
+
followUp: [
|
|
1261
|
+
"Sign messageToSign",
|
|
1262
|
+
"POST /multiSignRequest",
|
|
1263
|
+
"After execute: ctm_uniswap_v4_register_position_from_mint_tx (mint tx hash)"
|
|
1264
|
+
],
|
|
1265
|
+
handler: {
|
|
1266
|
+
importPath: "protocols/evm/uniswap-v4",
|
|
1267
|
+
exportName: "buildEvmMultisignBodyUniswapV4MintLiquidityBatch"
|
|
1268
|
+
},
|
|
1269
|
+
inputZod: mcpUniswapV4BuildMintLiquidityMultisignInputSchema,
|
|
1270
|
+
outputZod: multisignOutputSchema
|
|
1271
|
+
}),
|
|
1272
|
+
defineMcpTool({
|
|
1273
|
+
name: "ctm_uniswap_v4_lp_increase",
|
|
1274
|
+
actionId: "uniswap-v4.lp-increase",
|
|
1275
|
+
protocolId: "uniswap-v4",
|
|
1276
|
+
chainCategory: "evm",
|
|
1277
|
+
description: "Call Uniswap LP API POST /lp/increase. Returns `increase` transaction calldata.",
|
|
1278
|
+
prerequisites: ["UNISWAP_API_KEY", "nftTokenId from ctm_uniswap_v4_lp_list_positions"],
|
|
1279
|
+
followUp: ["ctm_uniswap_v4_build_increase_liquidity_multisign"],
|
|
1280
|
+
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpIncreasePosition" },
|
|
1281
|
+
inputZod: mcpUniswapV4LpIncreaseInputSchema,
|
|
1282
|
+
outputZod: mcpUniswapV4LpIncreaseOutputSchema
|
|
1283
|
+
}),
|
|
1284
|
+
defineMcpTool({
|
|
1285
|
+
name: "ctm_uniswap_v4_build_increase_liquidity_multisign",
|
|
1286
|
+
actionId: "uniswap-v4.increase-liquidity",
|
|
1287
|
+
protocolId: "uniswap-v4",
|
|
1288
|
+
chainCategory: "evm",
|
|
1289
|
+
description: "Build mpc-auth multiSignRequest to increase Uniswap V4 position liquidity.",
|
|
1290
|
+
prerequisites: ["ctm_uniswap_v4_lp_increase output"],
|
|
1291
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1292
|
+
handler: {
|
|
1293
|
+
importPath: "protocols/evm/uniswap-v4",
|
|
1294
|
+
exportName: "buildEvmMultisignBodyUniswapV4IncreaseLiquidityBatch"
|
|
1295
|
+
},
|
|
1296
|
+
inputZod: mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema,
|
|
1297
|
+
outputZod: multisignOutputSchema
|
|
1298
|
+
}),
|
|
1299
|
+
defineMcpTool({
|
|
1300
|
+
name: "ctm_uniswap_v4_lp_decrease",
|
|
1301
|
+
actionId: "uniswap-v4.lp-decrease",
|
|
1302
|
+
protocolId: "uniswap-v4",
|
|
1303
|
+
chainCategory: "evm",
|
|
1304
|
+
description: "Call Uniswap LP API POST /lp/decrease. Returns `decrease` transaction calldata.",
|
|
1305
|
+
prerequisites: ["UNISWAP_API_KEY", "nftTokenId"],
|
|
1306
|
+
followUp: ["ctm_uniswap_v4_build_decrease_liquidity_multisign"],
|
|
1307
|
+
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpDecreasePosition" },
|
|
1308
|
+
inputZod: mcpUniswapV4LpDecreaseInputSchema,
|
|
1309
|
+
outputZod: mcpUniswapV4LpDecreaseOutputSchema
|
|
1310
|
+
}),
|
|
1311
|
+
defineMcpTool({
|
|
1312
|
+
name: "ctm_uniswap_v4_build_decrease_liquidity_multisign",
|
|
1313
|
+
actionId: "uniswap-v4.decrease-liquidity",
|
|
1314
|
+
protocolId: "uniswap-v4",
|
|
1315
|
+
chainCategory: "evm",
|
|
1316
|
+
description: "Build mpc-auth multiSignRequest to decrease Uniswap V4 position liquidity.",
|
|
1317
|
+
prerequisites: ["ctm_uniswap_v4_lp_decrease output"],
|
|
1318
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1319
|
+
handler: {
|
|
1320
|
+
importPath: "protocols/evm/uniswap-v4",
|
|
1321
|
+
exportName: "buildEvmMultisignBodyUniswapV4DecreaseLiquidityBatch"
|
|
1322
|
+
},
|
|
1323
|
+
inputZod: mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema,
|
|
1324
|
+
outputZod: multisignOutputSchema
|
|
1325
|
+
}),
|
|
1326
|
+
defineMcpTool({
|
|
1327
|
+
name: "ctm_uniswap_v4_lp_collect",
|
|
1328
|
+
actionId: "uniswap-v4.lp-claim",
|
|
1329
|
+
protocolId: "uniswap-v4",
|
|
1330
|
+
chainCategory: "evm",
|
|
1331
|
+
description: "Call Uniswap LP API POST /lp/claim to collect accrued fees from a V4 position.",
|
|
1332
|
+
prerequisites: ["UNISWAP_API_KEY", "nftTokenId"],
|
|
1333
|
+
followUp: ["ctm_uniswap_v4_build_collect_fees_multisign"],
|
|
1334
|
+
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpClaimFees" },
|
|
1335
|
+
inputZod: mcpUniswapV4LpClaimInputSchema,
|
|
1336
|
+
outputZod: mcpUniswapV4LpClaimOutputSchema
|
|
1337
|
+
}),
|
|
1338
|
+
defineMcpTool({
|
|
1339
|
+
name: "ctm_uniswap_v4_build_collect_fees_multisign",
|
|
1340
|
+
actionId: "uniswap-v4.collect-fees",
|
|
1341
|
+
protocolId: "uniswap-v4",
|
|
1342
|
+
chainCategory: "evm",
|
|
1343
|
+
description: "Build mpc-auth multiSignRequest to collect fees from a Uniswap V4 position.",
|
|
1344
|
+
prerequisites: ["ctm_uniswap_v4_lp_collect output"],
|
|
1345
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1346
|
+
handler: {
|
|
1347
|
+
importPath: "protocols/evm/uniswap-v4",
|
|
1348
|
+
exportName: "buildEvmMultisignBodyUniswapV4CollectFeesBatch"
|
|
1349
|
+
},
|
|
1350
|
+
inputZod: mcpUniswapV4BuildCollectFeesMultisignInputSchema,
|
|
1351
|
+
outputZod: multisignOutputSchema
|
|
1352
|
+
}),
|
|
1353
|
+
defineMcpTool({
|
|
1354
|
+
name: "ctm_uniswap_v4_lp_list_positions",
|
|
1355
|
+
actionId: "uniswap-v4.lp-list-positions",
|
|
1356
|
+
protocolId: "uniswap-v4",
|
|
1357
|
+
chainCategory: "evm",
|
|
1358
|
+
description: "List Uniswap V4 position NFTs from the node token registry (ERC721 entries for the Position Manager on this chain). Does not scan blockchain logs. Pass keyGenId + chainId.",
|
|
1359
|
+
prerequisites: ["keyGenId + chainId", "Positions saved via register_position_nft or add_to_token_registry"],
|
|
1360
|
+
followUp: ["ctm_uniswap_v4_lp_increase", "ctm_uniswap_v4_lp_decrease", "ctm_uniswap_v4_lp_collect"],
|
|
1361
|
+
handler: {
|
|
1362
|
+
importPath: "protocols/evm/uniswap-v4",
|
|
1363
|
+
exportName: "uniswapV4ListPositionsRegistryMcpPlaceholder"
|
|
1364
|
+
},
|
|
1365
|
+
inputZod: mcpUniswapV4LpListPositionsInputSchema,
|
|
1366
|
+
outputZod: mcpUniswapV4LpListPositionsOutputSchema
|
|
1367
|
+
}),
|
|
1368
|
+
defineMcpTool({
|
|
1369
|
+
name: "ctm_uniswap_v4_register_position_nft",
|
|
1370
|
+
actionId: "uniswap-v4.register-position-nft",
|
|
1371
|
+
protocolId: "uniswap-v4",
|
|
1372
|
+
chainCategory: "evm",
|
|
1373
|
+
description: "Add a Uniswap V4 position NFT to the node token registry (ERC721, management-signed). Call after mint execute when tokenId is known.",
|
|
1374
|
+
prerequisites: ["chainId", "tokenId", "keyGenId for management signing"],
|
|
1375
|
+
followUp: ["ctm_uniswap_v4_lp_list_positions", "ctm_uniswap_v4_lp_increase"],
|
|
1376
|
+
handler: {
|
|
1377
|
+
importPath: "protocols/evm/uniswap-v4",
|
|
1378
|
+
exportName: "uniswapV4RegisterPositionNftPlaceholder"
|
|
1379
|
+
},
|
|
1380
|
+
inputZod: mcpUniswapV4RegisterPositionNftInputSchema,
|
|
1381
|
+
outputZod: mcpUniswapV4RegisterPositionNftOutputSchema
|
|
1382
|
+
}),
|
|
1383
|
+
defineMcpTool({
|
|
1384
|
+
name: "ctm_uniswap_v4_register_position_from_mint_tx",
|
|
1385
|
+
actionId: "uniswap-v4.register-position-from-mint-tx",
|
|
1386
|
+
protocolId: "uniswap-v4",
|
|
1387
|
+
chainCategory: "evm",
|
|
1388
|
+
description: "Parse a completed mint transaction receipt for the new position tokenId and add it to the node token registry (management-signed).",
|
|
1389
|
+
prerequisites: ["chainId", "txHash from mint batch execute", "keyGenId"],
|
|
1390
|
+
followUp: ["ctm_uniswap_v4_lp_list_positions"],
|
|
1391
|
+
handler: {
|
|
1392
|
+
importPath: "protocols/evm/uniswap-v4",
|
|
1393
|
+
exportName: "uniswapV4RegisterPositionFromMintTxPlaceholder"
|
|
1394
|
+
},
|
|
1395
|
+
inputZod: mcpUniswapV4RegisterPositionFromMintTxInputSchema,
|
|
1396
|
+
outputZod: mcpUniswapV4RegisterPositionFromMintTxOutputSchema
|
|
1397
|
+
}),
|
|
1042
1398
|
defineMcpTool({
|
|
1043
1399
|
name: "ctm_curve_dao_quote",
|
|
1044
1400
|
actionId: "curve-dao.quote",
|
|
@@ -1046,8 +1402,9 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1046
1402
|
chainCategory: "evm",
|
|
1047
1403
|
description: "Fetch a Curve Router NG quote via @curvefi/api getBestRouteAndOutput. Returns output amount, route, and optional priceImpactPercent. Does NOT create a sign request \u2014 call ctm_curve_dao_build_swap_multisign after quoting. Pass chainId only; rpcUrl is resolved from get_chain_registry rpcGateway.",
|
|
1048
1404
|
prerequisites: [
|
|
1049
|
-
"
|
|
1050
|
-
"
|
|
1405
|
+
"get_defi_protocol_skill for native placeholder vs wrapped native on build",
|
|
1406
|
+
"chainId + tokenIn + tokenOut + amountHuman",
|
|
1407
|
+
"rpcGateway in get_chain_registry"
|
|
1051
1408
|
],
|
|
1052
1409
|
followUp: ["ctm_curve_dao_build_swap_multisign"],
|
|
1053
1410
|
handler: { importPath: "protocols/evm/curve-dao", exportName: "curveDaoQuote" },
|
|
@@ -1061,9 +1418,9 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1061
1418
|
chainCategory: "evm",
|
|
1062
1419
|
description: "Build mpc-auth multiSignRequest for a Curve Router NG swap via @curvefi/api populateSwap. Optionally batches ERC-20 approve txs when allowance is insufficient, then exchange. Requires JSON-RPC and Curve-supported chain.",
|
|
1063
1420
|
prerequisites: [
|
|
1064
|
-
"ctm_curve_dao_quote (recommended)
|
|
1065
|
-
"keyGenId + chainId + purposeText",
|
|
1066
|
-
"tokenIn
|
|
1421
|
+
"ctm_curve_dao_quote (recommended)",
|
|
1422
|
+
"keyGenId + chainId + purposeText + slippagePercent (0\u2013100 exclusive)",
|
|
1423
|
+
"get_defi_protocol_skill for tokenIn address rules"
|
|
1067
1424
|
],
|
|
1068
1425
|
followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
|
|
1069
1426
|
handler: { importPath: "protocols/evm/curve-dao", exportName: "buildEvmMultisignBodyCurveDaoBatch" },
|
|
@@ -1819,11 +2176,29 @@ exports.mcpSkyLockstakeStakeInputSchema = mcpSkyLockstakeStakeInputSchema;
|
|
|
1819
2176
|
exports.mcpSkyLockstakeWipeInputSchema = mcpSkyLockstakeWipeInputSchema;
|
|
1820
2177
|
exports.mcpSkySusdsDepositInputSchema = mcpSkySusdsDepositInputSchema;
|
|
1821
2178
|
exports.mcpSkySusdsRedeemInputSchema = mcpSkySusdsRedeemInputSchema;
|
|
2179
|
+
exports.mcpUniswapV4BuildCollectFeesMultisignInputSchema = mcpUniswapV4BuildCollectFeesMultisignInputSchema;
|
|
2180
|
+
exports.mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema = mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema;
|
|
2181
|
+
exports.mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema = mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema;
|
|
2182
|
+
exports.mcpUniswapV4BuildMintLiquidityMultisignInputSchema = mcpUniswapV4BuildMintLiquidityMultisignInputSchema;
|
|
1822
2183
|
exports.mcpUniswapV4BuildSwapMultisignInputSchema = mcpUniswapV4BuildSwapMultisignInputSchema;
|
|
1823
2184
|
exports.mcpUniswapV4CreateSwapInputSchema = mcpUniswapV4CreateSwapInputSchema;
|
|
1824
2185
|
exports.mcpUniswapV4CreateSwapOutputSchema = mcpUniswapV4CreateSwapOutputSchema;
|
|
2186
|
+
exports.mcpUniswapV4LpClaimInputSchema = mcpUniswapV4LpClaimInputSchema;
|
|
2187
|
+
exports.mcpUniswapV4LpClaimOutputSchema = mcpUniswapV4LpClaimOutputSchema;
|
|
2188
|
+
exports.mcpUniswapV4LpCreatePositionInputSchema = mcpUniswapV4LpCreatePositionInputSchema;
|
|
2189
|
+
exports.mcpUniswapV4LpCreatePositionOutputSchema = mcpUniswapV4LpCreatePositionOutputSchema;
|
|
2190
|
+
exports.mcpUniswapV4LpDecreaseInputSchema = mcpUniswapV4LpDecreaseInputSchema;
|
|
2191
|
+
exports.mcpUniswapV4LpDecreaseOutputSchema = mcpUniswapV4LpDecreaseOutputSchema;
|
|
2192
|
+
exports.mcpUniswapV4LpIncreaseInputSchema = mcpUniswapV4LpIncreaseInputSchema;
|
|
2193
|
+
exports.mcpUniswapV4LpIncreaseOutputSchema = mcpUniswapV4LpIncreaseOutputSchema;
|
|
2194
|
+
exports.mcpUniswapV4LpListPositionsInputSchema = mcpUniswapV4LpListPositionsInputSchema;
|
|
2195
|
+
exports.mcpUniswapV4LpListPositionsOutputSchema = mcpUniswapV4LpListPositionsOutputSchema;
|
|
1825
2196
|
exports.mcpUniswapV4QuoteInputSchema = mcpUniswapV4QuoteInputSchema;
|
|
1826
2197
|
exports.mcpUniswapV4QuoteOutputSchema = mcpUniswapV4QuoteOutputSchema;
|
|
2198
|
+
exports.mcpUniswapV4RegisterPositionFromMintTxInputSchema = mcpUniswapV4RegisterPositionFromMintTxInputSchema;
|
|
2199
|
+
exports.mcpUniswapV4RegisterPositionFromMintTxOutputSchema = mcpUniswapV4RegisterPositionFromMintTxOutputSchema;
|
|
2200
|
+
exports.mcpUniswapV4RegisterPositionNftInputSchema = mcpUniswapV4RegisterPositionNftInputSchema;
|
|
2201
|
+
exports.mcpUniswapV4RegisterPositionNftOutputSchema = mcpUniswapV4RegisterPositionNftOutputSchema;
|
|
1827
2202
|
exports.multisignOutputSchema = multisignOutputSchema;
|
|
1828
2203
|
exports.parseMcpToolInput = parseMcpToolInput;
|
|
1829
2204
|
exports.parseMcpToolOutput = parseMcpToolOutput;
|