Skip to main content
Glama

Simulate Leverage

simulate_leverage
Read-only

Preview opening a leveraged position — deterministic, read-only, no wallet needed. Returns the resulting leverage, effective LTV, leveraged collateral, expected leveraged APY, price impact, the auto-selected execution path, flash-loan size, and (if the flash loan exceeds direct market liquidity) the public-allocator reallocation fee. Numbers move with market prices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount of payToken in human units (e.g. '10000' for 10,000 USDC).
chainIdNoChain to target. Supported: 1, 4663. Default: 1.
leverageNoTarget leverage, e.g. 3. Provide this OR desiredLtv.
payTokenYesAddress of the token you pay in. May be the collateral (opened directly) or any other token (zapped: swapped to collateral first). Native ETH = the zero address 0x0000…0000.
slippageNoSwap slippage as a ratio (0.005 = 0.5%). Default 0.005, capped at 0.01.
desiredLtvNoTarget LTV percent, e.g. '66.67'. Provide this OR leverage.
strategyIdYesMorpho market id of the strategy (from list_strategies / get_strategy).

Schema Changelog

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

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description adds significant detail: deterministic, read-only, no wallet needed, and lists the outputs including edge cases (public-allocator reallocation fee). This provides excellent behavioral insight.

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 a single dense paragraph that covers purpose and output list efficiently. However, it could be more structured (e.g., bullet points) for easier scanning, but it is not overly verbose.

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

Completeness3/5

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

The description adequately explains return values but misses important contextual details like the mutual exclusivity of leverage and desiredLtv, and the default chainId. For a tool with 7 parameters and no output schema, some gaps remain.

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 coverage is 100%, and the description does not add new parameter-specific insights beyond the schema. It lists outputs but not parameter details, so baseline 3 is appropriate.

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 'Preview opening a leveraged position' and emphasizes it is deterministic and read-only. It distinguishes from sibling 'build_leverage_tx' by noting no wallet needed, indicating a simulation versus actual execution.

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 implies usage for previewing and notes it is read-only with no wallet needed. However, it does not explicitly state when to avoid this tool (e.g., when you want to execute) or mention alternatives like build_leverage_tx.

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.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: building opening vs. managing transactions, reading positions, getting prices, listing/querying strategies, and simulating. No overlapping or ambiguous functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores (e.g., build_leverage_tx, get_positions, list_strategies). The naming is predictable and uniform.

Tool Count5/5

7 tools is well-scoped for the domain of non-custodial leverage positions. It covers all essential operations without being too few or excessive.

Completeness5/5

The tool set covers the full lifecycle: preview (simulate), open (build_leverage_tx), manage (build_manage_tx with close/adjust actions), read positions, and explore strategies/prices. No obvious gaps for the intended purpose.