Skip to main content
Glama

Prepare enable/disable collateral

prepare_set_collateral
Read-only

Build an unsigned transaction to change whether a supplied asset is used as collateral (v3 or v4). On v4 'enable' sets the state; on v3 it toggles the current state, and a toggle that would invert a stated 'enable' is refused. The wallet must already hold a supply in that reserve: this sets a flag on it, nothing moves. Disabling can leave a position liquidatable, so it is simulated first: a health factor under 1 after is refused, just above 1 carries a warning to relay, and a build whose simulation could not run says so under 'warnings'. Enabling needs no check. Non-custodial.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenNov3 only: underlying token address.
enableNov4: true to enable, false to disable (default true). v3 toggles the current state; send it on v3 as the intended end state, and a toggle that would produce the opposite is refused.
marketNov3 only: market pool address.
senderYesSender wallet address, 0x-prefixed (40 hex chars).
chainIdNov3 only: chain id (positive integer).
reserveNov4 only: the opaque reserveId, copied verbatim from a get_markets row or a get_position_items item in this session (e.g. 'MTo6MHg5NGU3...Ojo1') - it cannot be constructed or recalled, so fetch one before the first call rather than after a refusal. The 'spokeId' from get_user_positions is NOT this: it is the same encoding one segment short, names the spoke rather than a reserve inside it, and is rejected. A token symbol such as 'USDC' is rejected too.
versionYesProtocol version (v3 or v4; required, no 'all' for actions).

TDQS

A4.4/5.0
Behavior5/5

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

The description discloses several important behaviors beyond the readOnlyHint: v4 'enable' sets state while v3 toggles, a toggle inverting the stated state is refused, disabling triggers simulation with different outcomes, and simulation failure is surfaced under 'warnings.' It also states 'nothing moves' and 'Non-custodial,' making the read-only nature concrete. No contradiction with annotations.

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?

Every sentence in the description carries a distinct fact: primary action, v3/v4 behavior, precondition, simulation logic, warning outcomes, and custody. It is dense but not bloated, and the most important framing ('Build an unsigned transaction') is front-loaded. A reader gets a full mental model without skimming irrelevant detail.

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

Completeness4/5

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

With no output schema, the description carries the burden of explaining what the tool returns. It references a 'warnings' field and implies an unsigned transaction payload, covering the most important output details. It could be more explicit about the overall response shape and the fact that the returned transaction must be submitted elsewhere, but the given context is sufficient for correct invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds high-level context about the flow, but each parameter's semantics is already thoroughly documented in the input schema (e.g., enable_version behavior, reserveId caveats). The description doesn't add parameter-level meaning that the schema lacks.

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 a specific action and resource: 'Build an unsigned transaction to change whether a supplied asset is used as collateral (v3 or v4).' It further clarifies scope by distinguishing v3 toggle semantics from v4 set semantics and by noting 'nothing moves,' which separates it from executing or liquidation tools. This is far more specific than the title alone.

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 gives clear situational guidance: a wallet must already hold supply in the reserve, v3 and v4 behave differently, and disabling is simulated with health-factor thresholds. It does not explicitly name alternative tools or state when not to use it, so it lands just below the 'explicit exclusions' bar.

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.1/5.0
Disambiguation4/5

The tool set is organized into clear read/prepare/action families, and cross-references like get_user_positions vs get_user_summary or get_markets vs get_reserve_details keep purposes distinct. A couple of generic names—prepare_action vs prepare_order, preview_action vs prepare_action—could cause misselection, but the descriptions explicitly separate them.

Naming Consistency4/5

Names overwhelmingly follow a verb_noun snake_case pattern: get_* for reads, prepare_* for transaction builders, plus cancel_order and submit_signed_order. The pattern is consistent overall, though a few generic exceptions like get_started, get_aave_guide, and preview_action break the strict resource-noun convention.

Tool Count2/5

With 40 tools, the set is well past the 25+ threshold and feels heavy even though the domain is broad. Most tools are distinct and justified, but an agent must navigate a very large list, and the server could reasonably be split into protocol, governance, and swap/order surfaces.

Completeness4/5

The surface covers v3/v4 reads, positions, health factors, simulations, transaction building, collateral, eMode, liquidation, rewards, sGHO, swaps/orders, and governance proposal reads, with clear sequencing between preview, prepare, and submit. Minor gaps exist—governance has no voting transaction and stkGHO balance/cooldown state is not readable—but they do not block the core Aave workflows.

Resources