Skip to main content
Glama

write_account_add_liquidity

Idempotent

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), 10 (Optimism), or 4663 (Robinhood)
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

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses atomic single-transaction behavior, 30-second calldata time-sensitivity, retry-on-revert guidance, tenderly simulation response fields, expected_value_change units, and the before/after account value comparison. These are meaningful behavioral traits that annotations alone do not convey. No contradiction with the annotations found.

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

Conciseness5/5

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

The description is long but every sentence earns its place: purpose, exclusions, prerequisites, timing, failure handling, and response semantics are all covered. It is front-loaded with the core action and then layers operational detail in a logical order appropriate for a complex multi-step tool.

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 tool's complexity, the description covers all required operational context: when to use, prerequisites, account types, retry behavior, response fields, and value units. It even explains how to interpret expected_value_change and compare before/after account values, leaving no critical gap for an agent to call correctly.

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 the baseline is 3. The description adds cross-parameter meaning by explaining how 'deposits array' and 'use_account_assets=true' serve as alternative capital sources, that leverage applies only to margin accounts, and that omitting deposits means using only account collateral. This extra context lifts it above baseline.

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 opens with 'Multi-step flash-action' and enumerates exactly what the tool composes: deposit, collateral use, swap, LP mint, and optional borrow. It also explicitly distinguishes itself from write_account_deposit by warning 'Do NOT call write_account_deposit separately,' making its scope and role unmistakable.

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?

It gives a concrete usage workflow: check read_wallet_allowances first, approve via write_wallet_approve if needed, then call with either deposits, account collateral, or both. It also clarifies margin vs spot account behavior, points to read_guides('strategies') for workflows, and instructs to retry at least once on price-related reverts.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct resource and action, with clear read/write separation and detailed descriptions that specify exact use cases. Overlapping tools like write_account_deposit vs write_account_add_liquidity explicitly cross-reference to avoid misuse, and the asset-manager variants are clearly differentiated by staking/compounding/CowSwap behaviors.

Naming Consistency5/5

All tools follow a consistent read_* / write_* prefix with snake_case resource and action naming. Subgroup patterns are uniform (e.g., write_account_*, write_asset_manager_*), and the only outlier, dev_send, is intentionally marked as a dev-only exception.

Tool Count2/5

Forty tools is a very large surface, well above the typical 3-15 range for a well-scoped server. The seven separate write_asset_manager_* intent tools are highly granular and could likely be consolidated into a single parameterized automation tool, reducing cognitive load.

Completeness5/5

The tool set covers the full Arcadia lifecycle: account creation, collateral deposit/withdrawal, borrowing/repayment, LP add/remove/close, staking, automations, lending pool deposits/redeems, and comprehensive read operations. No obvious workflow dead ends exist, and all necessary supporting reads (prices, allowances, balances) are present.