@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.
@@ -130,6 +130,52 @@ var uniswapV4ProtocolModule = {
130
130
  amount: { type: "string", required: true, description: "Amount for quote" },
131
131
  type: { type: "EXACT_INPUT | EXACT_OUTPUT", required: true, description: "Trade type" }
132
132
  }
133
+ },
134
+ {
135
+ id: "uniswap-v4.mint-liquidity",
136
+ protocolId: UNISWAP_V4_PROTOCOL_ID,
137
+ chainCategory: "evm",
138
+ description: "Mint a new Uniswap V4 concentrated liquidity position (Position Manager NFT)",
139
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
140
+ params: {
141
+ lpResponse: { type: "object", required: true, description: "Full LP API create response" },
142
+ nativeWrapped: { type: "address", required: false, description: "WETH when pool uses native ETH" },
143
+ poolReference: { type: "string", required: false, description: "V4 pool id" },
144
+ uniswapApiKey: { type: "string", required: true, description: "Uniswap API key" }
145
+ }
146
+ },
147
+ {
148
+ id: "uniswap-v4.increase-liquidity",
149
+ protocolId: UNISWAP_V4_PROTOCOL_ID,
150
+ chainCategory: "evm",
151
+ description: "Increase liquidity on an existing Uniswap V4 position NFT",
152
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
153
+ params: {
154
+ nftTokenId: { type: "string", required: true, description: "Position NFT token id" },
155
+ lpResponse: { type: "object", required: true, description: "Full LP API increase response" }
156
+ }
157
+ },
158
+ {
159
+ id: "uniswap-v4.decrease-liquidity",
160
+ protocolId: UNISWAP_V4_PROTOCOL_ID,
161
+ chainCategory: "evm",
162
+ description: "Decrease liquidity on an existing Uniswap V4 position NFT",
163
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
164
+ params: {
165
+ nftTokenId: { type: "string", required: true, description: "Position NFT token id" },
166
+ lpResponse: { type: "object", required: true, description: "Full LP API decrease response" }
167
+ }
168
+ },
169
+ {
170
+ id: "uniswap-v4.collect-fees",
171
+ protocolId: UNISWAP_V4_PROTOCOL_ID,
172
+ chainCategory: "evm",
173
+ description: "Collect accrued fees from a Uniswap V4 position NFT",
174
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
175
+ params: {
176
+ nftTokenId: { type: "string", required: true, description: "Position NFT token id" },
177
+ lpResponse: { type: "object", required: true, description: "Full LP API claim response" }
178
+ }
133
179
  }
134
180
  ]
135
181
  };
@@ -520,6 +566,133 @@ var mcpUniswapV4BuildSwapMultisignInputSchema = evmMultisignCommonInputSchema.ex
520
566
  swapDeadlineUnix: z.number().describe("Same deadline passed to create_swap"),
521
567
  slippagePercent: z.number().optional().describe("Extra approve headroom for EXACT_OUTPUT")
522
568
  });
569
+ var lpExistingPoolSchema = z.object({
570
+ token0Address: evmAddressSchema,
571
+ token1Address: evmAddressSchema,
572
+ poolReference: z.string().min(1).describe("V4 pool id (bytes32 hex)")
573
+ });
574
+ var lpNewPoolSchema = z.object({
575
+ token0Address: evmAddressSchema,
576
+ token1Address: evmAddressSchema,
577
+ fee: z.number().int().nonnegative(),
578
+ tickSpacing: z.number().int().positive(),
579
+ hooks: evmAddressSchema.optional(),
580
+ initialPrice: z.string().min(1).describe("sqrtRatioX96 string for new pool")
581
+ });
582
+ var lpIndependentTokenSchema = z.object({
583
+ tokenAddress: evmAddressSchema.describe("0x0 for native ETH"),
584
+ amount: z.string().min(1).describe("Amount in token base units (wei)")
585
+ });
586
+ var lpPriceBoundsSchema = z.object({
587
+ minPrice: z.string().min(1),
588
+ maxPrice: z.string().min(1)
589
+ });
590
+ var lpTickBoundsSchema = z.object({
591
+ tickLower: z.number().int(),
592
+ tickUpper: z.number().int()
593
+ });
594
+ var lpCommonApiInputSchema = z.object({
595
+ uniswapApiKey: z.string().min(1),
596
+ walletAddress: evmAddressSchema.optional(),
597
+ chainId: z.union([z.number().int().positive(), z.string().min(1)]),
598
+ slippageTolerance: z.number().optional(),
599
+ simulateTransaction: z.boolean().optional(),
600
+ baseUrl: z.string().optional(),
601
+ keyGen: z.string().optional(),
602
+ managementNodeUrl: z.string().optional()
603
+ });
604
+ var mcpUniswapV4LpCreatePositionInputSchema = lpCommonApiInputSchema.extend({
605
+ existingPool: lpExistingPoolSchema.optional(),
606
+ newPool: lpNewPoolSchema.optional(),
607
+ independentToken: lpIndependentTokenSchema,
608
+ priceBounds: lpPriceBoundsSchema.optional(),
609
+ tickBounds: lpTickBoundsSchema.optional()
610
+ });
611
+ var mcpUniswapV4LpCreatePositionOutputSchema = jsonObjectSchema;
612
+ var mcpUniswapV4LpIncreaseInputSchema = lpCommonApiInputSchema.extend({
613
+ token0Address: evmAddressSchema,
614
+ token1Address: evmAddressSchema,
615
+ nftTokenId: z.union([z.string(), z.number()]),
616
+ independentToken: lpIndependentTokenSchema
617
+ });
618
+ var mcpUniswapV4LpIncreaseOutputSchema = jsonObjectSchema;
619
+ var mcpUniswapV4LpDecreaseInputSchema = lpCommonApiInputSchema.extend({
620
+ token0Address: evmAddressSchema,
621
+ token1Address: evmAddressSchema,
622
+ nftTokenId: z.union([z.string(), z.number()]),
623
+ liquidityPercentageToDecrease: z.number().int().min(1).max(100)
624
+ });
625
+ var mcpUniswapV4LpDecreaseOutputSchema = jsonObjectSchema;
626
+ var mcpUniswapV4LpClaimInputSchema = lpCommonApiInputSchema.extend({
627
+ tokenId: z.union([z.string(), z.number()])
628
+ });
629
+ var mcpUniswapV4LpClaimOutputSchema = jsonObjectSchema;
630
+ var mcpUniswapV4LpListPositionsInputSchema = z.object({
631
+ chainId: z.union([z.number().int().positive(), z.string().min(1)]),
632
+ keyGenId: z.string().min(1).optional(),
633
+ walletAddress: evmAddressSchema.optional(),
634
+ positionManagerAddress: evmAddressSchema.optional()
635
+ });
636
+ var mcpUniswapV4LpListPositionsOutputSchema = z.object({
637
+ source: z.literal("token_registry"),
638
+ positions: z.array(
639
+ z.object({
640
+ tokenId: z.string(),
641
+ positionManager: evmAddressSchema,
642
+ owner: evmAddressSchema,
643
+ name: z.string().optional(),
644
+ symbol: z.string().optional()
645
+ })
646
+ )
647
+ });
648
+ var mcpUniswapV4RegisterPositionNftInputSchema = z.object({
649
+ chainId: z.union([z.number().int().positive(), z.string().min(1)]),
650
+ tokenId: z.union([z.string(), z.number()]),
651
+ keyGenId: z.string().min(1).optional(),
652
+ positionManagerAddress: evmAddressSchema.optional(),
653
+ name: z.string().optional(),
654
+ symbol: z.string().optional(),
655
+ tokenURI: z.string().optional()
656
+ });
657
+ var mcpUniswapV4RegisterPositionNftOutputSchema = z.object({
658
+ message: z.string(),
659
+ tokenId: z.string(),
660
+ positionManager: evmAddressSchema
661
+ });
662
+ var mcpUniswapV4RegisterPositionFromMintTxInputSchema = z.object({
663
+ chainId: z.union([z.number().int().positive(), z.string().min(1)]),
664
+ txHash: z.string().min(1),
665
+ keyGenId: z.string().min(1).optional(),
666
+ walletAddress: evmAddressSchema.optional(),
667
+ rpcUrl: z.string().optional(),
668
+ positionManagerAddress: evmAddressSchema.optional()
669
+ });
670
+ var mcpUniswapV4RegisterPositionFromMintTxOutputSchema = z.object({
671
+ message: z.string(),
672
+ tokenId: z.string(),
673
+ positionManager: evmAddressSchema,
674
+ registered: z.boolean()
675
+ });
676
+ var lpBuildCommonSchema = {
677
+ lpResponse: jsonObjectSchema.describe("Full LP API response (create/increase/decrease/claim)"),
678
+ nativeWrapped: evmAddressSchema.optional(),
679
+ poolReference: z.string().optional()
680
+ };
681
+ var mcpUniswapV4BuildMintLiquidityMultisignInputSchema = evmMultisignCommonInputSchema.extend(
682
+ lpBuildCommonSchema
683
+ );
684
+ var mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema = evmMultisignCommonInputSchema.extend({
685
+ ...lpBuildCommonSchema,
686
+ nftTokenId: z.union([z.string(), z.number()])
687
+ });
688
+ var mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema = evmMultisignCommonInputSchema.extend({
689
+ ...lpBuildCommonSchema,
690
+ nftTokenId: z.union([z.string(), z.number()])
691
+ });
692
+ var mcpUniswapV4BuildCollectFeesMultisignInputSchema = evmMultisignCommonInputSchema.extend({
693
+ ...lpBuildCommonSchema,
694
+ nftTokenId: z.union([z.string(), z.number()])
695
+ });
523
696
  var mcpCurveDaoQuoteInputSchema = z.object({
524
697
  chainId: z.number().int().positive().describe("EVM chain id (rpcUrl resolved from get_chain_registry rpcGateway)"),
525
698
  rpcUrl: z.string().min(1).optional().describe("JSON-RPC URL; continuum-mcp-server injects from chain registry \u2014 do not pass a public RPC URL"),
@@ -608,29 +781,44 @@ var mcpSkySusdsDepositInputSchema = mcpMultisignInput({
608
781
  var mcpSkySusdsRedeemInputSchema = mcpMultisignInput({
609
782
  sharesHuman: z.string().min(1)
610
783
  });
784
+ var mcpAaveV4MarketIdSchema = z.string().min(1).optional().describe("UI market segment: main (Plus), core, or bluechip (Prime). Default main.");
785
+ var mcpAaveV4HealthPreviewSchema = {
786
+ skipHealthPreview: z.boolean().optional().describe("Skip Aave v4 health-factor preview before withdraw/borrow/repay (not recommended)."),
787
+ acknowledgeHealthRisk: z.boolean().optional().describe(
788
+ "Required true when preview returns a confirm-level health risk (withdraw/borrow/repay)."
789
+ )
790
+ };
611
791
  var mcpAaveV4DepositInputSchema = mcpMultisignInput({
612
- spoke: evmAddressSchema,
613
- underlying: evmAddressSchema,
792
+ spoke: evmAddressSchema.optional().describe("Omit \u2014 continuum-mcp-server resolves spoke from Aave v4 API."),
793
+ underlying: evmAddressSchema.describe(
794
+ "Asset to supply. Native ETH: 0x0 or wrapped native with isNativeIn true."
795
+ ),
614
796
  amountHuman: z.string().min(1),
615
- marketId: z.string().min(1)
797
+ marketId: mcpAaveV4MarketIdSchema,
798
+ isNativeIn: z.boolean().optional().describe("Wrap native to wrapped native before supply (e.g. ETH \u2192 WETH)."),
799
+ enableAsCollateralAfterSupply: z.boolean().optional().describe("Append setUsingAsCollateral after supply in the same batch.")
616
800
  });
617
801
  var mcpAaveV4WithdrawInputSchema = mcpMultisignInput({
618
- spoke: evmAddressSchema,
619
- underlying: evmAddressSchema,
802
+ spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
803
+ underlying: evmAddressSchema.describe("Supplied asset to withdraw."),
620
804
  amountHuman: z.string().min(1),
621
- marketId: z.string().min(1)
805
+ marketId: mcpAaveV4MarketIdSchema,
806
+ ...mcpAaveV4HealthPreviewSchema
622
807
  });
623
808
  var mcpAaveV4BorrowInputSchema = mcpMultisignInput({
624
- spoke: evmAddressSchema,
625
- underlying: evmAddressSchema,
809
+ spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
810
+ underlying: evmAddressSchema.describe("Debt asset to borrow (e.g. USDC), not collateral."),
626
811
  amountHuman: z.string().min(1),
627
- marketId: z.string().min(1)
812
+ marketId: mcpAaveV4MarketIdSchema,
813
+ collateralUnderlying: evmAddressSchema.optional().describe("Collateral token already supplied; helps pick hub when debt exists on multiple hubs."),
814
+ ...mcpAaveV4HealthPreviewSchema
628
815
  });
629
816
  var mcpAaveV4RepayInputSchema = mcpMultisignInput({
630
- spoke: evmAddressSchema,
631
- underlying: evmAddressSchema,
817
+ spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
818
+ underlying: evmAddressSchema.describe("Debt token to repay."),
632
819
  amountHuman: z.string().min(1),
633
- marketId: z.string().min(1)
820
+ marketId: mcpAaveV4MarketIdSchema,
821
+ ...mcpAaveV4HealthPreviewSchema
634
822
  });
635
823
  var mcpEulerV2IsolatedLendInputSchema = mcpMultisignInput({
636
824
  vault: evmAddressSchema,
@@ -877,8 +1065,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
877
1065
  actionId: "aave-v4.deposit",
878
1066
  protocolId: "aave-v4",
879
1067
  chainCategory: "evm",
880
- description: "Build Aave v4 Spoke supply/deposit batch.",
881
- prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
1068
+ description: "Build Aave v4 Spoke supply/deposit batch (wrap native, approve, supply).",
1069
+ prerequisites: ["keyGenId", "chainId", "underlying", "amountHuman", "get_defi_protocol_skill for hubs/spokes"],
882
1070
  followUp: ["Sign messageToSign", "POST /multiSignRequest"],
883
1071
  handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4DepositBatch" },
884
1072
  inputZod: mcpAaveV4DepositInputSchema
@@ -888,8 +1076,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
888
1076
  actionId: "aave-v4.withdraw",
889
1077
  protocolId: "aave-v4",
890
1078
  chainCategory: "evm",
891
- description: "Build Aave v4 Spoke withdraw batch.",
892
- prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
1079
+ description: "Build Aave v4 Spoke withdraw; health-factor preview when user has borrow debt.",
1080
+ prerequisites: ["keyGenId", "chainId", "underlying (supplied asset)", "amountHuman"],
893
1081
  followUp: ["Sign messageToSign", "POST /multiSignRequest"],
894
1082
  handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeWithdraw" },
895
1083
  inputZod: mcpAaveV4WithdrawInputSchema
@@ -899,8 +1087,14 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
899
1087
  actionId: "aave-v4.borrow",
900
1088
  protocolId: "aave-v4",
901
1089
  chainCategory: "evm",
902
- description: "Build Aave v4 Spoke borrow batch.",
903
- prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
1090
+ description: "Build Aave v4 Spoke borrow; underlying is debt asset; collateral must be supplied first.",
1091
+ prerequisites: [
1092
+ "keyGenId",
1093
+ "chainId",
1094
+ "underlying (debt token)",
1095
+ "amountHuman",
1096
+ "collateral supplied via deposit"
1097
+ ],
904
1098
  followUp: ["Sign messageToSign", "POST /multiSignRequest"],
905
1099
  handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeBorrow" },
906
1100
  inputZod: mcpAaveV4BorrowInputSchema
@@ -910,8 +1104,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
910
1104
  actionId: "aave-v4.repay",
911
1105
  protocolId: "aave-v4",
912
1106
  chainCategory: "evm",
913
- description: "Build Aave v4 Spoke repay batch.",
914
- prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
1107
+ description: "Build Aave v4 Spoke repay (approve if needed + repay).",
1108
+ prerequisites: ["keyGenId", "chainId", "underlying (debt token)", "amountHuman"],
915
1109
  followUp: ["Sign messageToSign", "POST /multiSignRequest"],
916
1110
  handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeRepay" },
917
1111
  inputZod: mcpAaveV4RepayInputSchema
@@ -1001,7 +1195,11 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1001
1195
  protocolId: "uniswap-v4",
1002
1196
  chainCategory: "evm",
1003
1197
  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.",
1004
- prerequisites: ["Chain must be supported by Uniswap V4 (Universal Router map)."],
1198
+ prerequisites: [
1199
+ "UNISWAP_API_KEY in node Variables",
1200
+ "get_defi_protocol_skill for full quote \u2192 create_swap \u2192 build flow",
1201
+ "keyGenId (resolves swapper)"
1202
+ ],
1005
1203
  followUp: ["ctm_uniswap_v4_create_swap", "ctm_uniswap_v4_build_swap_multisign"],
1006
1204
  handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapTradeQuote" },
1007
1205
  inputZod: mcpUniswapV4QuoteInputSchema,
@@ -1013,7 +1211,10 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1013
1211
  protocolId: "uniswap-v4",
1014
1212
  chainCategory: "evm",
1015
1213
  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.",
1016
- prerequisites: ["ctm_uniswap_v4_quote output (fullQuoteFromPermit)"],
1214
+ prerequisites: [
1215
+ "ctm_uniswap_v4_quote output (fullQuoteFromPermit)",
1216
+ "get_defi_protocol_skill for deadline and field alignment"
1217
+ ],
1017
1218
  followUp: ["ctm_uniswap_v4_build_swap_multisign"],
1018
1219
  handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapCreateSwap" },
1019
1220
  inputZod: mcpUniswapV4CreateSwapInputSchema,
@@ -1026,16 +1227,171 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1026
1227
  chainCategory: "evm",
1027
1228
  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.",
1028
1229
  prerequisites: [
1029
- "ctm_uniswap_v4_create_swap output",
1030
- "keyGen with pubkeyhex",
1031
- "executorAddress matching MPC wallet",
1032
- "RPC URL and chainDetail from node chain config"
1230
+ "ctm_uniswap_v4_create_swap output + matching quote snapshot and swapDeadlineUnix",
1231
+ "keyGenId + chainId + purposeText"
1033
1232
  ],
1034
1233
  followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
1035
1234
  handler: { importPath: "protocols/evm/uniswap-v4", exportName: "buildEvmMultisignBodyUniswapV4SkipPermit2Batch" },
1036
1235
  inputZod: mcpUniswapV4BuildSwapMultisignInputSchema,
1037
1236
  outputZod: multisignOutputSchema
1038
1237
  }),
1238
+ defineMcpTool({
1239
+ name: "ctm_uniswap_v4_lp_create_position",
1240
+ actionId: "uniswap-v4.lp-create",
1241
+ protocolId: "uniswap-v4",
1242
+ chainCategory: "evm",
1243
+ 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.",
1244
+ prerequisites: ["UNISWAP_API_KEY", "get_defi_protocol_skill for LP flow"],
1245
+ followUp: ["ctm_uniswap_v4_build_mint_liquidity_multisign"],
1246
+ handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpCreatePosition" },
1247
+ inputZod: mcpUniswapV4LpCreatePositionInputSchema,
1248
+ outputZod: mcpUniswapV4LpCreatePositionOutputSchema
1249
+ }),
1250
+ defineMcpTool({
1251
+ name: "ctm_uniswap_v4_build_mint_liquidity_multisign",
1252
+ actionId: "uniswap-v4.mint-liquidity",
1253
+ protocolId: "uniswap-v4",
1254
+ chainCategory: "evm",
1255
+ description: "Build mpc-auth multiSignRequest for minting a Uniswap V4 LP position. Batches ERC-20 approve(s) + Position Manager tx from LP create response.",
1256
+ prerequisites: ["ctm_uniswap_v4_lp_create_position output", "keyGenId + chainId + purposeText"],
1257
+ followUp: [
1258
+ "Sign messageToSign",
1259
+ "POST /multiSignRequest",
1260
+ "After execute: ctm_uniswap_v4_register_position_from_mint_tx (mint tx hash)"
1261
+ ],
1262
+ handler: {
1263
+ importPath: "protocols/evm/uniswap-v4",
1264
+ exportName: "buildEvmMultisignBodyUniswapV4MintLiquidityBatch"
1265
+ },
1266
+ inputZod: mcpUniswapV4BuildMintLiquidityMultisignInputSchema,
1267
+ outputZod: multisignOutputSchema
1268
+ }),
1269
+ defineMcpTool({
1270
+ name: "ctm_uniswap_v4_lp_increase",
1271
+ actionId: "uniswap-v4.lp-increase",
1272
+ protocolId: "uniswap-v4",
1273
+ chainCategory: "evm",
1274
+ description: "Call Uniswap LP API POST /lp/increase. Returns `increase` transaction calldata.",
1275
+ prerequisites: ["UNISWAP_API_KEY", "nftTokenId from ctm_uniswap_v4_lp_list_positions"],
1276
+ followUp: ["ctm_uniswap_v4_build_increase_liquidity_multisign"],
1277
+ handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpIncreasePosition" },
1278
+ inputZod: mcpUniswapV4LpIncreaseInputSchema,
1279
+ outputZod: mcpUniswapV4LpIncreaseOutputSchema
1280
+ }),
1281
+ defineMcpTool({
1282
+ name: "ctm_uniswap_v4_build_increase_liquidity_multisign",
1283
+ actionId: "uniswap-v4.increase-liquidity",
1284
+ protocolId: "uniswap-v4",
1285
+ chainCategory: "evm",
1286
+ description: "Build mpc-auth multiSignRequest to increase Uniswap V4 position liquidity.",
1287
+ prerequisites: ["ctm_uniswap_v4_lp_increase output"],
1288
+ followUp: ["Sign messageToSign", "POST /multiSignRequest"],
1289
+ handler: {
1290
+ importPath: "protocols/evm/uniswap-v4",
1291
+ exportName: "buildEvmMultisignBodyUniswapV4IncreaseLiquidityBatch"
1292
+ },
1293
+ inputZod: mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema,
1294
+ outputZod: multisignOutputSchema
1295
+ }),
1296
+ defineMcpTool({
1297
+ name: "ctm_uniswap_v4_lp_decrease",
1298
+ actionId: "uniswap-v4.lp-decrease",
1299
+ protocolId: "uniswap-v4",
1300
+ chainCategory: "evm",
1301
+ description: "Call Uniswap LP API POST /lp/decrease. Returns `decrease` transaction calldata.",
1302
+ prerequisites: ["UNISWAP_API_KEY", "nftTokenId"],
1303
+ followUp: ["ctm_uniswap_v4_build_decrease_liquidity_multisign"],
1304
+ handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpDecreasePosition" },
1305
+ inputZod: mcpUniswapV4LpDecreaseInputSchema,
1306
+ outputZod: mcpUniswapV4LpDecreaseOutputSchema
1307
+ }),
1308
+ defineMcpTool({
1309
+ name: "ctm_uniswap_v4_build_decrease_liquidity_multisign",
1310
+ actionId: "uniswap-v4.decrease-liquidity",
1311
+ protocolId: "uniswap-v4",
1312
+ chainCategory: "evm",
1313
+ description: "Build mpc-auth multiSignRequest to decrease Uniswap V4 position liquidity.",
1314
+ prerequisites: ["ctm_uniswap_v4_lp_decrease output"],
1315
+ followUp: ["Sign messageToSign", "POST /multiSignRequest"],
1316
+ handler: {
1317
+ importPath: "protocols/evm/uniswap-v4",
1318
+ exportName: "buildEvmMultisignBodyUniswapV4DecreaseLiquidityBatch"
1319
+ },
1320
+ inputZod: mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema,
1321
+ outputZod: multisignOutputSchema
1322
+ }),
1323
+ defineMcpTool({
1324
+ name: "ctm_uniswap_v4_lp_collect",
1325
+ actionId: "uniswap-v4.lp-claim",
1326
+ protocolId: "uniswap-v4",
1327
+ chainCategory: "evm",
1328
+ description: "Call Uniswap LP API POST /lp/claim to collect accrued fees from a V4 position.",
1329
+ prerequisites: ["UNISWAP_API_KEY", "nftTokenId"],
1330
+ followUp: ["ctm_uniswap_v4_build_collect_fees_multisign"],
1331
+ handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpClaimFees" },
1332
+ inputZod: mcpUniswapV4LpClaimInputSchema,
1333
+ outputZod: mcpUniswapV4LpClaimOutputSchema
1334
+ }),
1335
+ defineMcpTool({
1336
+ name: "ctm_uniswap_v4_build_collect_fees_multisign",
1337
+ actionId: "uniswap-v4.collect-fees",
1338
+ protocolId: "uniswap-v4",
1339
+ chainCategory: "evm",
1340
+ description: "Build mpc-auth multiSignRequest to collect fees from a Uniswap V4 position.",
1341
+ prerequisites: ["ctm_uniswap_v4_lp_collect output"],
1342
+ followUp: ["Sign messageToSign", "POST /multiSignRequest"],
1343
+ handler: {
1344
+ importPath: "protocols/evm/uniswap-v4",
1345
+ exportName: "buildEvmMultisignBodyUniswapV4CollectFeesBatch"
1346
+ },
1347
+ inputZod: mcpUniswapV4BuildCollectFeesMultisignInputSchema,
1348
+ outputZod: multisignOutputSchema
1349
+ }),
1350
+ defineMcpTool({
1351
+ name: "ctm_uniswap_v4_lp_list_positions",
1352
+ actionId: "uniswap-v4.lp-list-positions",
1353
+ protocolId: "uniswap-v4",
1354
+ chainCategory: "evm",
1355
+ 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.",
1356
+ prerequisites: ["keyGenId + chainId", "Positions saved via register_position_nft or add_to_token_registry"],
1357
+ followUp: ["ctm_uniswap_v4_lp_increase", "ctm_uniswap_v4_lp_decrease", "ctm_uniswap_v4_lp_collect"],
1358
+ handler: {
1359
+ importPath: "protocols/evm/uniswap-v4",
1360
+ exportName: "uniswapV4ListPositionsRegistryMcpPlaceholder"
1361
+ },
1362
+ inputZod: mcpUniswapV4LpListPositionsInputSchema,
1363
+ outputZod: mcpUniswapV4LpListPositionsOutputSchema
1364
+ }),
1365
+ defineMcpTool({
1366
+ name: "ctm_uniswap_v4_register_position_nft",
1367
+ actionId: "uniswap-v4.register-position-nft",
1368
+ protocolId: "uniswap-v4",
1369
+ chainCategory: "evm",
1370
+ description: "Add a Uniswap V4 position NFT to the node token registry (ERC721, management-signed). Call after mint execute when tokenId is known.",
1371
+ prerequisites: ["chainId", "tokenId", "keyGenId for management signing"],
1372
+ followUp: ["ctm_uniswap_v4_lp_list_positions", "ctm_uniswap_v4_lp_increase"],
1373
+ handler: {
1374
+ importPath: "protocols/evm/uniswap-v4",
1375
+ exportName: "uniswapV4RegisterPositionNftPlaceholder"
1376
+ },
1377
+ inputZod: mcpUniswapV4RegisterPositionNftInputSchema,
1378
+ outputZod: mcpUniswapV4RegisterPositionNftOutputSchema
1379
+ }),
1380
+ defineMcpTool({
1381
+ name: "ctm_uniswap_v4_register_position_from_mint_tx",
1382
+ actionId: "uniswap-v4.register-position-from-mint-tx",
1383
+ protocolId: "uniswap-v4",
1384
+ chainCategory: "evm",
1385
+ description: "Parse a completed mint transaction receipt for the new position tokenId and add it to the node token registry (management-signed).",
1386
+ prerequisites: ["chainId", "txHash from mint batch execute", "keyGenId"],
1387
+ followUp: ["ctm_uniswap_v4_lp_list_positions"],
1388
+ handler: {
1389
+ importPath: "protocols/evm/uniswap-v4",
1390
+ exportName: "uniswapV4RegisterPositionFromMintTxPlaceholder"
1391
+ },
1392
+ inputZod: mcpUniswapV4RegisterPositionFromMintTxInputSchema,
1393
+ outputZod: mcpUniswapV4RegisterPositionFromMintTxOutputSchema
1394
+ }),
1039
1395
  defineMcpTool({
1040
1396
  name: "ctm_curve_dao_quote",
1041
1397
  actionId: "curve-dao.quote",
@@ -1043,8 +1399,9 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1043
1399
  chainCategory: "evm",
1044
1400
  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.",
1045
1401
  prerequisites: [
1046
- "Chain must be supported by Curve (@curvefi/api network constants).",
1047
- "Configure rpcGateway for chainId in get_chain_registry."
1402
+ "get_defi_protocol_skill for native placeholder vs wrapped native on build",
1403
+ "chainId + tokenIn + tokenOut + amountHuman",
1404
+ "rpcGateway in get_chain_registry"
1048
1405
  ],
1049
1406
  followUp: ["ctm_curve_dao_build_swap_multisign"],
1050
1407
  handler: { importPath: "protocols/evm/curve-dao", exportName: "curveDaoQuote" },
@@ -1058,9 +1415,9 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1058
1415
  chainCategory: "evm",
1059
1416
  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.",
1060
1417
  prerequisites: [
1061
- "ctm_curve_dao_quote (recommended) or known-good route",
1062
- "keyGenId + chainId + purposeText",
1063
- "tokenIn/tokenOut/amountHuman/slippagePercent"
1418
+ "ctm_curve_dao_quote (recommended)",
1419
+ "keyGenId + chainId + purposeText + slippagePercent (0\u2013100 exclusive)",
1420
+ "get_defi_protocol_skill for tokenIn address rules"
1064
1421
  ],
1065
1422
  followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
1066
1423
  handler: { importPath: "protocols/evm/curve-dao", exportName: "buildEvmMultisignBodyCurveDaoBatch" },
@@ -1753,6 +2110,6 @@ function getAgentCatalog() {
1753
2110
  };
1754
2111
  }
1755
2112
 
1756
- export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, multisignOutputSchema, parseMcpToolInput, parseMcpToolOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
2113
+ export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, multisignOutputSchema, parseMcpToolInput, parseMcpToolOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
1757
2114
  //# sourceMappingURL=catalog.js.map
1758
2115
  //# sourceMappingURL=catalog.js.map