Skip to main content
Glama

Prepare a withdrawal

build_withdraw
Read-onlyIdempotent

Returns the unsigned transaction to withdraw USDC that is not in active loans. Use "max" for everything available. as_musdc receives vault shares and skips the 0.25% withdrawal fee.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "amount_usdc": "<amount_usdc>",
      "lender": "<lender>"
    },
    "name": "build_withdraw"
  }
}

Input Schema

NameRequiredDescriptionDefault
lenderYesLender wallet that will sign
as_musdcNoReceive mUSDC vault shares instead of USDC, skipping the 0.25% withdrawal fee
amount_usdcYesUSDC to withdraw, or "max" for everything not in active loans

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / amount_usdc / description
      Added value: +"USDC to withdraw, or \"max\" for everything not in active loans"
    • addedInput schema / properties / as_musdc / description
      Added value: +"Receive mUSDC vault shares instead of USDC, skipping the 0.25% withdrawal fee"
    • addedInput schema / properties / lender / description
      Added value: +"Lender wallet that will sign"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the bar is lower. The description still adds real value beyond them by making explicit that the output is an unsigned transaction (i.e., it prepares, does not send) and by disclosing the 0.25% fee-bypass behavior of as_musdc. It does not mention any follow-up signing/submission step, which is a minor gap.

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?

Three short sentences, front-loaded with the core behavior, then two brief parameter hints. No filler or redundancy that distracts from the essential facts.

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?

No output schema exists, and the description correctly identifies the return value as an unsigned transaction, plus the fee trade-off of the share option. For a 3-parameter builder tool that is nearly complete; the main omission is guidance on the expected next step (simulate/sign/submit).

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 schema descriptions already explain lender, amount_usdc (including the "max" const), and as_musdc's fee skip. The description largely restates the schema's own wording rather than adding new meaning such as rounding, minimums, or what happens with partial-loan balances.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: returns the unsigned transaction to withdraw USDC not in active loans. That is precise enough to distinguish it from build_deposit/build_borrow siblings, though it does not explicitly name a sibling alternative.

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

Usage Guidelines3/5

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

It gives parameter-level guidance (use "max" for everything available, use as_musdc to skip the 0.25% fee) but says nothing about tool-level selection — e.g., when to use this versus simulate_transaction or get_lender_position first. Usage is implied by the purpose rather than stated.

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.