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).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description is fully consistent with them. It goes well beyond annotations by disclosing important behavioral nuances: v4 sets state while v3 toggles, disabling is simulated with health-factor-based refusals and warnings, simulation failures are surfaced under 'warnings', and nothing actually moves. This gives the agent a reliable mental model of side effects and failure modes.

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 dense but well-organized, leading with the core purpose then layering version nuances, prerequisites, simulation behavior, and warnings. It is longer than average, but nearly every sentence carries needed semantic weight. A small amount of restructuring could improve scannability, but the content earns its place.

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?

For a tool with no output schema, the description still covers the essential behavioral contract: what the transaction does, what must be true before calling, how different versions behave, how failures are signaled, and that this is non-custodial. Together with the fully described parameters, an agent has enough context to invoke the tool correctly and interpret likely outcomes.

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

Parameters5/5

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

Schema coverage is 100%, so the schema already documents all parameters, but the description adds substantial meaning beyond it. For example, the 'reserve' parameter is explained as opaque, non-constructible, fetchable only from get_markets or get_position_items, with explicit warnings about 'spokeId' and token symbols being rejected. The 'enable' and 'version' parameters also get version-specific behavioral clarification that the schema alone does not fully convey.

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 verb and resource: 'Build an unsigned transaction to change whether a supplied asset is used as collateral (v3 or v4).' It clearly distinguishes the tool from generic siblings like prepare_action by naming the exact action, the version-specific semantics, and the requirement that the wallet holds a supply. An agent can tell what this tool does without inspecting the schema.

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 strong context for when to use the tool: it explains the v3 vs v4 differences, the prerequisite that the wallet must already hold supply, and that disabling is simulated first. It does not explicitly name alternative tools or say 'use this instead of X,' but the version-specific guidance and the wallet-holding precondition make the intended usage clear.

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
Disambiguation4/5

The tool set splits into clean families (get_ reads, prepare_ transaction builders, direct state-changing verbs) and the descriptions aggressively cross-reference each other to draw explicit boundaries, e.g. get_user_positions vs get_user_summary vs get_user_activity. A few clusters could still prompt misselection: the four get_user_* tools share a naming shape, get_started and get_aave_guide both claim the 'when nothing fits' role, and get_hub_assets vs get_markets both return rate data at different aggregation levels.

Naming Consistency5/5

Every tool follows a verb_noun pattern with a highly predictable convention: get_ for all read operations, prepare_ for every unsigned-transaction builder, and direct imperatives (cancel_order, submit_signed_order, preview_action) for the rest. search_governance_proposals is the only read not named get_, but search_ is semantically apt for full-text lookup. The get_/ prepare_ split is instantly legible across all 40 tools.

Tool Count2/5

40 tools is well past the 25+ 'too many' threshold, and even Aave's genuinely wide scope (v3 and v4 lending, governance, sGHO, rewards, intent orders) does not fully justify the surface. get_started and get_aave_guide overlap as guidance entry points, the three history tools and the get_user_* cluster add near-duplicate reads, and the paragraph-long descriptions compound the agent's context burden. Most tools earn their place individually, but the set would be stronger consolidated to roughly 25-30 tools.

Completeness4/5

Core workflows are fully covered with no dead ends: preview_action simulation, prepare_action and prepare_set_* builders, get_transaction_processed polling, plus the complete order lifecycle (quote, prepare, submit, status, cancel) and sGHO/rewards coverage. Minor gaps remain: governance is read-only with no way to cast a vote, the server cannot read a stkGHO balance or cooldown state for the migration flow, and there is no stkAAVE staking surface. These are workaroundable, and the v3/v4 dual-version handling is unusually thorough.

Resources