@continuumdao/ctm-mpc-defi 0.2.13 → 0.2.16
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 +828 -280
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +1645 -300
- package/dist/agent/catalog.js +823 -281
- package/dist/agent/catalog.js.map +1 -1
- package/dist/chains/evm/index.cjs +75 -0
- package/dist/chains/evm/index.cjs.map +1 -1
- package/dist/chains/evm/index.d.ts +31 -1
- package/dist/chains/evm/index.js +73 -2
- package/dist/chains/evm/index.js.map +1 -1
- package/dist/index.cjs +140 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +138 -34
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/euler-v2/index.cjs +29 -2
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.d.ts +23 -1
- package/dist/protocols/evm/euler-v2/index.js +29 -3
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/gmx/index.cjs +42 -8
- package/dist/protocols/evm/gmx/index.cjs.map +1 -1
- package/dist/protocols/evm/gmx/index.d.ts +20 -4
- package/dist/protocols/evm/gmx/index.js +42 -9
- package/dist/protocols/evm/gmx/index.js.map +1 -1
- package/dist/protocols/evm/maple/index.cjs +9 -1
- package/dist/protocols/evm/maple/index.cjs.map +1 -1
- package/dist/protocols/evm/maple/index.d.ts +2 -1
- package/dist/protocols/evm/maple/index.js +9 -1
- package/dist/protocols/evm/maple/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +56 -0
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +28 -1
- package/dist/protocols/evm/morpho/index.js +56 -1
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs +98 -26
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.js +99 -27
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/package.json +1 -1
package/dist/agent/catalog.cjs
CHANGED
|
@@ -619,13 +619,287 @@ var jsonObjectSchema = zod.z.record(zod.z.unknown());
|
|
|
619
619
|
function parseMultisignBuilderOutput(data) {
|
|
620
620
|
return multisignOutputSchema.parse(data);
|
|
621
621
|
}
|
|
622
|
+
|
|
623
|
+
// src/agent/schemas/chainPreprocess.ts
|
|
624
|
+
function preprocessObject(raw) {
|
|
625
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
626
|
+
return { ...raw };
|
|
627
|
+
}
|
|
628
|
+
function firstDefined(...values) {
|
|
629
|
+
for (const v of values) {
|
|
630
|
+
if (v === void 0 || v === null) continue;
|
|
631
|
+
if (typeof v === "string" && !v.trim()) continue;
|
|
632
|
+
return v;
|
|
633
|
+
}
|
|
634
|
+
return void 0;
|
|
635
|
+
}
|
|
636
|
+
function aliasField(o, target, ...sources) {
|
|
637
|
+
if (firstDefined(o[target]) != null) return;
|
|
638
|
+
const val = firstDefined(...sources.map((k) => o[k]));
|
|
639
|
+
if (val != null) o[target] = val;
|
|
640
|
+
}
|
|
641
|
+
function derivePurposeIfMissing(o, build) {
|
|
642
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
643
|
+
if (purposeText) {
|
|
644
|
+
o.purposeText = purposeText;
|
|
645
|
+
return;
|
|
646
|
+
}
|
|
647
|
+
const derived = build(o);
|
|
648
|
+
if (derived) o.purposeText = derived;
|
|
649
|
+
}
|
|
650
|
+
function isLongToDirection(o) {
|
|
651
|
+
if (firstDefined(o.direction) != null) return;
|
|
652
|
+
const raw = o.isLong;
|
|
653
|
+
if (typeof raw === "boolean") {
|
|
654
|
+
o.direction = raw ? "long" : "short";
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
if (typeof raw === "string") {
|
|
658
|
+
const t = raw.trim().toLowerCase();
|
|
659
|
+
if (t === "true" || t === "long") o.direction = "long";
|
|
660
|
+
else if (t === "false" || t === "short") o.direction = "short";
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
function preprocessGmxGmBuildInput(raw) {
|
|
664
|
+
const o = preprocessObject(raw);
|
|
665
|
+
if (!o) return raw;
|
|
666
|
+
aliasField(o, "marketSymbol", "symbol", "market", "gmSymbol");
|
|
667
|
+
derivePurposeIfMissing(o, (x) => {
|
|
668
|
+
const sym = String(x.marketSymbol ?? x.symbol ?? "").trim();
|
|
669
|
+
const amt = String(x.collateralAmountHuman ?? x.gmAmountHuman ?? "").trim();
|
|
670
|
+
if (sym && amt) return `GMX GM ${sym} ${amt}`;
|
|
671
|
+
return void 0;
|
|
672
|
+
});
|
|
673
|
+
return o;
|
|
674
|
+
}
|
|
675
|
+
function preprocessGmxDecreaseInput(raw) {
|
|
676
|
+
const o = preprocessObject(raw);
|
|
677
|
+
if (!o) return raw;
|
|
678
|
+
aliasField(o, "symbol", "symbol", "indexName", "marketSymbol");
|
|
679
|
+
aliasField(o, "sizeUsdHuman", "sizeUsdHuman", "sizeUsd", "sizeInUsd");
|
|
680
|
+
aliasField(o, "collateralToken", "collateralToken", "collateralSymbol");
|
|
681
|
+
isLongToDirection(o);
|
|
682
|
+
derivePurposeIfMissing(o, (x) => {
|
|
683
|
+
const sym = String(x.symbol ?? "").trim();
|
|
684
|
+
const dir = String(x.direction ?? "").trim();
|
|
685
|
+
const size = String(x.sizeUsdHuman ?? "").trim();
|
|
686
|
+
if (sym && dir && size) return `GMX decrease ${dir} ${sym} ${size} USD`;
|
|
687
|
+
return void 0;
|
|
688
|
+
});
|
|
689
|
+
return o;
|
|
690
|
+
}
|
|
691
|
+
function preprocessGmxIncreaseInput(raw) {
|
|
692
|
+
const o = preprocessObject(raw);
|
|
693
|
+
if (!o) return raw;
|
|
694
|
+
aliasField(o, "symbol", "symbol", "indexName", "marketSymbol");
|
|
695
|
+
derivePurposeIfMissing(o, (x) => {
|
|
696
|
+
const sym = String(x.symbol ?? "").trim();
|
|
697
|
+
const dir = String(x.direction ?? "").trim();
|
|
698
|
+
const size = String(x.sizeUsdHuman ?? "").trim();
|
|
699
|
+
if (sym && dir && size) return `GMX ${dir} ${sym} ${size} USD`;
|
|
700
|
+
return void 0;
|
|
701
|
+
});
|
|
702
|
+
return o;
|
|
703
|
+
}
|
|
704
|
+
function preprocessHyperliquidCoinInput(raw) {
|
|
705
|
+
const o = preprocessObject(raw);
|
|
706
|
+
if (!o) return raw;
|
|
707
|
+
aliasField(o, "coin", "coin", "name", "resolvedCoin", "symbol");
|
|
708
|
+
return o;
|
|
709
|
+
}
|
|
710
|
+
function preprocessHyperliquidLimitOrderInput(raw) {
|
|
711
|
+
const o = preprocessHyperliquidCoinInput(raw);
|
|
712
|
+
if (!preprocessObject(o)) return raw;
|
|
713
|
+
aliasField(o, "limitPxHuman", "limitPxHuman", "limitPx", "markPx");
|
|
714
|
+
aliasField(o, "szHuman", "szHuman", "sz", "size");
|
|
715
|
+
derivePurposeIfMissing(o, (x) => {
|
|
716
|
+
const coin = String(x.coin ?? "").trim();
|
|
717
|
+
const side = x.isBuy === true || x.isBuy === "true" ? "buy" : "sell";
|
|
718
|
+
const sz = String(x.szHuman ?? "").trim();
|
|
719
|
+
if (coin && sz) return `HL limit ${side} ${coin} ${sz}`;
|
|
720
|
+
return void 0;
|
|
721
|
+
});
|
|
722
|
+
return o;
|
|
723
|
+
}
|
|
724
|
+
function preprocessHyperliquidCloseInput(raw) {
|
|
725
|
+
const o = preprocessHyperliquidCoinInput(raw);
|
|
726
|
+
if (!preprocessObject(o)) return raw;
|
|
727
|
+
aliasField(o, "szHuman", "szHuman", "sz", "size");
|
|
728
|
+
aliasField(o, "limitPxHuman", "limitPxHuman", "limitPx", "markPx");
|
|
729
|
+
derivePurposeIfMissing(o, (x) => {
|
|
730
|
+
const coin = String(x.coin ?? "").trim();
|
|
731
|
+
const sz = String(x.szHuman ?? "").trim();
|
|
732
|
+
if (coin && sz) return `HL close ${coin} ${sz}`;
|
|
733
|
+
return void 0;
|
|
734
|
+
});
|
|
735
|
+
return o;
|
|
736
|
+
}
|
|
737
|
+
function preprocessHyperliquidVaultDepositInput(raw) {
|
|
738
|
+
const o = preprocessObject(raw);
|
|
739
|
+
if (!o) return raw;
|
|
740
|
+
derivePurposeIfMissing(o, (x) => {
|
|
741
|
+
const name = String(x.vaultName ?? "").trim();
|
|
742
|
+
const usd = String(x.usdHuman ?? "").trim();
|
|
743
|
+
if (name && usd) return `HL vault deposit ${usd} into ${name}`;
|
|
744
|
+
if (usd) return `HL vault deposit ${usd}`;
|
|
745
|
+
return void 0;
|
|
746
|
+
});
|
|
747
|
+
return o;
|
|
748
|
+
}
|
|
749
|
+
function preprocessHyperliquidVaultWithdrawInput(raw) {
|
|
750
|
+
const o = preprocessObject(raw);
|
|
751
|
+
if (!o) return raw;
|
|
752
|
+
aliasField(o, "usdHuman", "usdHuman", "equity");
|
|
753
|
+
derivePurposeIfMissing(o, (x) => {
|
|
754
|
+
const usd = String(x.usdHuman ?? "").trim();
|
|
755
|
+
if (usd) return `HL vault withdraw ${usd}`;
|
|
756
|
+
return void 0;
|
|
757
|
+
});
|
|
758
|
+
return o;
|
|
759
|
+
}
|
|
760
|
+
function preprocessHyperliquidUndelegateInput(raw) {
|
|
761
|
+
const o = preprocessObject(raw);
|
|
762
|
+
if (!o) return raw;
|
|
763
|
+
aliasField(o, "hypeHuman", "hypeHuman", "amount");
|
|
764
|
+
return o;
|
|
765
|
+
}
|
|
766
|
+
function preprocessUniswapLpCreateInput(raw) {
|
|
767
|
+
const o = preprocessObject(raw);
|
|
768
|
+
if (!o) return raw;
|
|
769
|
+
aliasField(o, "poolPreset", "poolPreset", "presetId");
|
|
770
|
+
const pool = o.existingPool;
|
|
771
|
+
if (pool && typeof pool === "object" && !Array.isArray(pool)) {
|
|
772
|
+
const p = pool;
|
|
773
|
+
aliasField(p, "token0Address", "token0Address", "token0");
|
|
774
|
+
aliasField(p, "token1Address", "token1Address", "token1");
|
|
775
|
+
aliasField(p, "poolReference", "poolReference", "poolId");
|
|
776
|
+
}
|
|
777
|
+
return o;
|
|
778
|
+
}
|
|
779
|
+
function preprocessUniswapLpNftInput(raw) {
|
|
780
|
+
const o = preprocessObject(raw);
|
|
781
|
+
if (!o) return raw;
|
|
782
|
+
aliasField(o, "nftTokenId", "nftTokenId", "tokenId");
|
|
783
|
+
return o;
|
|
784
|
+
}
|
|
785
|
+
function preprocessUniswapLpCollectInput(raw) {
|
|
786
|
+
const o = preprocessObject(raw);
|
|
787
|
+
if (!o) return raw;
|
|
788
|
+
aliasField(o, "tokenId", "tokenId", "nftTokenId");
|
|
789
|
+
return o;
|
|
790
|
+
}
|
|
791
|
+
function tokenAddressFromQuoteSnapshot(quote, side) {
|
|
792
|
+
const inner = quote.quote;
|
|
793
|
+
if (!inner || typeof inner !== "object" || Array.isArray(inner)) return void 0;
|
|
794
|
+
const row = inner[side];
|
|
795
|
+
const token = row?.token;
|
|
796
|
+
return typeof token === "string" && token.trim() ? token.trim() : void 0;
|
|
797
|
+
}
|
|
798
|
+
function preprocessUniswapBuildSwapInput(raw) {
|
|
799
|
+
const o = preprocessObject(raw);
|
|
800
|
+
if (!o) return raw;
|
|
801
|
+
aliasField(o, "fullQuoteSnapshot", "fullQuoteSnapshot", "fullQuoteFromPermit", "quote");
|
|
802
|
+
const createResp = firstDefined(o.createSwapResponse, o.create_swap_response, o.createSwap);
|
|
803
|
+
if (createResp != null) o.createSwapResponse = createResp;
|
|
804
|
+
if (!firstDefined(o.swap) && createResp && typeof createResp === "object" && !Array.isArray(createResp)) {
|
|
805
|
+
const nested = createResp.swap;
|
|
806
|
+
if (nested != null) o.swap = nested;
|
|
807
|
+
}
|
|
808
|
+
const quote = o.fullQuoteSnapshot && typeof o.fullQuoteSnapshot === "object" && !Array.isArray(o.fullQuoteSnapshot) ? o.fullQuoteSnapshot : null;
|
|
809
|
+
if (quote && !firstDefined(o.tokenIn)) {
|
|
810
|
+
const tokenIn = tokenAddressFromQuoteSnapshot(quote, "input");
|
|
811
|
+
if (tokenIn) o.tokenIn = tokenIn;
|
|
812
|
+
}
|
|
813
|
+
derivePurposeIfMissing(o, () => "Uniswap V4 swap");
|
|
814
|
+
return o;
|
|
815
|
+
}
|
|
816
|
+
function preprocessUniswapBuildLpInput(raw) {
|
|
817
|
+
const o = preprocessUniswapLpNftInput(raw);
|
|
818
|
+
if (!preprocessObject(o)) return raw;
|
|
819
|
+
derivePurposeIfMissing(o, () => "Uniswap V4 liquidity");
|
|
820
|
+
return o;
|
|
821
|
+
}
|
|
822
|
+
function preprocessCurveBuildSwapInput(raw) {
|
|
823
|
+
const o = preprocessObject(raw);
|
|
824
|
+
if (!o) return raw;
|
|
825
|
+
const quote = o.quoteSnapshot && typeof o.quoteSnapshot === "object" && !Array.isArray(o.quoteSnapshot) ? o.quoteSnapshot : o;
|
|
826
|
+
aliasField(o, "tokenIn", "tokenIn", "tokenInRouterId", "tokenInAddress");
|
|
827
|
+
aliasField(o, "tokenOut", "tokenOut", "tokenOutRouterId", "tokenOutAddress");
|
|
828
|
+
aliasField(o, "amountHuman", "amountHuman", "inputAmount");
|
|
829
|
+
if (!firstDefined(o.tokenIn) && firstDefined(quote.tokenInRouterId)) {
|
|
830
|
+
o.tokenIn = quote.tokenInRouterId;
|
|
831
|
+
}
|
|
832
|
+
if (!firstDefined(o.tokenOut) && firstDefined(quote.tokenOutRouterId)) {
|
|
833
|
+
o.tokenOut = quote.tokenOutRouterId;
|
|
834
|
+
}
|
|
835
|
+
if (!firstDefined(o.amountHuman) && firstDefined(quote.inputAmount)) {
|
|
836
|
+
o.amountHuman = quote.inputAmount;
|
|
837
|
+
}
|
|
838
|
+
derivePurposeIfMissing(o, (x) => {
|
|
839
|
+
const amt = String(x.amountHuman ?? "").trim();
|
|
840
|
+
if (amt) return `Curve swap ${amt}`;
|
|
841
|
+
return void 0;
|
|
842
|
+
});
|
|
843
|
+
return o;
|
|
844
|
+
}
|
|
845
|
+
function preprocessMorphoBlueCollateralDepositInput(raw) {
|
|
846
|
+
const o = preprocessObject(raw);
|
|
847
|
+
if (!o) return raw;
|
|
848
|
+
aliasField(o, "collateralToken", "collateralToken", "collateralTokenAddress");
|
|
849
|
+
aliasField(o, "marketId", "marketId", "marketID");
|
|
850
|
+
derivePurposeIfMissing(o, (x) => {
|
|
851
|
+
const amt = String(x.amountHuman ?? "").trim();
|
|
852
|
+
const label = String(x.marketLabel ?? "").trim();
|
|
853
|
+
if (amt && label) return `Morpho Blue collateral ${amt} for ${label}`;
|
|
854
|
+
if (amt) return `Morpho Blue collateral deposit ${amt}`;
|
|
855
|
+
return void 0;
|
|
856
|
+
});
|
|
857
|
+
return o;
|
|
858
|
+
}
|
|
859
|
+
function preprocessMorphoBlueBorrowRepayInput(raw) {
|
|
860
|
+
const o = preprocessObject(raw);
|
|
861
|
+
if (!o) return raw;
|
|
862
|
+
aliasField(o, "loanToken", "loanToken", "loanTokenAddress");
|
|
863
|
+
return o;
|
|
864
|
+
}
|
|
865
|
+
function preprocessEulerV2IsolatedLendInput(raw) {
|
|
866
|
+
const o = preprocessObject(raw);
|
|
867
|
+
if (!o) return raw;
|
|
868
|
+
aliasField(o, "vault", "vault", "evaultAddress");
|
|
869
|
+
aliasField(o, "underlyingAddress", "underlyingAddress", "underlying");
|
|
870
|
+
aliasField(o, "marketName", "marketName", "vaultName");
|
|
871
|
+
derivePurposeIfMissing(o, (x) => {
|
|
872
|
+
const amt = String(x.assetAmountHuman ?? x.amountHuman ?? "").trim();
|
|
873
|
+
const label = String(x.marketName ?? x.vaultName ?? "").trim();
|
|
874
|
+
if (amt && label) return `Euler lend ${amt} into ${label}`;
|
|
875
|
+
if (amt) return `Euler vault deposit ${amt}`;
|
|
876
|
+
return void 0;
|
|
877
|
+
});
|
|
878
|
+
return o;
|
|
879
|
+
}
|
|
880
|
+
function preprocessAaveMultisignInput(action) {
|
|
881
|
+
return (raw) => {
|
|
882
|
+
const o = preprocessObject(raw);
|
|
883
|
+
if (!o) return raw;
|
|
884
|
+
derivePurposeIfMissing(o, (x) => {
|
|
885
|
+
const amt = String(x.amountHuman ?? "").trim();
|
|
886
|
+
const asset = String(x.underlying ?? "").trim();
|
|
887
|
+
if (amt && asset) return `Aave ${action} ${amt} ${asset}`;
|
|
888
|
+
if (amt) return `Aave ${action} ${amt}`;
|
|
889
|
+
return void 0;
|
|
890
|
+
});
|
|
891
|
+
return o;
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
// src/agent/schemas/uniswapV4.ts
|
|
622
896
|
var uniswapQuoteTradeTypeSchema = zod.z.enum(["EXACT_INPUT", "EXACT_OUTPUT"]);
|
|
623
897
|
var mcpUniswapV4QuoteInputSchema = zod.z.object({
|
|
624
898
|
type: uniswapQuoteTradeTypeSchema.describe("EXACT_INPUT or EXACT_OUTPUT"),
|
|
625
899
|
amount: zod.z.string().min(1).describe("Amount in token-in base units (wei string for ERC-20)"),
|
|
626
900
|
tokenIn: zod.z.string().min(1).describe("Input token; 0x0 for native ETH"),
|
|
627
901
|
tokenOut: zod.z.string().min(1).describe("Output token address"),
|
|
628
|
-
chainId:
|
|
902
|
+
chainId: agentEvmChainIdSchema.describe("tokenInChainId / same-chain default"),
|
|
629
903
|
uniswapApiKey: zod.z.string().min(1).describe("Uniswap Trade API x-api-key"),
|
|
630
904
|
swapper: evmAddressSchema.optional().describe("MPC executor; omit if keyGen + managementNodeUrl provided"),
|
|
631
905
|
slippage: zod.z.union([zod.z.number(), zod.z.string()]).optional().describe("Slippage percent; omit for API auto slippage"),
|
|
@@ -633,7 +907,7 @@ var mcpUniswapV4QuoteInputSchema = zod.z.object({
|
|
|
633
907
|
managementNodeUrl: zod.z.string().min(1).optional().describe("MPC node base URL; required with keyGen when swapper is omitted"),
|
|
634
908
|
tokenInChainId: zod.z.union([zod.z.number(), zod.z.string()]).optional(),
|
|
635
909
|
tokenOutChainId: zod.z.union([zod.z.number(), zod.z.string()]).optional(),
|
|
636
|
-
permit2Disabled:
|
|
910
|
+
permit2Disabled: agentOptionalBooleanSchema(),
|
|
637
911
|
baseUrl: zod.z.string().optional(),
|
|
638
912
|
universalRouterVersion: zod.z.string().optional()
|
|
639
913
|
});
|
|
@@ -655,18 +929,21 @@ var mcpUniswapV4CreateSwapOutputSchema = zod.z.object({
|
|
|
655
929
|
}).passthrough().describe("{ swap: TransactionRequest, requestId?, gasFee? }");
|
|
656
930
|
var swapTxRequestSchema = jsonObjectSchema.describe("swap field from create_swap response (to, data, value)");
|
|
657
931
|
var mcpUniswapV4BuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
932
|
+
zod.z.preprocess(
|
|
933
|
+
preprocessUniswapBuildSwapInput,
|
|
934
|
+
evmMultisignCommonInputSchema.extend({
|
|
935
|
+
tokenIn: evmAddressSchema.describe("Token in; 0x0 for native ETH"),
|
|
662
936
|
swap: swapTxRequestSchema,
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
937
|
+
createSwapResponse: zod.z.object({
|
|
938
|
+
swap: swapTxRequestSchema,
|
|
939
|
+
requestId: zod.z.string().optional(),
|
|
940
|
+
gasFee: zod.z.string().optional()
|
|
941
|
+
}).passthrough().describe("Full create_swap response"),
|
|
942
|
+
fullQuoteSnapshot: jsonObjectSchema.describe("Quote JSON used for the swap"),
|
|
943
|
+
swapDeadlineUnix: zod.z.number().describe("Same deadline passed to create_swap"),
|
|
944
|
+
slippagePercent: zod.z.number().optional().describe("Extra approve headroom for EXACT_OUTPUT")
|
|
945
|
+
})
|
|
946
|
+
)
|
|
670
947
|
);
|
|
671
948
|
var lpExistingPoolSchema = zod.z.object({
|
|
672
949
|
token0Address: evmAddressSchema,
|
|
@@ -696,22 +973,26 @@ var lpTickBoundsSchema = zod.z.object({
|
|
|
696
973
|
var lpCommonApiInputSchema = zod.z.object({
|
|
697
974
|
uniswapApiKey: zod.z.string().min(1),
|
|
698
975
|
walletAddress: evmAddressSchema.optional(),
|
|
699
|
-
chainId:
|
|
976
|
+
chainId: agentEvmChainIdSchema,
|
|
700
977
|
slippageTolerance: zod.z.number().optional(),
|
|
701
|
-
simulateTransaction:
|
|
978
|
+
simulateTransaction: agentOptionalBooleanSchema(),
|
|
702
979
|
baseUrl: zod.z.string().optional(),
|
|
703
980
|
keyGen: zod.z.string().optional(),
|
|
704
981
|
managementNodeUrl: zod.z.string().optional()
|
|
705
982
|
});
|
|
706
|
-
var mcpUniswapV4LpCreatePositionInputSchema =
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
983
|
+
var mcpUniswapV4LpCreatePositionInputSchema = zod.z.preprocess(
|
|
984
|
+
preprocessUniswapLpCreateInput,
|
|
985
|
+
lpCommonApiInputSchema.extend({
|
|
986
|
+
poolPreset: zod.z.string().optional().describe("presetId from ctm_uniswap_v4_list_lp_pools \u2014 server resolves existingPool"),
|
|
987
|
+
existingPool: lpExistingPoolSchema.optional(),
|
|
988
|
+
newPool: lpNewPoolSchema.optional(),
|
|
989
|
+
independentToken: lpIndependentTokenSchema,
|
|
990
|
+
priceBounds: lpPriceBoundsSchema.optional(),
|
|
991
|
+
tickBounds: lpTickBoundsSchema.optional()
|
|
992
|
+
})
|
|
993
|
+
);
|
|
713
994
|
var mcpUniswapV4LpListPoolsInputSchema = zod.z.object({
|
|
714
|
-
chainId:
|
|
995
|
+
chainId: agentEvmChainIdSchema,
|
|
715
996
|
pair: zod.z.string().optional().describe("Optional filter, e.g. eth-usdc or ETH/USDC")
|
|
716
997
|
});
|
|
717
998
|
var mcpUniswapV4LpListPoolsOutputSchema = zod.z.object({
|
|
@@ -738,26 +1019,35 @@ var mcpUniswapV4LpListPoolsOutputSchema = zod.z.object({
|
|
|
738
1019
|
notes: zod.z.string()
|
|
739
1020
|
});
|
|
740
1021
|
var mcpUniswapV4LpCreatePositionOutputSchema = jsonObjectSchema;
|
|
741
|
-
var mcpUniswapV4LpIncreaseInputSchema =
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
1022
|
+
var mcpUniswapV4LpIncreaseInputSchema = zod.z.preprocess(
|
|
1023
|
+
preprocessUniswapLpNftInput,
|
|
1024
|
+
lpCommonApiInputSchema.extend({
|
|
1025
|
+
token0Address: evmAddressSchema,
|
|
1026
|
+
token1Address: evmAddressSchema,
|
|
1027
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()]).describe("tokenId from lp_list_positions"),
|
|
1028
|
+
independentToken: lpIndependentTokenSchema
|
|
1029
|
+
})
|
|
1030
|
+
);
|
|
747
1031
|
var mcpUniswapV4LpIncreaseOutputSchema = jsonObjectSchema;
|
|
748
|
-
var mcpUniswapV4LpDecreaseInputSchema =
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
1032
|
+
var mcpUniswapV4LpDecreaseInputSchema = zod.z.preprocess(
|
|
1033
|
+
preprocessUniswapLpNftInput,
|
|
1034
|
+
lpCommonApiInputSchema.extend({
|
|
1035
|
+
token0Address: evmAddressSchema,
|
|
1036
|
+
token1Address: evmAddressSchema,
|
|
1037
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()]).describe("tokenId from lp_list_positions"),
|
|
1038
|
+
liquidityPercentageToDecrease: zod.z.number().int().min(1).max(100)
|
|
1039
|
+
})
|
|
1040
|
+
);
|
|
754
1041
|
var mcpUniswapV4LpDecreaseOutputSchema = jsonObjectSchema;
|
|
755
|
-
var mcpUniswapV4LpClaimInputSchema =
|
|
756
|
-
|
|
757
|
-
|
|
1042
|
+
var mcpUniswapV4LpClaimInputSchema = zod.z.preprocess(
|
|
1043
|
+
preprocessUniswapLpCollectInput,
|
|
1044
|
+
lpCommonApiInputSchema.extend({
|
|
1045
|
+
tokenId: zod.z.union([zod.z.string(), zod.z.number()]).describe("tokenId from lp_list_positions")
|
|
1046
|
+
})
|
|
1047
|
+
);
|
|
758
1048
|
var mcpUniswapV4LpClaimOutputSchema = jsonObjectSchema;
|
|
759
1049
|
var mcpUniswapV4LpListPositionsInputSchema = zod.z.object({
|
|
760
|
-
chainId:
|
|
1050
|
+
chainId: agentEvmChainIdSchema,
|
|
761
1051
|
keyGenId: zod.z.string().min(1).optional(),
|
|
762
1052
|
walletAddress: evmAddressSchema.optional(),
|
|
763
1053
|
positionManagerAddress: evmAddressSchema.optional()
|
|
@@ -775,7 +1065,7 @@ var mcpUniswapV4LpListPositionsOutputSchema = zod.z.object({
|
|
|
775
1065
|
)
|
|
776
1066
|
});
|
|
777
1067
|
var mcpUniswapV4RegisterPositionNftInputSchema = zod.z.object({
|
|
778
|
-
chainId:
|
|
1068
|
+
chainId: agentEvmChainIdSchema,
|
|
779
1069
|
tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
780
1070
|
keyGenId: zod.z.string().min(1).optional(),
|
|
781
1071
|
positionManagerAddress: evmAddressSchema.optional(),
|
|
@@ -789,7 +1079,7 @@ var mcpUniswapV4RegisterPositionNftOutputSchema = zod.z.object({
|
|
|
789
1079
|
positionManager: evmAddressSchema
|
|
790
1080
|
});
|
|
791
1081
|
var mcpUniswapV4RegisterPositionFromMintTxInputSchema = zod.z.object({
|
|
792
|
-
chainId:
|
|
1082
|
+
chainId: agentEvmChainIdSchema,
|
|
793
1083
|
txHash: zod.z.string().min(1),
|
|
794
1084
|
keyGenId: zod.z.string().min(1).optional(),
|
|
795
1085
|
walletAddress: evmAddressSchema.optional(),
|
|
@@ -808,28 +1098,37 @@ var lpBuildCommonSchema = {
|
|
|
808
1098
|
poolReference: zod.z.string().optional()
|
|
809
1099
|
};
|
|
810
1100
|
var mcpUniswapV4BuildMintLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
|
|
811
|
-
evmMultisignCommonInputSchema.extend(lpBuildCommonSchema)
|
|
1101
|
+
zod.z.preprocess(preprocessUniswapBuildLpInput, evmMultisignCommonInputSchema.extend(lpBuildCommonSchema))
|
|
812
1102
|
);
|
|
813
1103
|
var mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
1104
|
+
zod.z.preprocess(
|
|
1105
|
+
preprocessUniswapBuildLpInput,
|
|
1106
|
+
evmMultisignCommonInputSchema.extend({
|
|
1107
|
+
...lpBuildCommonSchema,
|
|
1108
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()]).describe("tokenId from lp_list_positions")
|
|
1109
|
+
})
|
|
1110
|
+
)
|
|
818
1111
|
);
|
|
819
1112
|
var mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
1113
|
+
zod.z.preprocess(
|
|
1114
|
+
preprocessUniswapBuildLpInput,
|
|
1115
|
+
evmMultisignCommonInputSchema.extend({
|
|
1116
|
+
...lpBuildCommonSchema,
|
|
1117
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()])
|
|
1118
|
+
})
|
|
1119
|
+
)
|
|
824
1120
|
);
|
|
825
1121
|
var mcpUniswapV4BuildCollectFeesMultisignInputSchema = withMultisignKeySourceRefine(
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
1122
|
+
zod.z.preprocess(
|
|
1123
|
+
preprocessUniswapBuildLpInput,
|
|
1124
|
+
evmMultisignCommonInputSchema.extend({
|
|
1125
|
+
...lpBuildCommonSchema,
|
|
1126
|
+
nftTokenId: zod.z.union([zod.z.string(), zod.z.number()])
|
|
1127
|
+
})
|
|
1128
|
+
)
|
|
830
1129
|
);
|
|
831
1130
|
var mcpCurveDaoQuoteInputSchema = zod.z.object({
|
|
832
|
-
chainId:
|
|
1131
|
+
chainId: agentEvmChainIdSchema.describe("EVM chain id (rpcUrl resolved from get_chain_registry rpcGateway)"),
|
|
833
1132
|
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"),
|
|
834
1133
|
tokenIn: zod.z.string().min(1).describe("Input token address, or 0xeeee\u2026 / 0x0 / eth for native"),
|
|
835
1134
|
tokenOut: zod.z.string().min(1).describe("Output token address or 0xeeee\u2026 native placeholder"),
|
|
@@ -840,13 +1139,112 @@ var mcpCurveDaoQuoteOutputSchema = jsonObjectSchema.describe(
|
|
|
840
1139
|
"Curve router quote: { inputAmount, output, route, priceImpactPercent?, tokenInRouterId, tokenOutRouterId }"
|
|
841
1140
|
);
|
|
842
1141
|
var mcpCurveDaoBuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
1142
|
+
zod.z.preprocess(
|
|
1143
|
+
preprocessCurveBuildSwapInput,
|
|
1144
|
+
evmMultisignCommonInputSchema.extend({
|
|
1145
|
+
tokenIn: evmAddressSchema.describe("ERC-20 sold (native in uses WETH path in UI)"),
|
|
1146
|
+
tokenOut: zod.z.string().min(1).describe("Output token or 0xeeee\u2026 native placeholder"),
|
|
1147
|
+
amountHuman: zod.z.string().min(1).describe("Human-readable amount of tokenIn"),
|
|
1148
|
+
slippagePercent: zod.z.number().gt(0).lt(100).describe("Slippage 0\u2013100 exclusive"),
|
|
1149
|
+
quoteSnapshot: jsonObjectSchema.optional().describe("Optional quote row from ctm_curve_dao_quote \u2014 aliases tokenIn/tokenOut/amountHuman")
|
|
1150
|
+
})
|
|
1151
|
+
)
|
|
849
1152
|
);
|
|
1153
|
+
var morphoExposureRowSchema = zod.z.object({
|
|
1154
|
+
label: zod.z.string(),
|
|
1155
|
+
allocatedUsdLabel: zod.z.string(),
|
|
1156
|
+
allocationPercentLabel: zod.z.string()
|
|
1157
|
+
});
|
|
1158
|
+
function preprocessMorphoVaultDepositInput(raw) {
|
|
1159
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
1160
|
+
const o = { ...raw };
|
|
1161
|
+
const vaultAddr = o.vaultAddress ?? o.vault;
|
|
1162
|
+
if (vaultAddr != null) {
|
|
1163
|
+
o.vaultAddress = vaultAddr;
|
|
1164
|
+
o.vault = vaultAddr;
|
|
1165
|
+
}
|
|
1166
|
+
const underlyingAddr = o.underlyingAddress ?? o.underlying;
|
|
1167
|
+
if (underlyingAddr != null) {
|
|
1168
|
+
o.underlyingAddress = underlyingAddr;
|
|
1169
|
+
o.underlying = underlyingAddr;
|
|
1170
|
+
}
|
|
1171
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
1172
|
+
if (!purposeText) {
|
|
1173
|
+
const amt = String(o.amountHuman ?? "").trim();
|
|
1174
|
+
const label = String(o.vaultName ?? o.vaultSymbol ?? "").trim();
|
|
1175
|
+
if (amt && label) o.purposeText = `Deposit ${amt} into ${label}`;
|
|
1176
|
+
else if (amt) o.purposeText = `Morpho vault deposit ${amt}`;
|
|
1177
|
+
}
|
|
1178
|
+
return o;
|
|
1179
|
+
}
|
|
1180
|
+
function preprocessMorphoVaultWithdrawInput(raw) {
|
|
1181
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
1182
|
+
const o = { ...raw };
|
|
1183
|
+
const vaultAddr = o.vaultAddress ?? o.vault;
|
|
1184
|
+
if (vaultAddr != null) {
|
|
1185
|
+
o.vaultAddress = vaultAddr;
|
|
1186
|
+
o.vault = vaultAddr;
|
|
1187
|
+
}
|
|
1188
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
1189
|
+
if (!purposeText) {
|
|
1190
|
+
const amt = String(o.amountHuman ?? "").trim();
|
|
1191
|
+
const label = String(o.vaultName ?? o.vaultSymbol ?? "").trim();
|
|
1192
|
+
if (amt && label) o.purposeText = `Withdraw ${amt} from ${label}`;
|
|
1193
|
+
else if (amt) o.purposeText = `Morpho vault withdraw ${amt}`;
|
|
1194
|
+
}
|
|
1195
|
+
return o;
|
|
1196
|
+
}
|
|
1197
|
+
var mcpMorphoFetchEarnVaultsInputSchema = zod.z.object({
|
|
1198
|
+
chainId: agentEvmChainIdSchema,
|
|
1199
|
+
underlying: zod.z.string().trim().min(1).optional().describe("Deposit asset symbol (e.g. USDC) or ERC-20 address. Omit to search all listed vaults on the chain."),
|
|
1200
|
+
query: zod.z.string().trim().min(1).optional().describe("Case-insensitive filter on vault name, symbol, address, or underlying symbol (e.g. Steakhouse, bbqUSDC)."),
|
|
1201
|
+
limit: zod.z.number().int().min(1).max(200).optional().describe("Max rows (default 50).")
|
|
1202
|
+
});
|
|
1203
|
+
var mcpMorphoFetchEarnVaultsOutputSchema = zod.z.object({
|
|
1204
|
+
vaults: zod.z.array(
|
|
1205
|
+
zod.z.object({
|
|
1206
|
+
vaultAddress: zod.z.string(),
|
|
1207
|
+
vaultName: zod.z.string(),
|
|
1208
|
+
vaultSymbol: zod.z.string(),
|
|
1209
|
+
underlyingAddress: zod.z.string(),
|
|
1210
|
+
underlyingSymbol: zod.z.string(),
|
|
1211
|
+
apy: zod.z.string(),
|
|
1212
|
+
netApy: zod.z.string(),
|
|
1213
|
+
netApy7d: zod.z.string(),
|
|
1214
|
+
netApy30d: zod.z.string(),
|
|
1215
|
+
netApy90d: zod.z.string(),
|
|
1216
|
+
performanceFee: zod.z.string(),
|
|
1217
|
+
managementFee: zod.z.string().nullable(),
|
|
1218
|
+
totalDepositsUsd: zod.z.string(),
|
|
1219
|
+
liquidityUsd: zod.z.string(),
|
|
1220
|
+
exposure: zod.z.array(morphoExposureRowSchema)
|
|
1221
|
+
})
|
|
1222
|
+
)
|
|
1223
|
+
});
|
|
1224
|
+
var mcpMorphoFetchBlueMarketsInputSchema = zod.z.object({
|
|
1225
|
+
chainId: agentEvmChainIdSchema,
|
|
1226
|
+
collateral: zod.z.string().trim().min(1).optional().describe("Collateral asset symbol or address (e.g. WETH, cbETH)."),
|
|
1227
|
+
loan: zod.z.string().trim().min(1).optional().describe("Loan asset symbol or address (e.g. USDC)."),
|
|
1228
|
+
query: zod.z.string().trim().min(1).optional().describe("Filter on market label, symbols, or marketId."),
|
|
1229
|
+
limit: zod.z.number().int().min(1).max(200).optional()
|
|
1230
|
+
});
|
|
1231
|
+
var mcpMorphoFetchBlueMarketsOutputSchema = zod.z.object({
|
|
1232
|
+
markets: zod.z.array(
|
|
1233
|
+
zod.z.object({
|
|
1234
|
+
marketId: zod.z.string().describe("Pass to build_blue_* multisign tools"),
|
|
1235
|
+
marketLabel: zod.z.string(),
|
|
1236
|
+
morphoBlueAddress: zod.z.string(),
|
|
1237
|
+
collateralTokenAddress: zod.z.string().describe("Copy as collateralToken for supply collateral"),
|
|
1238
|
+
collateralTokenSymbol: zod.z.string(),
|
|
1239
|
+
collateralTokenDecimals: zod.z.number().int(),
|
|
1240
|
+
loanTokenAddress: zod.z.string().describe("Copy as loanToken for borrow/repay"),
|
|
1241
|
+
loanTokenSymbol: zod.z.string(),
|
|
1242
|
+
loanTokenDecimals: zod.z.number().int(),
|
|
1243
|
+
borrowApyLabel: zod.z.string(),
|
|
1244
|
+
supplyApyLabel: zod.z.string()
|
|
1245
|
+
})
|
|
1246
|
+
)
|
|
1247
|
+
});
|
|
850
1248
|
var mcpServerCommonInputSchema = zod.z.object({
|
|
851
1249
|
keyGenId: zod.z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
|
|
852
1250
|
chainId: zod.z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
|
|
@@ -943,48 +1341,79 @@ var mcpSkySusdsRedeemInputSchema = mcpMultisignInput({
|
|
|
943
1341
|
sharesHuman: zod.z.string().min(1)
|
|
944
1342
|
});
|
|
945
1343
|
var mcpAaveV4MarketIdSchema = zod.z.string().min(1).optional().describe("UI market segment: main (Plus), core, or bluechip (Prime). Default main.");
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
1344
|
+
function mcpAaveV4MultisignInput(fields, action) {
|
|
1345
|
+
return withMultisignKeySourceRefine(
|
|
1346
|
+
zod.z.preprocess(preprocessAaveMultisignInput(action), evmMultisignCommonInputSchema.extend(fields))
|
|
1347
|
+
);
|
|
1348
|
+
}
|
|
1349
|
+
var mcpAaveV4HealthPreviewFields = {
|
|
1350
|
+
skipHealthPreview: agentOptionalBooleanSchema().describe(
|
|
1351
|
+
"Skip Aave v4 health-factor preview before withdraw/borrow/repay (not recommended)."
|
|
1352
|
+
),
|
|
1353
|
+
acknowledgeHealthRisk: agentOptionalBooleanSchema().describe(
|
|
949
1354
|
"Required true when preview returns a confirm-level health risk (withdraw/borrow/repay)."
|
|
950
1355
|
)
|
|
951
1356
|
};
|
|
952
|
-
var mcpAaveV4DepositInputSchema =
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
var
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
}
|
|
1357
|
+
var mcpAaveV4DepositInputSchema = mcpAaveV4MultisignInput(
|
|
1358
|
+
{
|
|
1359
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 continuum-mcp-server resolves spoke from Aave v4 API."),
|
|
1360
|
+
underlying: evmAddressSchema.describe(
|
|
1361
|
+
"Asset to supply. Native ETH: 0x0 or wrapped native with isNativeIn true."
|
|
1362
|
+
),
|
|
1363
|
+
amountHuman: zod.z.string().min(1),
|
|
1364
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
1365
|
+
isNativeIn: agentOptionalBooleanSchema().describe(
|
|
1366
|
+
"Wrap native to wrapped native before supply (e.g. ETH \u2192 WETH)."
|
|
1367
|
+
),
|
|
1368
|
+
enableAsCollateralAfterSupply: agentOptionalBooleanSchema().describe(
|
|
1369
|
+
"Append setUsingAsCollateral after supply in the same batch."
|
|
1370
|
+
)
|
|
1371
|
+
},
|
|
1372
|
+
"deposit"
|
|
1373
|
+
);
|
|
1374
|
+
var mcpAaveV4WithdrawInputSchema = mcpAaveV4MultisignInput(
|
|
1375
|
+
{
|
|
1376
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
1377
|
+
underlying: evmAddressSchema.describe("Supplied asset to withdraw."),
|
|
1378
|
+
amountHuman: zod.z.string().min(1),
|
|
1379
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
1380
|
+
...mcpAaveV4HealthPreviewFields
|
|
1381
|
+
},
|
|
1382
|
+
"withdraw"
|
|
1383
|
+
);
|
|
1384
|
+
var mcpAaveV4BorrowInputSchema = mcpAaveV4MultisignInput(
|
|
1385
|
+
{
|
|
1386
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
1387
|
+
underlying: evmAddressSchema.describe("Debt asset to borrow (e.g. USDC), not collateral."),
|
|
1388
|
+
amountHuman: zod.z.string().min(1),
|
|
1389
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
1390
|
+
collateralUnderlying: evmAddressSchema.optional().describe("Collateral token already supplied; helps pick hub when debt exists on multiple hubs."),
|
|
1391
|
+
...mcpAaveV4HealthPreviewFields
|
|
1392
|
+
},
|
|
1393
|
+
"borrow"
|
|
1394
|
+
);
|
|
1395
|
+
var mcpAaveV4RepayInputSchema = mcpAaveV4MultisignInput(
|
|
1396
|
+
{
|
|
1397
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
1398
|
+
underlying: evmAddressSchema.describe("Debt token to repay."),
|
|
1399
|
+
amountHuman: zod.z.string().min(1),
|
|
1400
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
1401
|
+
...mcpAaveV4HealthPreviewFields
|
|
1402
|
+
},
|
|
1403
|
+
"repay"
|
|
1404
|
+
);
|
|
1405
|
+
var mcpEulerV2IsolatedLendInputSchema = withMultisignKeySourceRefine(
|
|
1406
|
+
zod.z.preprocess(
|
|
1407
|
+
preprocessEulerV2IsolatedLendInput,
|
|
1408
|
+
evmMultisignCommonInputSchema.extend({
|
|
1409
|
+
vault: evmAddressSchema.describe("evaultAddress from ctm_euler_v2_fetch_lend_vaults"),
|
|
1410
|
+
assetAmountHuman: zod.z.string().min(1),
|
|
1411
|
+
underlyingAddress: evmAddressSchema.optional().describe("underlyingAddress from fetch row \u2014 server resolves if omitted"),
|
|
1412
|
+
marketName: zod.z.string().optional().describe("marketName from fetch row (purposeText)"),
|
|
1413
|
+
isNativeIn: agentOptionalBooleanSchema()
|
|
1414
|
+
})
|
|
1415
|
+
)
|
|
1416
|
+
);
|
|
988
1417
|
var mcpEulerV2IsolatedBorrowInputSchema = mcpMultisignInput({
|
|
989
1418
|
vault: evmAddressSchema,
|
|
990
1419
|
collateralAsset: evmAddressSchema,
|
|
@@ -1010,32 +1439,68 @@ var mcpEulerV2CollateralWithdrawInputSchema = mcpMultisignInput({
|
|
|
1010
1439
|
collateralAsset: evmAddressSchema,
|
|
1011
1440
|
amountHuman: zod.z.string().min(1)
|
|
1012
1441
|
});
|
|
1013
|
-
var mcpMorphoVaultDepositInputSchema =
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1442
|
+
var mcpMorphoVaultDepositInputSchema = withMultisignKeySourceRefine(
|
|
1443
|
+
zod.z.preprocess(
|
|
1444
|
+
preprocessMorphoVaultDepositInput,
|
|
1445
|
+
evmMultisignCommonInputSchema.extend({
|
|
1446
|
+
vaultAddress: evmAddressSchema.describe(
|
|
1447
|
+
"Vault contract address \u2014 copy vaultAddress from ctm_morpho_fetch_earn_vaults row."
|
|
1448
|
+
),
|
|
1449
|
+
underlyingAddress: evmAddressSchema.describe(
|
|
1450
|
+
"Deposit asset address \u2014 copy underlyingAddress from the same fetch row."
|
|
1451
|
+
),
|
|
1452
|
+
amountHuman: zod.z.string().min(1).describe('Human-readable deposit amount (e.g. "1000" USDC).'),
|
|
1453
|
+
vaultName: zod.z.string().optional().describe("Optional vaultName from fetch row (fills purposeText when omitted)."),
|
|
1454
|
+
vaultSymbol: zod.z.string().optional().describe("Optional vaultSymbol from fetch row."),
|
|
1455
|
+
isNativeIn: agentOptionalBooleanSchema()
|
|
1456
|
+
})
|
|
1457
|
+
)
|
|
1458
|
+
);
|
|
1459
|
+
var mcpMorphoVaultWithdrawInputSchema = withMultisignKeySourceRefine(
|
|
1460
|
+
zod.z.preprocess(
|
|
1461
|
+
preprocessMorphoVaultWithdrawInput,
|
|
1462
|
+
evmMultisignCommonInputSchema.extend({
|
|
1463
|
+
vaultAddress: evmAddressSchema.describe(
|
|
1464
|
+
"Vault contract address \u2014 copy vaultAddress from ctm_morpho_fetch_earn_vaults or positions."
|
|
1465
|
+
),
|
|
1466
|
+
amountHuman: zod.z.string().min(1),
|
|
1467
|
+
vaultName: zod.z.string().optional(),
|
|
1468
|
+
vaultSymbol: zod.z.string().optional()
|
|
1469
|
+
})
|
|
1470
|
+
)
|
|
1471
|
+
);
|
|
1472
|
+
var mcpMorphoBlueCollateralDepositInputSchema = withMultisignKeySourceRefine(
|
|
1473
|
+
zod.z.preprocess(
|
|
1474
|
+
preprocessMorphoBlueCollateralDepositInput,
|
|
1475
|
+
evmMultisignCommonInputSchema.extend({
|
|
1476
|
+
marketId: zod.z.string().min(1).describe("marketId from ctm_morpho_fetch_blue_markets"),
|
|
1477
|
+
collateralToken: evmAddressSchema.describe("collateralTokenAddress from fetch row"),
|
|
1478
|
+
amountHuman: zod.z.string().min(1),
|
|
1479
|
+
marketLabel: zod.z.string().optional(),
|
|
1480
|
+
isNativeIn: agentOptionalBooleanSchema()
|
|
1481
|
+
})
|
|
1482
|
+
)
|
|
1483
|
+
);
|
|
1484
|
+
var mcpMorphoBlueBorrowInputSchema = withMultisignKeySourceRefine(
|
|
1485
|
+
zod.z.preprocess(
|
|
1486
|
+
preprocessMorphoBlueBorrowRepayInput,
|
|
1487
|
+
evmMultisignCommonInputSchema.extend({
|
|
1488
|
+
marketId: zod.z.string().min(1),
|
|
1489
|
+
loanToken: evmAddressSchema.describe("loanTokenAddress from ctm_morpho_fetch_blue_markets"),
|
|
1490
|
+
amountHuman: zod.z.string().min(1)
|
|
1491
|
+
})
|
|
1492
|
+
)
|
|
1493
|
+
);
|
|
1494
|
+
var mcpMorphoBlueRepayInputSchema = withMultisignKeySourceRefine(
|
|
1495
|
+
zod.z.preprocess(
|
|
1496
|
+
preprocessMorphoBlueBorrowRepayInput,
|
|
1497
|
+
evmMultisignCommonInputSchema.extend({
|
|
1498
|
+
marketId: zod.z.string().min(1),
|
|
1499
|
+
loanToken: evmAddressSchema.describe("loanTokenAddress from fetch row"),
|
|
1500
|
+
amountHuman: zod.z.string().min(1)
|
|
1501
|
+
})
|
|
1502
|
+
)
|
|
1503
|
+
);
|
|
1039
1504
|
var mcpMorphoBlueCollateralWithdrawInputSchema = mcpMultisignInput({
|
|
1040
1505
|
marketId: zod.z.string().min(1),
|
|
1041
1506
|
amountHuman: zod.z.string().min(1),
|
|
@@ -1046,46 +1511,39 @@ var mcpMorphoMerklClaimInputSchema = mcpMultisignInput({
|
|
|
1046
1511
|
distributor: evmAddressSchema.optional(),
|
|
1047
1512
|
valueWei: zod.z.string().optional()
|
|
1048
1513
|
});
|
|
1049
|
-
var
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
chainId: zod.z.number().int().positive(),
|
|
1056
|
-
underlying: zod.z.string().trim().min(1).optional().describe("Deposit asset symbol (e.g. USDC) or ERC-20 address. Omit to search all listed vaults on the chain."),
|
|
1057
|
-
query: zod.z.string().trim().min(1).optional().describe("Case-insensitive filter on vault name, symbol, address, or underlying symbol (e.g. Steakhouse, bbqUSDC)."),
|
|
1058
|
-
limit: zod.z.number().int().min(1).max(200).optional().describe("Max rows (default 50).")
|
|
1514
|
+
var mcpEulerV2FetchLendVaultsInputSchema = zod.z.object({
|
|
1515
|
+
chainId: agentEvmChainIdSchema,
|
|
1516
|
+
underlyingAddress: evmAddressSchema.describe(
|
|
1517
|
+
"Underlying asset address from get_defi_protocol_supported_tokens."
|
|
1518
|
+
),
|
|
1519
|
+
limit: zod.z.number().int().min(1).max(100).optional().describe("Max vault rows (default 30).")
|
|
1059
1520
|
});
|
|
1060
|
-
var
|
|
1521
|
+
var mcpEulerV2FetchLendVaultsOutputSchema = zod.z.object({
|
|
1061
1522
|
vaults: zod.z.array(
|
|
1062
1523
|
zod.z.object({
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
vaultSymbol: zod.z.string(),
|
|
1524
|
+
evaultAddress: zod.z.string().describe("Copy as vault / evaultAddress for isolated lend multisign"),
|
|
1525
|
+
marketName: zod.z.string(),
|
|
1066
1526
|
underlyingAddress: zod.z.string(),
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
performanceFee: zod.z.string(),
|
|
1074
|
-
managementFee: zod.z.string().nullable(),
|
|
1075
|
-
totalDepositsUsd: zod.z.string(),
|
|
1076
|
-
liquidityUsd: zod.z.string(),
|
|
1077
|
-
exposure: zod.z.array(morphoExposureRowSchema)
|
|
1527
|
+
underlyingDecimals: zod.z.number().int(),
|
|
1528
|
+
supplyApyPercentLabel: zod.z.string(),
|
|
1529
|
+
borrowApyPercentLabel: zod.z.string(),
|
|
1530
|
+
availableLiquidityFormatted: zod.z.string(),
|
|
1531
|
+
totalSupplyFormatted: zod.z.string(),
|
|
1532
|
+
evcAddress: zod.z.string().nullable()
|
|
1078
1533
|
})
|
|
1079
1534
|
)
|
|
1080
1535
|
});
|
|
1081
|
-
function mcpGmxMultisignInput(fields) {
|
|
1082
|
-
|
|
1536
|
+
function mcpGmxMultisignInput(fields, preprocess) {
|
|
1537
|
+
const inner = evmMultisignCommonInputSchema.extend(fields);
|
|
1538
|
+
const shaped = preprocess ? zod.z.preprocess(preprocess, inner) : inner;
|
|
1539
|
+
return withMultisignKeySourceRefine(shaped);
|
|
1083
1540
|
}
|
|
1084
1541
|
var gmxDirectionSchema = zod.z.enum(["long", "short"]);
|
|
1085
1542
|
var gmxOrderTypeSchema = zod.z.enum(["market", "limit"]);
|
|
1086
|
-
var
|
|
1087
|
-
chainId:
|
|
1543
|
+
var gmxFetchChainInputSchema = zod.z.object({
|
|
1544
|
+
chainId: agentEvmChainIdSchema
|
|
1088
1545
|
});
|
|
1546
|
+
var mcpGmxFetchMarketsInputSchema = gmxFetchChainInputSchema;
|
|
1089
1547
|
var mcpGmxFetchMarketsOutputSchema = zod.z.object({
|
|
1090
1548
|
markets: zod.z.array(
|
|
1091
1549
|
zod.z.object({
|
|
@@ -1096,53 +1554,95 @@ var mcpGmxFetchMarketsOutputSchema = zod.z.object({
|
|
|
1096
1554
|
)
|
|
1097
1555
|
});
|
|
1098
1556
|
var mcpGmxFetchPositionsInputSchema = zod.z.object({
|
|
1099
|
-
chainId:
|
|
1557
|
+
chainId: agentEvmChainIdSchema,
|
|
1100
1558
|
executorAddress: evmAddressSchema
|
|
1101
1559
|
});
|
|
1102
1560
|
var mcpGmxFetchPositionsOutputSchema = zod.z.object({
|
|
1103
|
-
positions: zod.z.array(
|
|
1561
|
+
positions: zod.z.array(
|
|
1562
|
+
zod.z.object({
|
|
1563
|
+
key: zod.z.string(),
|
|
1564
|
+
symbol: zod.z.string().nullable().describe("GMX market symbol \u2014 pass to build_decrease as symbol"),
|
|
1565
|
+
indexName: zod.z.string(),
|
|
1566
|
+
isLong: zod.z.boolean(),
|
|
1567
|
+
direction: zod.z.enum(["long", "short"]).describe("Derived from isLong \u2014 pass to build_decrease"),
|
|
1568
|
+
sizeUsd: zod.z.string().nullable().describe("Copy as sizeUsdHuman for partial close"),
|
|
1569
|
+
collateralUsd: zod.z.string().nullable(),
|
|
1570
|
+
collateralSymbol: zod.z.string().nullable().describe("Copy as collateralToken"),
|
|
1571
|
+
entryPriceUsd: zod.z.string().nullable(),
|
|
1572
|
+
markPriceUsd: zod.z.string().nullable(),
|
|
1573
|
+
liquidationPriceUsd: zod.z.string().nullable(),
|
|
1574
|
+
leverageLabel: zod.z.string().nullable(),
|
|
1575
|
+
pnlUsd: zod.z.string().nullable()
|
|
1576
|
+
})
|
|
1577
|
+
)
|
|
1104
1578
|
});
|
|
1105
|
-
var
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
orderType: gmxOrderTypeSchema,
|
|
1109
|
-
sizeUsdHuman: zod.z.string().min(1),
|
|
1110
|
-
collateralToken: zod.z.string().min(1),
|
|
1111
|
-
collateralAmountHuman: zod.z.string().min(1),
|
|
1112
|
-
triggerPriceUsdHuman: zod.z.string().optional(),
|
|
1113
|
-
slippageBps: zod.z.number().int().nonnegative().optional(),
|
|
1114
|
-
executionFeeBufferBps: zod.z.number().int().nonnegative().optional()
|
|
1579
|
+
var mcpGmxFetchOrdersInputSchema = zod.z.object({
|
|
1580
|
+
chainId: agentEvmChainIdSchema,
|
|
1581
|
+
executorAddress: evmAddressSchema
|
|
1115
1582
|
});
|
|
1116
|
-
var
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
slippageBps: zod.z.number().int().nonnegative().optional(),
|
|
1126
|
-
executionFeeBufferBps: zod.z.number().int().nonnegative().optional()
|
|
1583
|
+
var mcpGmxFetchOrdersOutputSchema = zod.z.object({
|
|
1584
|
+
orders: zod.z.array(
|
|
1585
|
+
zod.z.object({
|
|
1586
|
+
orderId: zod.z.string().describe("Order key \u2014 pass to build_cancel_multisign as orderId"),
|
|
1587
|
+
isLong: zod.z.boolean().optional(),
|
|
1588
|
+
sizeDeltaUsd: zod.z.string().nullable().optional(),
|
|
1589
|
+
triggerPrice: zod.z.string().nullable().optional()
|
|
1590
|
+
})
|
|
1591
|
+
)
|
|
1127
1592
|
});
|
|
1593
|
+
var mcpGmxIncreaseInputSchema = mcpGmxMultisignInput(
|
|
1594
|
+
{
|
|
1595
|
+
symbol: zod.z.string().min(1).describe("Market symbol from ctm_gmx_fetch_markets"),
|
|
1596
|
+
direction: gmxDirectionSchema,
|
|
1597
|
+
orderType: gmxOrderTypeSchema,
|
|
1598
|
+
sizeUsdHuman: zod.z.string().min(1),
|
|
1599
|
+
collateralToken: zod.z.string().min(1),
|
|
1600
|
+
collateralAmountHuman: zod.z.string().min(1),
|
|
1601
|
+
triggerPriceUsdHuman: zod.z.string().optional(),
|
|
1602
|
+
slippageBps: zod.z.number().int().nonnegative().optional(),
|
|
1603
|
+
executionFeeBufferBps: zod.z.number().int().nonnegative().optional()
|
|
1604
|
+
},
|
|
1605
|
+
preprocessGmxIncreaseInput
|
|
1606
|
+
);
|
|
1607
|
+
var mcpGmxDecreaseInputSchema = mcpGmxMultisignInput(
|
|
1608
|
+
{
|
|
1609
|
+
symbol: zod.z.string().min(1).describe("symbol from ctm_gmx_fetch_positions or fetch_markets"),
|
|
1610
|
+
direction: gmxDirectionSchema.describe("direction from position row or isLong"),
|
|
1611
|
+
orderType: gmxOrderTypeSchema,
|
|
1612
|
+
sizeUsdHuman: zod.z.string().min(1).describe("sizeUsd from position row"),
|
|
1613
|
+
collateralToken: zod.z.string().min(1).describe("collateralSymbol from position row"),
|
|
1614
|
+
receiveToken: zod.z.string().optional(),
|
|
1615
|
+
triggerPriceUsdHuman: zod.z.string().optional(),
|
|
1616
|
+
keepLeverage: agentOptionalBooleanSchema(),
|
|
1617
|
+
slippageBps: zod.z.number().int().nonnegative().optional(),
|
|
1618
|
+
executionFeeBufferBps: zod.z.number().int().nonnegative().optional()
|
|
1619
|
+
},
|
|
1620
|
+
preprocessGmxDecreaseInput
|
|
1621
|
+
);
|
|
1128
1622
|
var mcpGmxCancelInputSchema = mcpGmxMultisignInput({
|
|
1129
|
-
orderId: zod.z.string().min(1)
|
|
1130
|
-
});
|
|
1131
|
-
var mcpGmxGmDepositInputSchema = mcpGmxMultisignInput({
|
|
1132
|
-
marketSymbol: zod.z.string().min(1),
|
|
1133
|
-
collateralToken: zod.z.string().min(1),
|
|
1134
|
-
collateralAmountHuman: zod.z.string().min(1),
|
|
1135
|
-
executionFeeBufferBps: zod.z.number().int().nonnegative().optional(),
|
|
1136
|
-
isNativeIn: zod.z.boolean().optional(),
|
|
1137
|
-
nativeWrapped: evmAddressSchema.optional()
|
|
1138
|
-
});
|
|
1139
|
-
var mcpGmxGmWithdrawInputSchema = mcpGmxMultisignInput({
|
|
1140
|
-
marketSymbol: zod.z.string().min(1),
|
|
1141
|
-
gmAmountHuman: zod.z.string().min(1),
|
|
1142
|
-
gmDecimals: zod.z.number().int().nonnegative().optional(),
|
|
1143
|
-
executionFeeBufferBps: zod.z.number().int().nonnegative().optional(),
|
|
1144
|
-
isNativeOut: zod.z.boolean().optional()
|
|
1623
|
+
orderId: zod.z.string().min(1).describe("orderId from ctm_gmx_fetch_orders")
|
|
1145
1624
|
});
|
|
1625
|
+
var mcpGmxGmDepositInputSchema = mcpGmxMultisignInput(
|
|
1626
|
+
{
|
|
1627
|
+
marketSymbol: zod.z.string().min(1).describe("symbol from ctm_gmx_fetch_gm_markets"),
|
|
1628
|
+
collateralToken: zod.z.string().min(1).describe("longTokenSymbol or shortTokenSymbol from GM market row"),
|
|
1629
|
+
collateralAmountHuman: zod.z.string().min(1),
|
|
1630
|
+
executionFeeBufferBps: zod.z.number().int().nonnegative().optional(),
|
|
1631
|
+
isNativeIn: agentOptionalBooleanSchema(),
|
|
1632
|
+
nativeWrapped: evmAddressSchema.optional()
|
|
1633
|
+
},
|
|
1634
|
+
preprocessGmxGmBuildInput
|
|
1635
|
+
);
|
|
1636
|
+
var mcpGmxGmWithdrawInputSchema = mcpGmxMultisignInput(
|
|
1637
|
+
{
|
|
1638
|
+
marketSymbol: zod.z.string().min(1).describe("symbol from ctm_gmx_fetch_gm_markets"),
|
|
1639
|
+
gmAmountHuman: zod.z.string().min(1),
|
|
1640
|
+
gmDecimals: zod.z.number().int().nonnegative().optional(),
|
|
1641
|
+
executionFeeBufferBps: zod.z.number().int().nonnegative().optional(),
|
|
1642
|
+
isNativeOut: agentOptionalBooleanSchema()
|
|
1643
|
+
},
|
|
1644
|
+
preprocessGmxGmBuildInput
|
|
1645
|
+
);
|
|
1146
1646
|
var mcpGmxStakeGmxInputSchema = mcpGmxMultisignInput({
|
|
1147
1647
|
amountHuman: zod.z.string().min(1),
|
|
1148
1648
|
gmxDecimals: zod.z.number().int().nonnegative().optional()
|
|
@@ -1151,9 +1651,7 @@ var mcpGmxUnstakeGmxInputSchema = mcpGmxMultisignInput({
|
|
|
1151
1651
|
amountHuman: zod.z.string().min(1),
|
|
1152
1652
|
gmxDecimals: zod.z.number().int().nonnegative().optional()
|
|
1153
1653
|
});
|
|
1154
|
-
var mcpGmxFetchGmMarketsInputSchema =
|
|
1155
|
-
chainId: zod.z.number().int().positive()
|
|
1156
|
-
});
|
|
1654
|
+
var mcpGmxFetchGmMarketsInputSchema = gmxFetchChainInputSchema;
|
|
1157
1655
|
var mcpGmxGmMarketApyRowSchema = zod.z.object({
|
|
1158
1656
|
symbol: zod.z.string(),
|
|
1159
1657
|
marketTokenAddress: zod.z.string(),
|
|
@@ -1167,9 +1665,7 @@ var mcpGmxGmMarketApyRowSchema = zod.z.object({
|
|
|
1167
1665
|
var mcpGmxFetchGmMarketsOutputSchema = zod.z.object({
|
|
1168
1666
|
markets: zod.z.array(mcpGmxGmMarketApyRowSchema)
|
|
1169
1667
|
});
|
|
1170
|
-
var mcpGmxFetchGmApyInputSchema =
|
|
1171
|
-
chainId: zod.z.number().int().positive()
|
|
1172
|
-
});
|
|
1668
|
+
var mcpGmxFetchGmApyInputSchema = gmxFetchChainInputSchema;
|
|
1173
1669
|
var mcpGmxFetchGmApyOutputSchema = zod.z.object({
|
|
1174
1670
|
markets: zod.z.array(
|
|
1175
1671
|
zod.z.object({
|
|
@@ -1185,7 +1681,7 @@ var mcpGmxFetchGmApyOutputSchema = zod.z.object({
|
|
|
1185
1681
|
)
|
|
1186
1682
|
});
|
|
1187
1683
|
var mcpGmxFetchStakingPowerInputSchema = zod.z.object({
|
|
1188
|
-
chainId:
|
|
1684
|
+
chainId: agentEvmChainIdSchema,
|
|
1189
1685
|
executorAddress: evmAddressSchema
|
|
1190
1686
|
});
|
|
1191
1687
|
var mcpGmxFetchStakingPowerOutputSchema = zod.z.object({
|
|
@@ -1201,7 +1697,7 @@ var gmxOhlcvCandleSchema = zod.z.object({
|
|
|
1201
1697
|
close: zod.z.string()
|
|
1202
1698
|
});
|
|
1203
1699
|
var mcpGmxFetchMarketPricesInputSchema = zod.z.object({
|
|
1204
|
-
chainId:
|
|
1700
|
+
chainId: agentEvmChainIdSchema,
|
|
1205
1701
|
symbol: zod.z.string().min(1),
|
|
1206
1702
|
collateralSymbol: zod.z.string().min(1)
|
|
1207
1703
|
});
|
|
@@ -1215,7 +1711,7 @@ var mcpGmxFetchMarketPricesOutputSchema = zod.z.object({
|
|
|
1215
1711
|
fetchedAtMs: zod.z.number()
|
|
1216
1712
|
});
|
|
1217
1713
|
var mcpGmxFetchOhlcvInputSchema = zod.z.object({
|
|
1218
|
-
chainId:
|
|
1714
|
+
chainId: agentEvmChainIdSchema,
|
|
1219
1715
|
symbol: zod.z.string().min(1),
|
|
1220
1716
|
timeframe: gmxOhlcvTimeframeSchema.optional(),
|
|
1221
1717
|
limit: zod.z.number().int().positive().max(500).optional(),
|
|
@@ -1226,8 +1722,10 @@ var mcpGmxFetchOhlcvOutputSchema = zod.z.object({
|
|
|
1226
1722
|
timeframe: gmxOhlcvTimeframeSchema,
|
|
1227
1723
|
candles: zod.z.array(gmxOhlcvCandleSchema)
|
|
1228
1724
|
});
|
|
1229
|
-
function mcpHyperliquidMultisignInput(fields) {
|
|
1230
|
-
|
|
1725
|
+
function mcpHyperliquidMultisignInput(fields, preprocess) {
|
|
1726
|
+
const inner = evmMultisignCommonInputSchema.extend(fields);
|
|
1727
|
+
const shaped = preprocess ? zod.z.preprocess(preprocess, inner) : inner;
|
|
1728
|
+
return withMultisignKeySourceRefine(shaped);
|
|
1231
1729
|
}
|
|
1232
1730
|
var hyperliquidTifSchema = zod.z.enum(["alo", "gtc", "ioc"]);
|
|
1233
1731
|
var hyperliquidOhlcvIntervalSchema = zod.z.enum([
|
|
@@ -1246,11 +1744,14 @@ var hyperliquidOhlcvIntervalSchema = zod.z.enum([
|
|
|
1246
1744
|
"1w",
|
|
1247
1745
|
"1M"
|
|
1248
1746
|
]);
|
|
1747
|
+
var hyperliquidFetchChainInputSchema = zod.z.object({
|
|
1748
|
+
chainId: agentEvmChainIdSchema
|
|
1749
|
+
});
|
|
1249
1750
|
var hyperliquidPositionRowSchema = zod.z.object({
|
|
1250
1751
|
key: zod.z.string(),
|
|
1251
1752
|
coin: zod.z.string(),
|
|
1252
1753
|
isLong: zod.z.boolean(),
|
|
1253
|
-
size: zod.z.string().nullable(),
|
|
1754
|
+
size: zod.z.string().nullable().describe("Copy as szHuman for build_close_multisign"),
|
|
1254
1755
|
entryPx: zod.z.string().nullable(),
|
|
1255
1756
|
positionValueUsd: zod.z.string().nullable(),
|
|
1256
1757
|
unrealizedPnlUsd: zod.z.string().nullable(),
|
|
@@ -1271,14 +1772,13 @@ var hyperliquidAccountSummarySchema = zod.z.object({
|
|
|
1271
1772
|
totalMarginUsedUsd: zod.z.string().nullable(),
|
|
1272
1773
|
withdrawableUsd: zod.z.string().nullable()
|
|
1273
1774
|
});
|
|
1274
|
-
var mcpHyperliquidFetchMarketsInputSchema =
|
|
1275
|
-
chainId: zod.z.number().int().positive(),
|
|
1775
|
+
var mcpHyperliquidFetchMarketsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1276
1776
|
dex: zod.z.string().optional()
|
|
1277
1777
|
});
|
|
1278
1778
|
var mcpHyperliquidFetchMarketsOutputSchema = zod.z.object({
|
|
1279
1779
|
markets: zod.z.array(
|
|
1280
1780
|
zod.z.object({
|
|
1281
|
-
name: zod.z.string(),
|
|
1781
|
+
name: zod.z.string().describe("Perp coin name \u2014 alias for build limit order coin"),
|
|
1282
1782
|
asset: zod.z.number(),
|
|
1283
1783
|
szDecimals: zod.z.number(),
|
|
1284
1784
|
maxLeverage: zod.z.number(),
|
|
@@ -1293,8 +1793,7 @@ var mcpHyperliquidFetchMarketsOutputSchema = zod.z.object({
|
|
|
1293
1793
|
})
|
|
1294
1794
|
)
|
|
1295
1795
|
});
|
|
1296
|
-
var mcpHyperliquidSearchMarketsInputSchema =
|
|
1297
|
-
chainId: zod.z.number().int().positive(),
|
|
1796
|
+
var mcpHyperliquidSearchMarketsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1298
1797
|
query: zod.z.string().min(1),
|
|
1299
1798
|
dex: zod.z.string().optional(),
|
|
1300
1799
|
limit: zod.z.number().int().positive().max(50).optional()
|
|
@@ -1317,8 +1816,7 @@ var mcpHyperliquidSearchMarketsOutputSchema = zod.z.object({
|
|
|
1317
1816
|
})
|
|
1318
1817
|
)
|
|
1319
1818
|
});
|
|
1320
|
-
var mcpHyperliquidFetchOpenContextInputSchema =
|
|
1321
|
-
chainId: zod.z.number().int().positive(),
|
|
1819
|
+
var mcpHyperliquidFetchOpenContextInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1322
1820
|
executorAddress: evmAddressSchema,
|
|
1323
1821
|
coin: zod.z.string().min(1),
|
|
1324
1822
|
dex: zod.z.string().optional()
|
|
@@ -1329,16 +1827,14 @@ var mcpHyperliquidFetchOpenContextOutputSchema = zod.z.object({
|
|
|
1329
1827
|
activeAsset: hyperliquidActiveAssetSchema
|
|
1330
1828
|
})
|
|
1331
1829
|
});
|
|
1332
|
-
var mcpHyperliquidFetchPositionsInputSchema =
|
|
1333
|
-
chainId: zod.z.number().int().positive(),
|
|
1830
|
+
var mcpHyperliquidFetchPositionsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1334
1831
|
executorAddress: evmAddressSchema,
|
|
1335
1832
|
dex: zod.z.string().optional()
|
|
1336
1833
|
});
|
|
1337
1834
|
var mcpHyperliquidFetchPositionsOutputSchema = zod.z.object({
|
|
1338
1835
|
positions: zod.z.array(hyperliquidPositionRowSchema)
|
|
1339
1836
|
});
|
|
1340
|
-
var mcpHyperliquidFetchOpenOrdersInputSchema =
|
|
1341
|
-
chainId: zod.z.number().int().positive(),
|
|
1837
|
+
var mcpHyperliquidFetchOpenOrdersInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1342
1838
|
executorAddress: evmAddressSchema,
|
|
1343
1839
|
dex: zod.z.string().optional()
|
|
1344
1840
|
});
|
|
@@ -1349,18 +1845,16 @@ var mcpHyperliquidFetchOpenOrdersOutputSchema = zod.z.object({
|
|
|
1349
1845
|
side: zod.z.string(),
|
|
1350
1846
|
limitPx: zod.z.string(),
|
|
1351
1847
|
sz: zod.z.string(),
|
|
1352
|
-
oid: zod.z.number(),
|
|
1848
|
+
oid: zod.z.number().describe("Pass to build_cancel_multisign as oid"),
|
|
1353
1849
|
timestamp: zod.z.number(),
|
|
1354
1850
|
reduceOnly: zod.z.boolean().optional()
|
|
1355
1851
|
})
|
|
1356
1852
|
)
|
|
1357
1853
|
});
|
|
1358
|
-
var mcpHyperliquidFetchMarketSnapshotInputSchema =
|
|
1359
|
-
chainId: zod.z.number().int().positive(),
|
|
1854
|
+
var mcpHyperliquidFetchMarketSnapshotInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1360
1855
|
coin: zod.z.string().min(1),
|
|
1361
1856
|
interval: hyperliquidOhlcvIntervalSchema.optional(),
|
|
1362
1857
|
dex: zod.z.string().optional(),
|
|
1363
|
-
/** Recent OHLCV bars to return (default 48, max 200). Live price is always current. */
|
|
1364
1858
|
candleLimit: zod.z.number().int().positive().max(200).optional()
|
|
1365
1859
|
});
|
|
1366
1860
|
var hyperliquidOhlcvCandleSchema = zod.z.object({
|
|
@@ -1391,21 +1885,16 @@ var mcpHyperliquidFetchMarketSnapshotOutputSchema = zod.z.object({
|
|
|
1391
1885
|
candles: zod.z.array(hyperliquidOhlcvCandleSchema),
|
|
1392
1886
|
candleCount: zod.z.number()
|
|
1393
1887
|
}),
|
|
1394
|
-
resolvedCoin: zod.z.string(),
|
|
1888
|
+
resolvedCoin: zod.z.string().describe("Canonical coin \u2014 alias for build coin"),
|
|
1395
1889
|
dex: zod.z.string().nullable()
|
|
1396
1890
|
});
|
|
1397
|
-
var mcpHyperliquidFetchOhlcvInputSchema =
|
|
1398
|
-
chainId: zod.z.number().int().positive(),
|
|
1891
|
+
var mcpHyperliquidFetchOhlcvInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1399
1892
|
coin: zod.z.string().min(1),
|
|
1400
1893
|
interval: hyperliquidOhlcvIntervalSchema.optional(),
|
|
1401
1894
|
dex: zod.z.string().optional(),
|
|
1402
|
-
/** Calendar-day lookback ending now (e.g. 7 = last week). Preferred for agent requests. */
|
|
1403
1895
|
lookbackDays: zod.z.number().positive().max(90).optional(),
|
|
1404
|
-
/** Hour lookback ending now. Alternative to lookbackDays. */
|
|
1405
1896
|
lookbackHours: zod.z.number().positive().max(90 * 24).optional(),
|
|
1406
|
-
/** Explicit range start (ms since epoch). Use with endTimeMs. */
|
|
1407
1897
|
startTimeMs: zod.z.number().int().positive().optional(),
|
|
1408
|
-
/** Explicit range end (ms since epoch). Defaults to now. */
|
|
1409
1898
|
endTimeMs: zod.z.number().int().positive().optional()
|
|
1410
1899
|
});
|
|
1411
1900
|
var mcpHyperliquidFetchOhlcvOutputSchema = zod.z.object({
|
|
@@ -1424,8 +1913,7 @@ var mcpHyperliquidFetchOhlcvOutputSchema = zod.z.object({
|
|
|
1424
1913
|
resolvedCoin: zod.z.string(),
|
|
1425
1914
|
dex: zod.z.string().nullable()
|
|
1426
1915
|
});
|
|
1427
|
-
var mcpHyperliquidFetchUsdClassBalancesInputSchema =
|
|
1428
|
-
chainId: zod.z.number().int().positive(),
|
|
1916
|
+
var mcpHyperliquidFetchUsdClassBalancesInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1429
1917
|
executorAddress: evmAddressSchema
|
|
1430
1918
|
});
|
|
1431
1919
|
var mcpHyperliquidFetchUsdClassBalancesOutputSchema = zod.z.object({
|
|
@@ -1434,34 +1922,31 @@ var mcpHyperliquidFetchUsdClassBalancesOutputSchema = zod.z.object({
|
|
|
1434
1922
|
perpWithdrawable: zod.z.string()
|
|
1435
1923
|
})
|
|
1436
1924
|
});
|
|
1437
|
-
var mcpHyperliquidFetchVaultsInputSchema =
|
|
1438
|
-
chainId: zod.z.number().int().positive(),
|
|
1925
|
+
var mcpHyperliquidFetchVaultsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1439
1926
|
executorAddress: evmAddressSchema.optional()
|
|
1440
1927
|
});
|
|
1441
1928
|
var mcpHyperliquidFetchVaultsOutputSchema = zod.z.object({
|
|
1442
1929
|
vaults: zod.z.array(
|
|
1443
1930
|
zod.z.object({
|
|
1444
1931
|
vaultAddress: zod.z.string(),
|
|
1445
|
-
name: zod.z.string(),
|
|
1932
|
+
name: zod.z.string().describe("Optional vaultName for purposeText on deposit"),
|
|
1446
1933
|
apr: zod.z.number().nullable(),
|
|
1447
1934
|
tvlUsd: zod.z.string().nullable()
|
|
1448
1935
|
})
|
|
1449
1936
|
)
|
|
1450
1937
|
});
|
|
1451
|
-
var mcpHyperliquidFetchUserVaultEquitiesInputSchema =
|
|
1452
|
-
chainId: zod.z.number().int().positive(),
|
|
1938
|
+
var mcpHyperliquidFetchUserVaultEquitiesInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1453
1939
|
executorAddress: evmAddressSchema
|
|
1454
1940
|
});
|
|
1455
1941
|
var mcpHyperliquidFetchUserVaultEquitiesOutputSchema = zod.z.object({
|
|
1456
1942
|
rows: zod.z.array(
|
|
1457
1943
|
zod.z.object({
|
|
1458
1944
|
vaultAddress: zod.z.string(),
|
|
1459
|
-
equity: zod.z.string()
|
|
1945
|
+
equity: zod.z.string().describe("Copy as usdHuman for build_vault_withdraw_multisign")
|
|
1460
1946
|
})
|
|
1461
1947
|
)
|
|
1462
1948
|
});
|
|
1463
|
-
var mcpHyperliquidFetchStakingSummaryInputSchema =
|
|
1464
|
-
chainId: zod.z.number().int().positive(),
|
|
1949
|
+
var mcpHyperliquidFetchStakingSummaryInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1465
1950
|
executorAddress: evmAddressSchema
|
|
1466
1951
|
});
|
|
1467
1952
|
var mcpHyperliquidFetchStakingSummaryOutputSchema = zod.z.object({
|
|
@@ -1470,53 +1955,68 @@ var mcpHyperliquidFetchStakingSummaryOutputSchema = zod.z.object({
|
|
|
1470
1955
|
undelegated: zod.z.string()
|
|
1471
1956
|
})
|
|
1472
1957
|
});
|
|
1473
|
-
var mcpHyperliquidFetchDelegationsInputSchema =
|
|
1474
|
-
chainId: zod.z.number().int().positive(),
|
|
1958
|
+
var mcpHyperliquidFetchDelegationsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1475
1959
|
executorAddress: evmAddressSchema
|
|
1476
1960
|
});
|
|
1477
1961
|
var mcpHyperliquidFetchDelegationsOutputSchema = zod.z.object({
|
|
1478
1962
|
delegations: zod.z.array(
|
|
1479
1963
|
zod.z.object({
|
|
1480
1964
|
validator: zod.z.string(),
|
|
1481
|
-
amount: zod.z.string()
|
|
1965
|
+
amount: zod.z.string().describe("Copy as hypeHuman for build_undelegate_multisign")
|
|
1482
1966
|
})
|
|
1483
1967
|
)
|
|
1484
1968
|
});
|
|
1485
|
-
var mcpHyperliquidLimitOrderInputSchema = mcpHyperliquidMultisignInput(
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1969
|
+
var mcpHyperliquidLimitOrderInputSchema = mcpHyperliquidMultisignInput(
|
|
1970
|
+
{
|
|
1971
|
+
coin: zod.z.string().min(1).describe("coin from fetch_markets (name) or search_markets"),
|
|
1972
|
+
isBuy: agentBooleanSchema(),
|
|
1973
|
+
limitPxHuman: zod.z.string().min(1).describe("limitPx or markPx from open_context"),
|
|
1974
|
+
szHuman: zod.z.string().min(1),
|
|
1975
|
+
marketKind: zod.z.enum(["perp", "spot"]).optional(),
|
|
1976
|
+
tif: hyperliquidTifSchema.optional(),
|
|
1977
|
+
dex: zod.z.string().optional()
|
|
1978
|
+
},
|
|
1979
|
+
preprocessHyperliquidLimitOrderInput
|
|
1980
|
+
);
|
|
1981
|
+
var mcpHyperliquidCloseInputSchema = mcpHyperliquidMultisignInput(
|
|
1982
|
+
{
|
|
1983
|
+
coin: zod.z.string().min(1),
|
|
1984
|
+
isLong: agentBooleanSchema(),
|
|
1985
|
+
limitPxHuman: zod.z.string().min(1),
|
|
1986
|
+
szHuman: zod.z.string().min(1).describe("size from fetch_positions"),
|
|
1987
|
+
dex: zod.z.string().optional(),
|
|
1988
|
+
tif: hyperliquidTifSchema.optional()
|
|
1989
|
+
},
|
|
1990
|
+
preprocessHyperliquidCloseInput
|
|
1991
|
+
);
|
|
1992
|
+
var mcpHyperliquidCancelInputSchema = mcpHyperliquidMultisignInput(
|
|
1993
|
+
{
|
|
1994
|
+
coin: zod.z.string().min(1),
|
|
1995
|
+
oid: zod.z.number().int().positive().describe("oid from fetch_open_orders"),
|
|
1996
|
+
marketKind: zod.z.enum(["perp", "spot"]).optional(),
|
|
1997
|
+
dex: zod.z.string().optional()
|
|
1998
|
+
},
|
|
1999
|
+
preprocessHyperliquidCoinInput
|
|
2000
|
+
);
|
|
1508
2001
|
var mcpHyperliquidUsdTransferInputSchema = mcpHyperliquidMultisignInput({
|
|
1509
2002
|
usdHuman: zod.z.string().min(1),
|
|
1510
|
-
toPerp:
|
|
1511
|
-
});
|
|
1512
|
-
var mcpHyperliquidVaultDepositInputSchema = mcpHyperliquidMultisignInput({
|
|
1513
|
-
vaultAddress: evmAddressSchema,
|
|
1514
|
-
usdHuman: zod.z.string().min(1)
|
|
1515
|
-
});
|
|
1516
|
-
var mcpHyperliquidVaultWithdrawInputSchema = mcpHyperliquidMultisignInput({
|
|
1517
|
-
vaultAddress: evmAddressSchema,
|
|
1518
|
-
usdHuman: zod.z.string().min(1)
|
|
2003
|
+
toPerp: agentBooleanSchema()
|
|
1519
2004
|
});
|
|
2005
|
+
var mcpHyperliquidVaultDepositInputSchema = mcpHyperliquidMultisignInput(
|
|
2006
|
+
{
|
|
2007
|
+
vaultAddress: evmAddressSchema.describe("vaultAddress from fetch_vaults"),
|
|
2008
|
+
usdHuman: zod.z.string().min(1),
|
|
2009
|
+
vaultName: zod.z.string().optional().describe("name from fetch_vaults row")
|
|
2010
|
+
},
|
|
2011
|
+
preprocessHyperliquidVaultDepositInput
|
|
2012
|
+
);
|
|
2013
|
+
var mcpHyperliquidVaultWithdrawInputSchema = mcpHyperliquidMultisignInput(
|
|
2014
|
+
{
|
|
2015
|
+
vaultAddress: evmAddressSchema,
|
|
2016
|
+
usdHuman: zod.z.string().min(1).describe("equity from fetch_user_vault_equities")
|
|
2017
|
+
},
|
|
2018
|
+
preprocessHyperliquidVaultWithdrawInput
|
|
2019
|
+
);
|
|
1520
2020
|
var mcpHyperliquidStakeInputSchema = mcpHyperliquidMultisignInput({
|
|
1521
2021
|
hypeHuman: zod.z.string().min(1)
|
|
1522
2022
|
});
|
|
@@ -1527,10 +2027,13 @@ var mcpHyperliquidDelegateInputSchema = mcpHyperliquidMultisignInput({
|
|
|
1527
2027
|
hypeHuman: zod.z.string().min(1),
|
|
1528
2028
|
validator: evmAddressSchema
|
|
1529
2029
|
});
|
|
1530
|
-
var mcpHyperliquidUndelegateInputSchema = mcpHyperliquidMultisignInput(
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
2030
|
+
var mcpHyperliquidUndelegateInputSchema = mcpHyperliquidMultisignInput(
|
|
2031
|
+
{
|
|
2032
|
+
hypeHuman: zod.z.string().min(1).describe("amount from fetch_delegations"),
|
|
2033
|
+
validator: evmAddressSchema
|
|
2034
|
+
},
|
|
2035
|
+
preprocessHyperliquidUndelegateInput
|
|
2036
|
+
);
|
|
1534
2037
|
|
|
1535
2038
|
// src/agent/mcpProtocolTools.ts
|
|
1536
2039
|
function defineProtocolMcpTool(def) {
|
|
@@ -1842,8 +2345,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1842
2345
|
prerequisites: [
|
|
1843
2346
|
"keyGenId",
|
|
1844
2347
|
"chainId",
|
|
1845
|
-
"vaultAddress from ctm_morpho_fetch_earn_vaults",
|
|
1846
|
-
"underlying",
|
|
2348
|
+
"vaultAddress + underlyingAddress from ctm_morpho_fetch_earn_vaults",
|
|
1847
2349
|
"amountHuman"
|
|
1848
2350
|
],
|
|
1849
2351
|
handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoVaultDepositBatch" },
|
|
@@ -2369,13 +2871,25 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
2369
2871
|
actionId: "gmx.fetch-positions",
|
|
2370
2872
|
protocolId: "gmx",
|
|
2371
2873
|
chainCategory: "evm",
|
|
2372
|
-
description: "Fetch open GMX perp positions
|
|
2874
|
+
description: "Fetch open GMX perp positions (symbol, direction, sizeUsd, collateralSymbol) for build_decrease. Read-only.",
|
|
2373
2875
|
prerequisites: ["chainId", "executorAddress (MPC ethereumaddress)"],
|
|
2374
2876
|
followUp: ["ctm_gmx_build_decrease_multisign"],
|
|
2375
2877
|
handler: { importPath: "protocols/evm/gmx", exportName: "gmxFetchPositionsForExecutor" },
|
|
2376
2878
|
inputZod: mcpGmxFetchPositionsInputSchema,
|
|
2377
2879
|
outputZod: mcpGmxFetchPositionsOutputSchema
|
|
2378
2880
|
}),
|
|
2881
|
+
defineMcpTool({
|
|
2882
|
+
name: "ctm_gmx_fetch_orders",
|
|
2883
|
+
actionId: "gmx.fetch-orders",
|
|
2884
|
+
protocolId: "gmx",
|
|
2885
|
+
chainCategory: "evm",
|
|
2886
|
+
description: "Fetch pending GMX orders (orderId) for build_cancel_multisign. Read-only.",
|
|
2887
|
+
prerequisites: ["chainId", "executorAddress"],
|
|
2888
|
+
followUp: ["ctm_gmx_build_cancel_multisign"],
|
|
2889
|
+
handler: { importPath: "protocols/evm/gmx", exportName: "gmxFetchOrdersSummary" },
|
|
2890
|
+
inputZod: mcpGmxFetchOrdersInputSchema,
|
|
2891
|
+
outputZod: mcpGmxFetchOrdersOutputSchema
|
|
2892
|
+
}),
|
|
2379
2893
|
defineMcpTool({
|
|
2380
2894
|
name: "ctm_gmx_fetch_market_prices",
|
|
2381
2895
|
actionId: "gmx.fetch-market-prices",
|
|
@@ -2580,6 +3094,34 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
2580
3094
|
inputZod: mcpHyperliquidFetchDelegationsInputSchema,
|
|
2581
3095
|
outputZod: mcpHyperliquidFetchDelegationsOutputSchema
|
|
2582
3096
|
}),
|
|
3097
|
+
defineMcpTool({
|
|
3098
|
+
name: "ctm_morpho_fetch_blue_markets",
|
|
3099
|
+
actionId: "morpho.fetch-blue-markets",
|
|
3100
|
+
protocolId: "morpho",
|
|
3101
|
+
chainCategory: "evm",
|
|
3102
|
+
description: "Morpho Blue borrow markets. Filter by collateral/loan asset; returns marketId and token addresses for blue multisign tools.",
|
|
3103
|
+
prerequisites: ["chainId"],
|
|
3104
|
+
followUp: [
|
|
3105
|
+
"ctm_morpho_build_blue_collateral_deposit_multisign",
|
|
3106
|
+
"ctm_morpho_build_blue_borrow_multisign",
|
|
3107
|
+
"ctm_morpho_build_blue_repay_multisign"
|
|
3108
|
+
],
|
|
3109
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchBlueMarketsSummary" },
|
|
3110
|
+
inputZod: mcpMorphoFetchBlueMarketsInputSchema,
|
|
3111
|
+
outputZod: mcpMorphoFetchBlueMarketsOutputSchema
|
|
3112
|
+
}),
|
|
3113
|
+
defineMcpTool({
|
|
3114
|
+
name: "ctm_euler_v2_fetch_lend_vaults",
|
|
3115
|
+
actionId: "euler-v2.fetch-lend-vaults",
|
|
3116
|
+
protocolId: "euler-v2",
|
|
3117
|
+
chainCategory: "evm",
|
|
3118
|
+
description: "Euler v2 isolated lend vaults for an underlying asset. Returns evaultAddress for build_isolated_lend_multisign.",
|
|
3119
|
+
prerequisites: ["chainId", "underlyingAddress from get_defi_protocol_supported_tokens"],
|
|
3120
|
+
followUp: ["ctm_euler_v2_build_isolated_lend_multisign"],
|
|
3121
|
+
handler: { importPath: "protocols/evm/euler-v2", exportName: "eulerV2FetchLendVaultsSummary" },
|
|
3122
|
+
inputZod: mcpEulerV2FetchLendVaultsInputSchema,
|
|
3123
|
+
outputZod: mcpEulerV2FetchLendVaultsOutputSchema
|
|
3124
|
+
}),
|
|
2583
3125
|
defineMcpTool({
|
|
2584
3126
|
name: "ctm_morpho_fetch_earn_vaults",
|
|
2585
3127
|
actionId: "morpho.fetch-earn-vaults",
|
|
@@ -3956,6 +4498,8 @@ exports.mcpEthenaStakeInputSchema = mcpEthenaStakeInputSchema;
|
|
|
3956
4498
|
exports.mcpEulerV2BorrowRepayInputSchema = mcpEulerV2BorrowRepayInputSchema;
|
|
3957
4499
|
exports.mcpEulerV2CollateralDepositInputSchema = mcpEulerV2CollateralDepositInputSchema;
|
|
3958
4500
|
exports.mcpEulerV2CollateralWithdrawInputSchema = mcpEulerV2CollateralWithdrawInputSchema;
|
|
4501
|
+
exports.mcpEulerV2FetchLendVaultsInputSchema = mcpEulerV2FetchLendVaultsInputSchema;
|
|
4502
|
+
exports.mcpEulerV2FetchLendVaultsOutputSchema = mcpEulerV2FetchLendVaultsOutputSchema;
|
|
3959
4503
|
exports.mcpEulerV2IsolatedBorrowInputSchema = mcpEulerV2IsolatedBorrowInputSchema;
|
|
3960
4504
|
exports.mcpEulerV2IsolatedLendInputSchema = mcpEulerV2IsolatedLendInputSchema;
|
|
3961
4505
|
exports.mcpEulerV2VaultWithdrawInputSchema = mcpEulerV2VaultWithdrawInputSchema;
|
|
@@ -3971,6 +4515,8 @@ exports.mcpGmxFetchMarketsInputSchema = mcpGmxFetchMarketsInputSchema;
|
|
|
3971
4515
|
exports.mcpGmxFetchMarketsOutputSchema = mcpGmxFetchMarketsOutputSchema;
|
|
3972
4516
|
exports.mcpGmxFetchOhlcvInputSchema = mcpGmxFetchOhlcvInputSchema;
|
|
3973
4517
|
exports.mcpGmxFetchOhlcvOutputSchema = mcpGmxFetchOhlcvOutputSchema;
|
|
4518
|
+
exports.mcpGmxFetchOrdersInputSchema = mcpGmxFetchOrdersInputSchema;
|
|
4519
|
+
exports.mcpGmxFetchOrdersOutputSchema = mcpGmxFetchOrdersOutputSchema;
|
|
3974
4520
|
exports.mcpGmxFetchPositionsInputSchema = mcpGmxFetchPositionsInputSchema;
|
|
3975
4521
|
exports.mcpGmxFetchPositionsOutputSchema = mcpGmxFetchPositionsOutputSchema;
|
|
3976
4522
|
exports.mcpGmxFetchStakingPowerInputSchema = mcpGmxFetchStakingPowerInputSchema;
|
|
@@ -4026,6 +4572,8 @@ exports.mcpMorphoBlueBorrowInputSchema = mcpMorphoBlueBorrowInputSchema;
|
|
|
4026
4572
|
exports.mcpMorphoBlueCollateralDepositInputSchema = mcpMorphoBlueCollateralDepositInputSchema;
|
|
4027
4573
|
exports.mcpMorphoBlueCollateralWithdrawInputSchema = mcpMorphoBlueCollateralWithdrawInputSchema;
|
|
4028
4574
|
exports.mcpMorphoBlueRepayInputSchema = mcpMorphoBlueRepayInputSchema;
|
|
4575
|
+
exports.mcpMorphoFetchBlueMarketsInputSchema = mcpMorphoFetchBlueMarketsInputSchema;
|
|
4576
|
+
exports.mcpMorphoFetchBlueMarketsOutputSchema = mcpMorphoFetchBlueMarketsOutputSchema;
|
|
4029
4577
|
exports.mcpMorphoFetchEarnVaultsInputSchema = mcpMorphoFetchEarnVaultsInputSchema;
|
|
4030
4578
|
exports.mcpMorphoFetchEarnVaultsOutputSchema = mcpMorphoFetchEarnVaultsOutputSchema;
|
|
4031
4579
|
exports.mcpMorphoMerklClaimInputSchema = mcpMorphoMerklClaimInputSchema;
|