Skip to main content
Glama

prepare_compound_borrow

DestructiveIdempotent

Build an unsigned Compound V3 borrow transaction by specifying market address and amount. Requires sufficient collateral; returns a preview for Ledger signing.

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.
Behavior5/5

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

Even with annotations (destructiveHint, idempotentHint), the description adds context: unsigned transaction (not broadcast), Ledger signing, how borrow is encoded, no approval step. No contradictions 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?

Packs essential info in a front-loaded paragraph without redundancy. Every sentence adds value: operation, mechanics, precondition, certification, output type.

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?

Covers all necessary context: output is handle+preview, refers to sibling tool for collateral check, explains no approval. Could be slightly more detailed on output format but sufficient.

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?

100% schema coverage with descriptions. The description adds clarity: amount is human-readable (not raw), base token resolved on-chain, market address usage, chain defaults. Example provided.

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 'Build an unsigned Compound V3 borrow transaction' with specific verb (prepare/borrow) and resource. It explains the mechanics (withdraw beyond balance) and distinguishes from sibling tools like prepare_compound_supply.

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 precondition ('requires wallet to have already supplied enough collateral'), references sibling tool (get_compound_positions) for checking, and states no approval needed. Lacks explicit when-not-to-use but is clear on requirements.

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