Skip to main content
Glama

prepare_compound_borrow

Build unsigned Compound V3 borrow transactions for DeFi lending. Specify wallet, market, and amount to generate a preview for Ledger signing without token approvals.

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?

With no annotations provided, the description carries the full burden of behavioral disclosure and does so effectively. It explains key behavioral traits: that it builds an unsigned transaction (not executing it), returns a handle + preview for Ledger signing, requires sufficient collateral, resolves base token on-chain, and doesn't need approval. It could be improved by mentioning potential failure modes or rate limits, but covers the essential safety and operational aspects well for a transaction preparation tool.

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?

The description is perfectly structured and concise. Every sentence earns its place: first sentence states the core purpose, second explains the Compound V3 mechanism, third covers prerequisites and references sibling tool, fourth describes the return value and signing process. No wasted words, front-loaded with the most important information, and efficiently covers multiple aspects of tool behavior.

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?

For a transaction preparation tool with no annotations and no output schema, the description does an excellent job covering the essential context. It explains what the tool does, when to use it, prerequisites, return format (handle + preview), and signing requirements. The only minor gap is that without an output schema, it doesn't detail the exact structure of the returned handle or preview, but given the tool's purpose, the description provides sufficient completeness for an agent to use it correctly.

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 some semantic context beyond the schema: it explains that 'market' is a 'Comet market address (e.g. cUSDCv3)' and that 'the base token is resolved on-chain from the Comet market.' It also clarifies that 'amount' is 'Human-readable decimal amount' (though this is also in the schema). However, it doesn't add significant parameter insights beyond what's already well-documented in the schema.

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 the specific action ('Build an unsigned Compound V3 borrow transaction') and distinguishes it from siblings like 'prepare_compound_supply' or 'prepare_compound_repay' by specifying it's for borrowing. It also explains the Compound V3 mechanism of 'withdraw(baseToken)' drawn beyond supplied balance, which differentiates it from other borrowing tools like 'prepare_aave_borrow' or 'prepare_morpho_borrow'.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance: 'Requires the wallet to have already supplied enough collateral in that market; `get_compound_positions` shows the current collateral mix.' It also specifies when-not-to-use alternatives: 'no approval step is needed (borrowing doesn't pull tokens from the wallet)' which distinguishes it from token transfer operations. The mention of sibling tool 'get_compound_positions' for prerequisite checking is excellent contextual guidance.

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/vaultpilot-mcp'

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