Skip to main content
Glama

write.asset_manager.rebalancer

Read-onlyIdempotent

Configure automated rebalancing for concentrated liquidity positions. Claim fees and staking rewards, reposition to current price, and compound returns with customizable triggers and cooldowns.

Instructions

Encode args for the rebalancer automation. When the LP position goes out of range, Arcadia's bot repositions it centered on the current price. All pending fees and staking rewards are claimed and compounded into the new position. Strategy config: 'default' (all params at defaults) uses when_out_of_range — rebalances exactly when price exits range. 'custom' (any param differs) uses time_and_price_based_triggers — adds configurable trigger offsets, cooldowns, and token composition. Returns { asset_managers, statuses, datas } — pass to write.account.set_asset_managers to build the unsigned tx. Combinable: merge arrays from multiple intent tools to configure several automations in one tx. trigger_lower_ratio and trigger_upper_ratio are independent — asymmetric configs are valid (e.g. trigger_lower_ratio=-50000, trigger_upper_ratio=0 means: trigger 5% of the tick range before the lower boundary is hit, but only trigger exactly at the upper boundary). Ratios represent tick distance, not price: a ratio of 50000 shifts the trigger by 5% of (tick_upper − tick_lower) ticks, which is not the same as 5% of price.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dex_protocolYesDEX protocol of the LP position — used to resolve the correct asset manager address.
enabledNoTrue to enable, false to disable
compound_leftoversNoWhat to reinvest after rebalance (default "all" = compound both)all
optimal_token0_ratioNoTarget token0 composition scaled by 1e6: 500000 = 50%, 750000 = 75%
trigger_lower_ratioNoOffset from tick_lower, as a fraction of the position's tick range, scaled by 1e6. trigger_tick_lower = tick_lower - tick_range * ratio. 0 = trigger at the boundary. Positive (e.g. 50000 = 5% of tick range): trigger tick is outside the position — price must travel further beyond the range before rebalance fires (delayed). Negative (e.g. -50000 = -5%): trigger tick is inside the position — rebalance fires while price is still within range (preemptive).
trigger_upper_ratioNoOffset from tick_upper, as a fraction of the position's tick range, scaled by 1e6. trigger_tick_upper = tick_upper + tick_range * ratio. 0 = trigger at the boundary. Positive (e.g. 50000 = 5% of tick range): trigger tick is outside the position — price must travel further beyond the range before rebalance fires (delayed). Negative (e.g. -50000 = -5%): trigger tick is inside the position — rebalance fires while price is still within range (preemptive).
min_rebalance_timeNoMin seconds between rebalances (default 3600 = 1 hour)
max_rebalance_timeNoMax seconds before forced rebalance (default 1e12 = effectively disabled)
strategy_hookNoStrategy hook address. Defaults to minimal hook. Only override for custom hooks.
chain_idNoChain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNo
asset_managersYes
statusesYes
datasYes
strategy_nameNo
Behavior4/5

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

Annotations already provide readOnlyHint, destructiveHint, and idempotentHint, and the description adds significant context: it explains the rebalancer's behavior (claims fees, compounds), the return format, and how the output is used in a subsequent write tool. No contradiction with annotations is present, and the description enhances understanding beyond the structured fields.

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 front-loaded with the core purpose ('Encode args') and is well-structured, but it includes a paragraph on automation behavior that may be slightly verbose for a tool solely focused on encoding. It earns its place by providing context, but could be more concise.

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 (10 parameters, 1 required, output schema exists), the description is thorough. It explains the return values and how to use them with another tool, covers strategy configs, and includes detailed parameter logic (e.g., asymmetric triggers). It leaves no critical gaps for an agent to understand invocation.

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 description coverage is 100%, so baseline is 3. The description adds value by explaining trigger ratio parameters in detail (tick distance vs. price, asymmetric configs) and strategy config options. It does not elaborate on all parameters, but the additional depth for key parameters justifies a score 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 clearly states 'Encode args for the rebalancer automation', which is a specific verb+resource. It further elaborates on the automation behavior and strategy configs, providing a thorough understanding of what the tool accomplishes. It distinguishes itself from sibling tools by focusing on rebalancing, though it does not explicitly differentiate from other automation encoders.

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

Usage Guidelines4/5

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

The description provides guidance on when to use different strategies ('default' for when_out_of_range, 'custom' for time_and_price_based_triggers) and mentions combinability with other intent tools. However, it does not explicitly state when to prefer this tool over other asset manager tools like compounder.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/arcadia-finance/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server