Skip to Content
MCP Tools

MCP Tools

This page documents the available Model Context Protocol (MCP) tools in the L1 AI Server.

Market Tools

Tools for fetching market data.

get_token_list

  • Description: Get a list of top tokens for a specific chain, sorted by market cap.
  • Inputs:
    • chainId (number): The chain ID (default: 8453)
    • limit (number): Number of tokens to return (default: 10)
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

[ { "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "chainId": 8453, "decimals": 6, "logoURI": "https://assets.coingecko.com/coins/images/6319/thumb/USD_Coin_icon.png", "name": "USD Coin", "symbol": "USDC", "price": 1, "marketCap": 250, "price24hChange": 0.001 } ]

get_morpho_vaults

  • Description: Get a list of top Morpho vaults for a specific chain, sorted by TVL.
  • Inputs:
    • chainId (number): The chain ID (default: 8453)
    • limit (number): Number of vaults to return (default: 10)
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

[ { "name": "Steakhouse USDC", "symbol": "stUSDC", "address": "0xBEEF01735c132Bec6bd3e45895D61F3664739336", "tvl": 100000000, "apy": 0.045, "asset": { "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "symbol": "USDC", "name": "USD Coin", "decimals": 6, "chainId": 8453 } } ]

resolve_token

  • Description: Resolve a token symbol or name to its address on a specific chain.
  • Inputs:
    • chainId (number): The chain ID (e.g. 8453)
    • token (string): The token symbol or name (e.g. ‘USDC’, ‘AERO’)
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

get_aave_tokens

  • Description: Get a list of Aave V3 supplied tokens/markets for a specific chain.
  • Inputs:
    • chainId (number): The chain ID (default: 8453)
    • limit (number): Number of tokens to return (default: 10)
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

[ { "address": "0x...", "symbol": "aOptUSDC", "name": "Aave Optimism USDC", "decimals": 6, "chainId": 10, "underlying": { "address": "0x7F5c764cBc14f9669B88837ca1490cCa17c31607", "symbol": "USDC", "name": "USD Coin", "decimals": 6, "chainId": 10 }, "version": "v3", "isAaveSupplied": true, "apy": { "weekly": 0.032 } } ]

get_erc4626_vaults

  • Description: Get a list of ERC4626 vaults for a specific chain.
  • Inputs:
    • chainId (number): The chain ID (default: 8453)
    • limit (number): Number of vaults to return (default: 10)
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

[ { "address": "0x...", "name": "Yearn USDC", "symbol": "yUSDC", "chainId": 1, "decimals": 6, "tokenIn": { "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "symbol": "USDC", "name": "USD Coin", "decimals": 6, "chainId": 1 }, "tokenOut": { "address": "0x...", "symbol": "yUSDC", "name": "Yearn USDC", "decimals": 6, "chainId": 1 }, "isErc4626": true, "apy": { "weekly": 0.045 } } ]

Strategy Tools

Tools for advisor strategy management.

get_strategy_permissions

  • Description: Fetch permissions and positions for a specific strategy.
  • Inputs:
    • chainId (number): The chain ID (e.g., 8453 for Base)
    • strategyExternalId (string): The external ID of the strategy (e.g. ‘strategy_123’)
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

{ "strategyExternalId": "strat_12345", "strategyId": 101, "versionId": 202, "permissions": [ { "strategyId": "101", "name": "Swap Permission", "type": "contract_interaction", "address": "0xDef1C0ded9bec7F1a1670819833240f027b25EfF", "details": {} } ], "positions": [ { "token": { "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "symbol": "USDC", "name": "USD Coin", "decimals": 6, "chainId": 8453 }, "type": "token_position", "percentage": 100 } ] }

add_positions_to_strategy

  • Description: Add new authorized positions to a strategy.
  • Inputs:
    • chainId (number): The chain ID
    • strategyExternalId (string): The external ID of the strategy
    • positions (array): List of positions to add
      • address (string): Address, symbol, or name of the token or contract
      • name (string): Human readable name
      • type (string): Position type (e.g. ‘token’, ‘contract’, ‘morpho’, ‘aerodrome’)
      • details (object, optional): Additional details JSON
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

{ "success": true, "message": "Added 1 positions to strategy strat_12345", "addedPositions": [ { "address": "0x4200000000000000000000000000000000000006", "name": "Wrapped Ether", "type": "token", "details": {} } ] }

get_managed_strategies

  • Description: Fetch strategies managed by the authenticated advisor.
  • Inputs:
    • chainId (number): The chain ID
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

[ { "id": "strat_12345", "creator": { "address": "0x1234567890123456789012345678901234567890", "name": "Alpha Advisor", "logo": "https://example.com/logo.png" }, "createdAt": "2024-01-15T12:00:00.000Z", "chainId": 8453, "tokenPositions": [ { "token": { "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "symbol": "USDC", "name": "USD Coin", "decimals": 6, "chainId": 8453 }, "type": "token_position", "percentage": 50, "initialPercentage": 50 }, { "token": { "address": "0x4200000000000000000000000000000000000006", "symbol": "WETH", "name": "Wrapped Ether", "decimals": 18, "chainId": 8453 }, "type": "token_position", "percentage": 50, "initialPercentage": 50 } ], "extraPermissions": [], "name": "Blue Chip Growth", "description": "A balanced strategy associated with top tier assets.", "ticker": "BCG", "strategyMinimum": 1000, "managementFee": 0.02, "rebalancingMethod": "manual", "maximumDrift": 5, "lastRebalance": "2024-02-01T10:00:00.000Z", "isPrivate": false, "subscriberCount": 15, "files": [], "performance": { "daily": 0.5, "weekly": 2.1, "monthly": 5.4, "total": 12.5, "apy": 15.2, "maxDrawdown": -2.5 }, "strategyVersionId": "202", "creatorName": "Alpha Advisor", "creatorLogo": "https://example.com/logo.png", "accessList": [], "productTypeIds": [], "subscriptionDate": "2024-01-15T12:00:00.000Z", "networth": 150000, "investorType": "retail", "assetsUnderManagementTotal": 2000000 } ]

get_strategy_subscribers

  • Description: Fetch all wallet addresses subscribed to a strategy given its external ID.
  • Inputs:
    • strategyExternalId (string): The external ID of the strategy
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

{ "strategyExternalId": "strat_12345", "strategyId": 101, "subscribers": [ "0xabcdef123456...", "0x789012345678..." ], "count": 2 }

create_strategy_recommendation

  • Description: Create a new strategy recommendation for a client.
  • Inputs:
    • clientAddress (string): The client’s wallet address
    • strategyExternalId (string): The external ID of the strategy
    • owners (array): List of signer wallet addresses for the Safe
    • threshold (number): Signature threshold for the Safe
    • advisorFee (number): Advisor fee percentage
    • amount (string): Recommended deposit amount in USDC
    • chainId (number, optional): The chain ID
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

{ "success": true, "message": "Recommendation created successfully" }

get_advisor_clients

  • Description: Get a list of clients associated with the advisor. Returns an object with a ‘clients’ array.
  • Inputs:
  • Outputs:
    • clients (array): List of client addresses
      • address (string)
      • name (string, optional)
      • email (string, optional)

Sample Output:

{ "success": true, "clients": [ { "address": "0xabcdef123456...", "name": "Jane Doe", "email": "jane@example.com" } ] }

get_client_wallets

  • Description: Get a list of wallet addresses for a specific client.
  • Inputs:
    • clientAddress (string): The client’s wallet address
    • chainId (number, optional)
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

{ "success": true, "wallets": [ "0xabcdef123456...", "0xwallet2..." ] }

update_strategy_positions

  • Description: Update the positions of a strategy. This includes adding new positions, removing old ones, and updating percentages. The total of the target percentages must be 100.
  • Inputs:
    • chainId (number): The chain ID
    • strategyExternalId (string): The external ID of the strategy
    • positions (array): List of new positions
      • address (string): Address of the token or contract
      • name (string): Human readable name
      • percentage (number): Target percentage (0-100)
      • type (string): Position type (e.g. ‘token’, ‘contract’, ‘morpho’, ‘aerodrome’)
      • chainId (number): Chain ID for this specific position
      • details (object, optional): Additional details JSON
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

{ "success": true, "data": { "id": "strat_12345", "name": "Blue Chip Growth", "chainId": 8453, "tokenPositions": [ { "token": { "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "symbol": "USDC", "name": "USD Coin", "decimals": 6, "chainId": 8453 }, "type": "token_position", "percentage": 50, "initialPercentage": 50 } ], "strategyVersionId": "203" } }

get_client_strategy_subscriptions

  • Description: Get active strategy subscriptions for a specific client of the advisor.
  • Inputs:
    • clientAddress (string): The client’s wallet address
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

{ "success": true, "clientAddress": "0xabcdef...", "count": 1, "subscriptions": [ { "strategyExternalId": "strat_12345", "strategyName": "Blue Chip Growth", "chainId": 8453, "userAddress": "0xabcdef...", "accountAddress": "0xsafeAddress...", "createdAt": "2024-01-20T10:00:00.000Z" } ] }

get_strategy_subscription_positions

  • Description: Get the current positions and balances for a client’s strategy subscription.
  • Inputs:
    • subscriptionAddress (string): The strategy subscription address (e.g. Safe/Sub account address).
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

{ "success": true, "subscriptionAddress": "0xsafeAddress...", "strategyName": "Blue Chip Growth", "positions": [ { "name": "USD Coin", "symbol": "USDC", "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "balance": "1000000000", "usdBalance": 1000, "price": 1, "apy": 0, "percentage": 50, "details": { "chainId": 8453, "decimals": 6 } }, { "name": "Wrapped Ether", "symbol": "WETH", "address": "0x4200000000000000000000000000000000000006", "balance": "500000000000000000", "usdBalance": 1000, "price": 2000, "apy": 0, "percentage": 50, "details": { "chainId": 8453, "decimals": 18 } } ] }

create_workflow_strategy

  • Description: Create a new strategy with an automated workflow (DCA, Rebalance, Triggers). Uses AI to draft the workflow from the user’s prompt.
  • Inputs:
    • prompt (string): The user’s description of the workflow (e.g., ‘DCA 100 USDC to AERO every day’).
    • chainId (number, optional): Chain ID (default 8453)
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

Successfully created workflow strategy! Strategy ID: strat_999 Workflow: { "trigger": { "type": "time", "interval": "daily" }, "actions": [{ "type": "swap", "tokenIn": "USDC", "amount": "100" }] }

generate_workflow_dsl

  • Description: Generate a DSL workflow JSON from a natural language prompt. Useful for previewing what ‘create_workflow_strategy’ would build.
  • Inputs:
    • prompt (string): The user’s description of the workflow (e.g., ‘DCA 100 USDC to AERO every day’).
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

{ "trigger": { "type": "time", "interval": "daily" }, "actions": [ { "type": "swap", "tokenIn": "USDC", "tokenOut": "AERO", "amount": "100" } ] }

create_portfolio_strategy

  • Description: Create a new ‘Model Portfolio’ strategy with specific token allocations, but NO automated triggers/workflow.
  • Inputs:
    • name (string): Name of the portfolio
    • chainId (number, optional)
    • positions (array): List of token allocations
      • token (string): Token symbol or address
      • percentage (number): Percentage allocation (0-100)
    • description (string, optional)
  • Outputs: JSON string (structure varies based on success/error).

Sample Output:

Created Portfolio Strategy: Growth Fund (ID: strat_888)