Skip to main content
Glama

prepare_compound_borrow

DestructiveIdempotent

Prepare an unsigned Compound V3 borrow transaction as a withdraw from supplied collateral. Returns a preview for Ledger signing without an approval step.

Instructions

Build an unsigned Compound V3 borrow transaction. Compound V3 encodes a borrow as withdraw(baseToken) drawn beyond the wallet's supplied balance — the base token is resolved on-chain from the Comet market so you only pass the market address and amount. Requires the wallet to have already supplied enough collateral in that market; get_compound_positions shows the current collateral mix. Returns a handle + human-readable preview for the user to sign on Ledger; no approval step is needed (borrowing doesn't pull tokens from the wallet).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYes0x-prefixed EVM wallet address (40 hex chars) that will execute this action.
chainNoEVM chain the Comet market lives on. Defaults to ethereum.ethereum
marketYesComet market address (e.g. cUSDCv3). The base token is resolved on-chain.
amountYesHuman-readable decimal amount of the market base token, NOT raw wei/base units. Example: "100" for 100 USDC.
Behavior4/5

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

Discloses that the tool only builds an unsigned transaction (not executes), returns a handle and preview for Ledger signing, and explains why no approval is needed. Annotations (destructiveHint=true, idempotentHint=true) are consistent; description adds value beyond annotations by clarifying the signing flow and token resolution behavior.

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?

Four sentences, front-loads purpose and key details. No wasted words, though the explanation of the borrow mechanism could be slightly more streamlined.

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, description explains the return value (handle + readable preview). Also covers prerequisite (collateral), no-approval aspect, and market resolution. Lacks explicit details about the handle or preview format, but sufficient for a prepare tool.

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%. Description adds meaning by clarifying that 'amount' is human-readable (not raw wei) and that 'market' resolves the base token on-chain. This supplement is helpful beyond the schema alone.

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?

Description clearly states it builds an unsigned Compound V3 borrow transaction, explaining the mechanism (withdraw beyond supplied balance) and that the base token is resolved on-chain. This distinguishes it from sibling tools like prepare_compound_supply, prepare_compound_repay, and prepare_compound_withdraw.

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?

Provides clear context: requires sufficient collateral in the market, points to get_compound_positions to check collateral, and notes no approval step is needed. It implicitly differentiates from similar tools (supply, repay, withdraw) but does not explicitly list alternatives or state when not to use.

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/szhygulin/recon-crypto-mcp'

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