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
lenderYes
as_musdcNo
amount_usdcYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 readOnly, idempotent, non-destructive, so the safety profile is covered; the description still adds real behavior: it returns an unsigned transaction rather than executing, only non-collateralized USDC is withdrawable, and a 0.25% fee applies unless as_musdc is set. It doesn't say what the returned payload contains or what an agent should do with it next (sign/submit), which keeps it below a 5.

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, no filler, with the return-value statement front-loaded and the two usage notes following. Every clause carries information an agent needs.

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-builder with no output schema, the description correctly discloses the return type (unsigned transaction) and the key constraint on withdrawable funds. It lacks the follow-up step (signing/submitting) and chain or fee-token details, which are minor but not negligible for a 3-parameter build tool.

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 0%, so the description must carry parameter meaning. It explains amount_usdc's 'max' sentinel and the semantics and fee consequence of as_musdc well, but says nothing about lender beyond the address pattern, leaving the agent to guess whose address it is.

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 and resource: 'Returns the unsigned transaction to withdraw USDC.' It also scopes the resource ('not in active loans'), which tells an agent exactly what is being withdrawn. It doesn't explicitly contrast with build_* siblings or simulate_transaction, so it stops short of full sibling differentiation.

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?

Gives concrete in-call guidance ('Use "max" for everything available') and a decision hint for the as_musdc tradeoff (skips the 0.25% fee). It never says when to prefer this over simulate_transaction or other build_* tools, and gives no prerequisites such as needing an existing position or connected wallet.

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.