@continuumdao/ctm-mpc-defi 0.2.3 → 0.2.5

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,160 @@ 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 mcpUniswapV4LpListPoolsInputSchema = z.object({
612
+ chainId: z.union([z.number().int().positive(), z.string().min(1)]),
613
+ pair: z.string().optional().describe("Optional filter, e.g. eth-usdc or ETH/USDC")
614
+ });
615
+ var mcpUniswapV4LpListPoolsOutputSchema = z.object({
616
+ chainId: z.number().int().positive(),
617
+ chainLabel: z.string(),
618
+ pools: z.array(
619
+ z.object({
620
+ presetId: z.string(),
621
+ pairSlug: z.string(),
622
+ pairLabel: z.string(),
623
+ fee: z.number().int(),
624
+ feeLabel: z.string(),
625
+ tickSpacing: z.number().int(),
626
+ token0Symbol: z.string(),
627
+ token1Symbol: z.string(),
628
+ token0Address: evmAddressSchema,
629
+ token1Address: evmAddressSchema,
630
+ poolReference: z.string(),
631
+ hooks: evmAddressSchema,
632
+ nativeWrapped: evmAddressSchema.optional(),
633
+ usesNativeEth: z.boolean()
634
+ })
635
+ ),
636
+ notes: z.string()
637
+ });
638
+ var mcpUniswapV4LpCreatePositionOutputSchema = jsonObjectSchema;
639
+ var mcpUniswapV4LpIncreaseInputSchema = lpCommonApiInputSchema.extend({
640
+ token0Address: evmAddressSchema,
641
+ token1Address: evmAddressSchema,
642
+ nftTokenId: z.union([z.string(), z.number()]),
643
+ independentToken: lpIndependentTokenSchema
644
+ });
645
+ var mcpUniswapV4LpIncreaseOutputSchema = jsonObjectSchema;
646
+ var mcpUniswapV4LpDecreaseInputSchema = lpCommonApiInputSchema.extend({
647
+ token0Address: evmAddressSchema,
648
+ token1Address: evmAddressSchema,
649
+ nftTokenId: z.union([z.string(), z.number()]),
650
+ liquidityPercentageToDecrease: z.number().int().min(1).max(100)
651
+ });
652
+ var mcpUniswapV4LpDecreaseOutputSchema = jsonObjectSchema;
653
+ var mcpUniswapV4LpClaimInputSchema = lpCommonApiInputSchema.extend({
654
+ tokenId: z.union([z.string(), z.number()])
655
+ });
656
+ var mcpUniswapV4LpClaimOutputSchema = jsonObjectSchema;
657
+ var mcpUniswapV4LpListPositionsInputSchema = z.object({
658
+ chainId: z.union([z.number().int().positive(), z.string().min(1)]),
659
+ keyGenId: z.string().min(1).optional(),
660
+ walletAddress: evmAddressSchema.optional(),
661
+ positionManagerAddress: evmAddressSchema.optional()
662
+ });
663
+ var mcpUniswapV4LpListPositionsOutputSchema = z.object({
664
+ source: z.literal("token_registry"),
665
+ positions: z.array(
666
+ z.object({
667
+ tokenId: z.string(),
668
+ positionManager: evmAddressSchema,
669
+ owner: evmAddressSchema,
670
+ name: z.string().optional(),
671
+ symbol: z.string().optional()
672
+ })
673
+ )
674
+ });
675
+ var mcpUniswapV4RegisterPositionNftInputSchema = z.object({
676
+ chainId: z.union([z.number().int().positive(), z.string().min(1)]),
677
+ tokenId: z.union([z.string(), z.number()]),
678
+ keyGenId: z.string().min(1).optional(),
679
+ positionManagerAddress: evmAddressSchema.optional(),
680
+ name: z.string().optional(),
681
+ symbol: z.string().optional(),
682
+ tokenURI: z.string().optional()
683
+ });
684
+ var mcpUniswapV4RegisterPositionNftOutputSchema = z.object({
685
+ message: z.string(),
686
+ tokenId: z.string(),
687
+ positionManager: evmAddressSchema
688
+ });
689
+ var mcpUniswapV4RegisterPositionFromMintTxInputSchema = z.object({
690
+ chainId: z.union([z.number().int().positive(), z.string().min(1)]),
691
+ txHash: z.string().min(1),
692
+ keyGenId: z.string().min(1).optional(),
693
+ walletAddress: evmAddressSchema.optional(),
694
+ rpcUrl: z.string().optional(),
695
+ positionManagerAddress: evmAddressSchema.optional()
696
+ });
697
+ var mcpUniswapV4RegisterPositionFromMintTxOutputSchema = z.object({
698
+ message: z.string(),
699
+ tokenId: z.string(),
700
+ positionManager: evmAddressSchema,
701
+ registered: z.boolean()
702
+ });
703
+ var lpBuildCommonSchema = {
704
+ lpResponse: jsonObjectSchema.describe("Full LP API response (create/increase/decrease/claim)"),
705
+ nativeWrapped: evmAddressSchema.optional(),
706
+ poolReference: z.string().optional()
707
+ };
708
+ var mcpUniswapV4BuildMintLiquidityMultisignInputSchema = evmMultisignCommonInputSchema.extend(
709
+ lpBuildCommonSchema
710
+ );
711
+ var mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema = evmMultisignCommonInputSchema.extend({
712
+ ...lpBuildCommonSchema,
713
+ nftTokenId: z.union([z.string(), z.number()])
714
+ });
715
+ var mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema = evmMultisignCommonInputSchema.extend({
716
+ ...lpBuildCommonSchema,
717
+ nftTokenId: z.union([z.string(), z.number()])
718
+ });
719
+ var mcpUniswapV4BuildCollectFeesMultisignInputSchema = evmMultisignCommonInputSchema.extend({
720
+ ...lpBuildCommonSchema,
721
+ nftTokenId: z.union([z.string(), z.number()])
722
+ });
523
723
  var mcpCurveDaoQuoteInputSchema = z.object({
524
724
  chainId: z.number().int().positive().describe("EVM chain id (rpcUrl resolved from get_chain_registry rpcGateway)"),
525
725
  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 +808,44 @@ var mcpSkySusdsDepositInputSchema = mcpMultisignInput({
608
808
  var mcpSkySusdsRedeemInputSchema = mcpMultisignInput({
609
809
  sharesHuman: z.string().min(1)
610
810
  });
811
+ var mcpAaveV4MarketIdSchema = z.string().min(1).optional().describe("UI market segment: main (Plus), core, or bluechip (Prime). Default main.");
812
+ var mcpAaveV4HealthPreviewSchema = {
813
+ skipHealthPreview: z.boolean().optional().describe("Skip Aave v4 health-factor preview before withdraw/borrow/repay (not recommended)."),
814
+ acknowledgeHealthRisk: z.boolean().optional().describe(
815
+ "Required true when preview returns a confirm-level health risk (withdraw/borrow/repay)."
816
+ )
817
+ };
611
818
  var mcpAaveV4DepositInputSchema = mcpMultisignInput({
612
- spoke: evmAddressSchema,
613
- underlying: evmAddressSchema,
819
+ spoke: evmAddressSchema.optional().describe("Omit \u2014 continuum-mcp-server resolves spoke from Aave v4 API."),
820
+ underlying: evmAddressSchema.describe(
821
+ "Asset to supply. Native ETH: 0x0 or wrapped native with isNativeIn true."
822
+ ),
614
823
  amountHuman: z.string().min(1),
615
- marketId: z.string().min(1)
824
+ marketId: mcpAaveV4MarketIdSchema,
825
+ isNativeIn: z.boolean().optional().describe("Wrap native to wrapped native before supply (e.g. ETH \u2192 WETH)."),
826
+ enableAsCollateralAfterSupply: z.boolean().optional().describe("Append setUsingAsCollateral after supply in the same batch.")
616
827
  });
617
828
  var mcpAaveV4WithdrawInputSchema = mcpMultisignInput({
618
- spoke: evmAddressSchema,
619
- underlying: evmAddressSchema,
829
+ spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
830
+ underlying: evmAddressSchema.describe("Supplied asset to withdraw."),
620
831
  amountHuman: z.string().min(1),
621
- marketId: z.string().min(1)
832
+ marketId: mcpAaveV4MarketIdSchema,
833
+ ...mcpAaveV4HealthPreviewSchema
622
834
  });
623
835
  var mcpAaveV4BorrowInputSchema = mcpMultisignInput({
624
- spoke: evmAddressSchema,
625
- underlying: evmAddressSchema,
836
+ spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
837
+ underlying: evmAddressSchema.describe("Debt asset to borrow (e.g. USDC), not collateral."),
626
838
  amountHuman: z.string().min(1),
627
- marketId: z.string().min(1)
839
+ marketId: mcpAaveV4MarketIdSchema,
840
+ collateralUnderlying: evmAddressSchema.optional().describe("Collateral token already supplied; helps pick hub when debt exists on multiple hubs."),
841
+ ...mcpAaveV4HealthPreviewSchema
628
842
  });
629
843
  var mcpAaveV4RepayInputSchema = mcpMultisignInput({
630
- spoke: evmAddressSchema,
631
- underlying: evmAddressSchema,
844
+ spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
845
+ underlying: evmAddressSchema.describe("Debt token to repay."),
632
846
  amountHuman: z.string().min(1),
633
- marketId: z.string().min(1)
847
+ marketId: mcpAaveV4MarketIdSchema,
848
+ ...mcpAaveV4HealthPreviewSchema
634
849
  });
635
850
  var mcpEulerV2IsolatedLendInputSchema = mcpMultisignInput({
636
851
  vault: evmAddressSchema,
@@ -877,8 +1092,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
877
1092
  actionId: "aave-v4.deposit",
878
1093
  protocolId: "aave-v4",
879
1094
  chainCategory: "evm",
880
- description: "Build Aave v4 Spoke supply/deposit batch.",
881
- prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
1095
+ description: "Build Aave v4 Spoke supply/deposit batch (wrap native, approve, supply).",
1096
+ prerequisites: ["keyGenId", "chainId", "underlying", "amountHuman", "get_defi_protocol_skill for hubs/spokes"],
882
1097
  followUp: ["Sign messageToSign", "POST /multiSignRequest"],
883
1098
  handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4DepositBatch" },
884
1099
  inputZod: mcpAaveV4DepositInputSchema
@@ -888,8 +1103,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
888
1103
  actionId: "aave-v4.withdraw",
889
1104
  protocolId: "aave-v4",
890
1105
  chainCategory: "evm",
891
- description: "Build Aave v4 Spoke withdraw batch.",
892
- prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
1106
+ description: "Build Aave v4 Spoke withdraw; health-factor preview when user has borrow debt.",
1107
+ prerequisites: ["keyGenId", "chainId", "underlying (supplied asset)", "amountHuman"],
893
1108
  followUp: ["Sign messageToSign", "POST /multiSignRequest"],
894
1109
  handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeWithdraw" },
895
1110
  inputZod: mcpAaveV4WithdrawInputSchema
@@ -899,8 +1114,14 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
899
1114
  actionId: "aave-v4.borrow",
900
1115
  protocolId: "aave-v4",
901
1116
  chainCategory: "evm",
902
- description: "Build Aave v4 Spoke borrow batch.",
903
- prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
1117
+ description: "Build Aave v4 Spoke borrow; underlying is debt asset; collateral must be supplied first.",
1118
+ prerequisites: [
1119
+ "keyGenId",
1120
+ "chainId",
1121
+ "underlying (debt token)",
1122
+ "amountHuman",
1123
+ "collateral supplied via deposit"
1124
+ ],
904
1125
  followUp: ["Sign messageToSign", "POST /multiSignRequest"],
905
1126
  handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeBorrow" },
906
1127
  inputZod: mcpAaveV4BorrowInputSchema
@@ -910,8 +1131,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
910
1131
  actionId: "aave-v4.repay",
911
1132
  protocolId: "aave-v4",
912
1133
  chainCategory: "evm",
913
- description: "Build Aave v4 Spoke repay batch.",
914
- prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
1134
+ description: "Build Aave v4 Spoke repay (approve if needed + repay).",
1135
+ prerequisites: ["keyGenId", "chainId", "underlying (debt token)", "amountHuman"],
915
1136
  followUp: ["Sign messageToSign", "POST /multiSignRequest"],
916
1137
  handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeRepay" },
917
1138
  inputZod: mcpAaveV4RepayInputSchema
@@ -1001,7 +1222,11 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1001
1222
  protocolId: "uniswap-v4",
1002
1223
  chainCategory: "evm",
1003
1224
  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)."],
1225
+ prerequisites: [
1226
+ "UNISWAP_API_KEY in node Variables",
1227
+ "get_defi_protocol_skill for full quote \u2192 create_swap \u2192 build flow",
1228
+ "keyGenId (resolves swapper)"
1229
+ ],
1005
1230
  followUp: ["ctm_uniswap_v4_create_swap", "ctm_uniswap_v4_build_swap_multisign"],
1006
1231
  handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapTradeQuote" },
1007
1232
  inputZod: mcpUniswapV4QuoteInputSchema,
@@ -1013,7 +1238,10 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1013
1238
  protocolId: "uniswap-v4",
1014
1239
  chainCategory: "evm",
1015
1240
  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)"],
1241
+ prerequisites: [
1242
+ "ctm_uniswap_v4_quote output (fullQuoteFromPermit)",
1243
+ "get_defi_protocol_skill for deadline and field alignment"
1244
+ ],
1017
1245
  followUp: ["ctm_uniswap_v4_build_swap_multisign"],
1018
1246
  handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapCreateSwap" },
1019
1247
  inputZod: mcpUniswapV4CreateSwapInputSchema,
@@ -1026,16 +1254,187 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1026
1254
  chainCategory: "evm",
1027
1255
  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
1256
  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"
1257
+ "ctm_uniswap_v4_create_swap output + matching quote snapshot and swapDeadlineUnix",
1258
+ "keyGenId + chainId + purposeText"
1033
1259
  ],
1034
1260
  followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
1035
1261
  handler: { importPath: "protocols/evm/uniswap-v4", exportName: "buildEvmMultisignBodyUniswapV4SkipPermit2Batch" },
1036
1262
  inputZod: mcpUniswapV4BuildSwapMultisignInputSchema,
1037
1263
  outputZod: multisignOutputSchema
1038
1264
  }),
1265
+ defineMcpTool({
1266
+ name: "ctm_uniswap_v4_list_lp_pools",
1267
+ actionId: "uniswap-v4.lp-list-pools",
1268
+ protocolId: "uniswap-v4",
1269
+ chainCategory: "evm",
1270
+ description: "List standard Uniswap V4 LP pools for a chain (ETH/USDC and other main pairs at common fee tiers). Returns presetId, token addresses, fee, tickSpacing, and computed poolReference (bytes32 pool id). Use presetId as poolPreset on lp_create_position.",
1271
+ prerequisites: ["chainId"],
1272
+ followUp: ["ctm_uniswap_v4_lp_create_position"],
1273
+ handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapV4ListStandardLpPools" },
1274
+ inputZod: mcpUniswapV4LpListPoolsInputSchema,
1275
+ outputZod: mcpUniswapV4LpListPoolsOutputSchema
1276
+ }),
1277
+ defineMcpTool({
1278
+ name: "ctm_uniswap_v4_lp_create_position",
1279
+ actionId: "uniswap-v4.lp-create",
1280
+ protocolId: "uniswap-v4",
1281
+ chainCategory: "evm",
1282
+ 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. Pass poolPreset from list_lp_pools, or existingPool with poolReference (or fee+tickSpacing to derive pool id).",
1283
+ prerequisites: [
1284
+ "UNISWAP_API_KEY",
1285
+ "ctm_uniswap_v4_list_lp_pools for standard pairs",
1286
+ "get_defi_protocol_skill for LP flow"
1287
+ ],
1288
+ followUp: ["ctm_uniswap_v4_build_mint_liquidity_multisign"],
1289
+ handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpCreatePosition" },
1290
+ inputZod: mcpUniswapV4LpCreatePositionInputSchema,
1291
+ outputZod: mcpUniswapV4LpCreatePositionOutputSchema
1292
+ }),
1293
+ defineMcpTool({
1294
+ name: "ctm_uniswap_v4_build_mint_liquidity_multisign",
1295
+ actionId: "uniswap-v4.mint-liquidity",
1296
+ protocolId: "uniswap-v4",
1297
+ chainCategory: "evm",
1298
+ description: "Build mpc-auth multiSignRequest for minting a Uniswap V4 LP position. Batches ERC-20 approve(s) + Position Manager tx from LP create response.",
1299
+ prerequisites: ["ctm_uniswap_v4_lp_create_position output", "keyGenId + chainId + purposeText"],
1300
+ followUp: [
1301
+ "Sign messageToSign",
1302
+ "POST /multiSignRequest",
1303
+ "After execute: ctm_uniswap_v4_register_position_from_mint_tx (mint tx hash)"
1304
+ ],
1305
+ handler: {
1306
+ importPath: "protocols/evm/uniswap-v4",
1307
+ exportName: "buildEvmMultisignBodyUniswapV4MintLiquidityBatch"
1308
+ },
1309
+ inputZod: mcpUniswapV4BuildMintLiquidityMultisignInputSchema,
1310
+ outputZod: multisignOutputSchema
1311
+ }),
1312
+ defineMcpTool({
1313
+ name: "ctm_uniswap_v4_lp_increase",
1314
+ actionId: "uniswap-v4.lp-increase",
1315
+ protocolId: "uniswap-v4",
1316
+ chainCategory: "evm",
1317
+ description: "Call Uniswap LP API POST /lp/increase. Returns `increase` transaction calldata.",
1318
+ prerequisites: ["UNISWAP_API_KEY", "nftTokenId from ctm_uniswap_v4_lp_list_positions"],
1319
+ followUp: ["ctm_uniswap_v4_build_increase_liquidity_multisign"],
1320
+ handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpIncreasePosition" },
1321
+ inputZod: mcpUniswapV4LpIncreaseInputSchema,
1322
+ outputZod: mcpUniswapV4LpIncreaseOutputSchema
1323
+ }),
1324
+ defineMcpTool({
1325
+ name: "ctm_uniswap_v4_build_increase_liquidity_multisign",
1326
+ actionId: "uniswap-v4.increase-liquidity",
1327
+ protocolId: "uniswap-v4",
1328
+ chainCategory: "evm",
1329
+ description: "Build mpc-auth multiSignRequest to increase Uniswap V4 position liquidity.",
1330
+ prerequisites: ["ctm_uniswap_v4_lp_increase output"],
1331
+ followUp: ["Sign messageToSign", "POST /multiSignRequest"],
1332
+ handler: {
1333
+ importPath: "protocols/evm/uniswap-v4",
1334
+ exportName: "buildEvmMultisignBodyUniswapV4IncreaseLiquidityBatch"
1335
+ },
1336
+ inputZod: mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema,
1337
+ outputZod: multisignOutputSchema
1338
+ }),
1339
+ defineMcpTool({
1340
+ name: "ctm_uniswap_v4_lp_decrease",
1341
+ actionId: "uniswap-v4.lp-decrease",
1342
+ protocolId: "uniswap-v4",
1343
+ chainCategory: "evm",
1344
+ description: "Call Uniswap LP API POST /lp/decrease. Returns `decrease` transaction calldata.",
1345
+ prerequisites: ["UNISWAP_API_KEY", "nftTokenId"],
1346
+ followUp: ["ctm_uniswap_v4_build_decrease_liquidity_multisign"],
1347
+ handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpDecreasePosition" },
1348
+ inputZod: mcpUniswapV4LpDecreaseInputSchema,
1349
+ outputZod: mcpUniswapV4LpDecreaseOutputSchema
1350
+ }),
1351
+ defineMcpTool({
1352
+ name: "ctm_uniswap_v4_build_decrease_liquidity_multisign",
1353
+ actionId: "uniswap-v4.decrease-liquidity",
1354
+ protocolId: "uniswap-v4",
1355
+ chainCategory: "evm",
1356
+ description: "Build mpc-auth multiSignRequest to decrease Uniswap V4 position liquidity.",
1357
+ prerequisites: ["ctm_uniswap_v4_lp_decrease output"],
1358
+ followUp: ["Sign messageToSign", "POST /multiSignRequest"],
1359
+ handler: {
1360
+ importPath: "protocols/evm/uniswap-v4",
1361
+ exportName: "buildEvmMultisignBodyUniswapV4DecreaseLiquidityBatch"
1362
+ },
1363
+ inputZod: mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema,
1364
+ outputZod: multisignOutputSchema
1365
+ }),
1366
+ defineMcpTool({
1367
+ name: "ctm_uniswap_v4_lp_collect",
1368
+ actionId: "uniswap-v4.lp-claim",
1369
+ protocolId: "uniswap-v4",
1370
+ chainCategory: "evm",
1371
+ description: "Call Uniswap LP API POST /lp/claim to collect accrued fees from a V4 position.",
1372
+ prerequisites: ["UNISWAP_API_KEY", "nftTokenId"],
1373
+ followUp: ["ctm_uniswap_v4_build_collect_fees_multisign"],
1374
+ handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLpClaimFees" },
1375
+ inputZod: mcpUniswapV4LpClaimInputSchema,
1376
+ outputZod: mcpUniswapV4LpClaimOutputSchema
1377
+ }),
1378
+ defineMcpTool({
1379
+ name: "ctm_uniswap_v4_build_collect_fees_multisign",
1380
+ actionId: "uniswap-v4.collect-fees",
1381
+ protocolId: "uniswap-v4",
1382
+ chainCategory: "evm",
1383
+ description: "Build mpc-auth multiSignRequest to collect fees from a Uniswap V4 position.",
1384
+ prerequisites: ["ctm_uniswap_v4_lp_collect output"],
1385
+ followUp: ["Sign messageToSign", "POST /multiSignRequest"],
1386
+ handler: {
1387
+ importPath: "protocols/evm/uniswap-v4",
1388
+ exportName: "buildEvmMultisignBodyUniswapV4CollectFeesBatch"
1389
+ },
1390
+ inputZod: mcpUniswapV4BuildCollectFeesMultisignInputSchema,
1391
+ outputZod: multisignOutputSchema
1392
+ }),
1393
+ defineMcpTool({
1394
+ name: "ctm_uniswap_v4_lp_list_positions",
1395
+ actionId: "uniswap-v4.lp-list-positions",
1396
+ protocolId: "uniswap-v4",
1397
+ chainCategory: "evm",
1398
+ 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.",
1399
+ prerequisites: ["keyGenId + chainId", "Positions saved via register_position_nft or add_to_token_registry"],
1400
+ followUp: ["ctm_uniswap_v4_lp_increase", "ctm_uniswap_v4_lp_decrease", "ctm_uniswap_v4_lp_collect"],
1401
+ handler: {
1402
+ importPath: "protocols/evm/uniswap-v4",
1403
+ exportName: "uniswapV4ListPositionsRegistryMcpPlaceholder"
1404
+ },
1405
+ inputZod: mcpUniswapV4LpListPositionsInputSchema,
1406
+ outputZod: mcpUniswapV4LpListPositionsOutputSchema
1407
+ }),
1408
+ defineMcpTool({
1409
+ name: "ctm_uniswap_v4_register_position_nft",
1410
+ actionId: "uniswap-v4.register-position-nft",
1411
+ protocolId: "uniswap-v4",
1412
+ chainCategory: "evm",
1413
+ description: "Add a Uniswap V4 position NFT to the node token registry (ERC721, management-signed). Call after mint execute when tokenId is known.",
1414
+ prerequisites: ["chainId", "tokenId", "keyGenId for management signing"],
1415
+ followUp: ["ctm_uniswap_v4_lp_list_positions", "ctm_uniswap_v4_lp_increase"],
1416
+ handler: {
1417
+ importPath: "protocols/evm/uniswap-v4",
1418
+ exportName: "uniswapV4RegisterPositionNftPlaceholder"
1419
+ },
1420
+ inputZod: mcpUniswapV4RegisterPositionNftInputSchema,
1421
+ outputZod: mcpUniswapV4RegisterPositionNftOutputSchema
1422
+ }),
1423
+ defineMcpTool({
1424
+ name: "ctm_uniswap_v4_register_position_from_mint_tx",
1425
+ actionId: "uniswap-v4.register-position-from-mint-tx",
1426
+ protocolId: "uniswap-v4",
1427
+ chainCategory: "evm",
1428
+ description: "Parse a completed mint transaction receipt for the new position tokenId and add it to the node token registry (management-signed).",
1429
+ prerequisites: ["chainId", "txHash from mint batch execute", "keyGenId"],
1430
+ followUp: ["ctm_uniswap_v4_lp_list_positions"],
1431
+ handler: {
1432
+ importPath: "protocols/evm/uniswap-v4",
1433
+ exportName: "uniswapV4RegisterPositionFromMintTxPlaceholder"
1434
+ },
1435
+ inputZod: mcpUniswapV4RegisterPositionFromMintTxInputSchema,
1436
+ outputZod: mcpUniswapV4RegisterPositionFromMintTxOutputSchema
1437
+ }),
1039
1438
  defineMcpTool({
1040
1439
  name: "ctm_curve_dao_quote",
1041
1440
  actionId: "curve-dao.quote",
@@ -1043,8 +1442,9 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1043
1442
  chainCategory: "evm",
1044
1443
  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
1444
  prerequisites: [
1046
- "Chain must be supported by Curve (@curvefi/api network constants).",
1047
- "Configure rpcGateway for chainId in get_chain_registry."
1445
+ "get_defi_protocol_skill for native placeholder vs wrapped native on build",
1446
+ "chainId + tokenIn + tokenOut + amountHuman",
1447
+ "rpcGateway in get_chain_registry"
1048
1448
  ],
1049
1449
  followUp: ["ctm_curve_dao_build_swap_multisign"],
1050
1450
  handler: { importPath: "protocols/evm/curve-dao", exportName: "curveDaoQuote" },
@@ -1058,9 +1458,9 @@ var CORE_MCP_TOOL_DEFINITIONS = [
1058
1458
  chainCategory: "evm",
1059
1459
  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
1460
  prerequisites: [
1061
- "ctm_curve_dao_quote (recommended) or known-good route",
1062
- "keyGenId + chainId + purposeText",
1063
- "tokenIn/tokenOut/amountHuman/slippagePercent"
1461
+ "ctm_curve_dao_quote (recommended)",
1462
+ "keyGenId + chainId + purposeText + slippagePercent (0\u2013100 exclusive)",
1463
+ "get_defi_protocol_skill for tokenIn address rules"
1064
1464
  ],
1065
1465
  followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
1066
1466
  handler: { importPath: "protocols/evm/curve-dao", exportName: "buildEvmMultisignBodyCurveDaoBatch" },
@@ -1753,6 +2153,6 @@ function getAgentCatalog() {
1753
2153
  };
1754
2154
  }
1755
2155
 
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 };
2156
+ 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, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, multisignOutputSchema, parseMcpToolInput, parseMcpToolOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
1757
2157
  //# sourceMappingURL=catalog.js.map
1758
2158
  //# sourceMappingURL=catalog.js.map