Skip to main content
Glama
arcadia-finance

mcp-server

write.account.add_liquidity

Idempotent

Add liquidity to a concentrated LP position atomically: combine wallet deposits, account collateral, swaps, LP minting, and optional leverage in one transaction.

Instructions

Multi-step flash-action: atomically combines [deposit from wallet] + [use account collateral] + [swap to optimal ratio] + [mint LP] + [borrow if leveraged] in ONE transaction. Do NOT call write.account.deposit separately. Capital sources: wallet tokens (deposits array), existing account collateral (use_account_assets=true), or both. Check allowances first (read.wallet.allowances), then approve if needed (write.wallet.approve). Supports depositing multiple tokens and minting multiple LP positions in one tx. Works with both margin accounts (can leverage) and spot accounts (no leverage). For workflows, call read.guides('strategies'). The returned calldata is time-sensitive — sign and broadcast within 30 seconds. If the transaction reverts due to price movement, rebuild and sign again immediately (retry at least once before giving up). Response includes tenderly_sim_url and tenderly_sim_status for pre-broadcast validation. expected_value_change is in raw units of the account's numeraire token (6 decimals for USDC, 18 for WETH). Negative = cost to open, positive = value gained. Compare before.total_account_value and after.total_account_value for the full picture.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chain_idNoChain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
depositsNoWallet tokens to deposit. Approve each token first (write.wallet.approve). Omit to use only account collateral.
leverageNo0 = no borrow, 2 = 2x leverage. Margin accounts only.
slippageNoBasis points, 100 = 1%
positionsYesLP positions to mint. For a single position, pass one entry.
wallet_addressYesWallet address of the account owner
account_addressYesArcadia account address
use_account_assetsNoIf true, use ALL existing account collateral for LP minting. Fetched automatically.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNo
beforeNo
descriptionNo
transactionYes
tenderly_sim_urlNo
tenderly_sim_statusNo
expected_value_changeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.3
    • changedOutput schema / properties / tenderly_sim_status / enum
      Previous value: -[
      -  "true",
      -  "false",
      -  "unavailable"
      -]New value: +[
      +  "success",
      +  "failure",
      +  "unavailable"
      +]
  2. Addedv0.4.2
  3. Removedv0.3.4
  4. Addedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses time-sensitive calldata (30 sec), retry logic on revert, tenderly simulation URLs, expected_value_change format, and full context on capital sources. Adds significant behavioral context beyond annotations like idempotentHint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is detailed but efficiently structured with a clear lead and inline explanations. Some redundancy could be trimmed, but overall it earns its length by covering essential operational details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (8 parameters, multi-step, time-sensitive, leverage options), the description covers all necessary aspects: capital sources, return fields, error handling, retry, and validation. With an output schema present, it explains return fields like tenderly_sim_url and expected_value_change comprehensively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline 3. Description adds value by explaining capital sources (deposits vs account assets), tick optionality, and leverage semantics. Provides context like 'Omit to use only account collateral' and 'Margin accounts only' for leverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it is a 'multi-step flash-action' that atomically combines deposit, swap, mint LP, and borrow in one transaction. It explicitly distinguishes from siblings by saying 'Do NOT call write.account.deposit separately.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use guidance: capital sources, allowances, approval steps. Advises to call read.guides('strategies') for workflows. Clearly states when not to use alternatives like deposit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.