Skip to main content
Glama

jupiter_lend_withdraw

Create an unsigned transaction to withdraw tokens from Jupiter Lend Earn, encoded in base64.

Instructions

Create a withdraw transaction for Jupiter Lend Earn. Returns a base64-encoded unsigned transaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetYesToken mint address to withdraw
signerYesWallet address
amountYesAmount to withdraw in base units

Implementation Reference

  • The actual HTTP request handler for the Jupiter Lend Earn withdraw endpoint. Sends a POST to /lend/v1/earn/withdraw with asset, signer, and amount params.
    async lendWithdraw(params: { asset: string; signer: string; amount: string }) {
      return this.request("/lend/v1/earn/withdraw", {
        method: "POST",
        body: params,
      });
    }
  • Zod schema defining the input parameters for jupiter_lend_withdraw: asset (token mint address), signer (wallet address), amount (in base units).
    {
      asset: z.string().describe("Token mint address to withdraw"),
      signer: z.string().describe("Wallet address"),
      amount: z.string().describe("Amount to withdraw in base units"),
    },
  • The tool handler function that delegates to client.lendWithdraw() and returns the result as a formatted JSON string.
    async (args) => {
      const result = await client.lendWithdraw(args);
      return JSON.stringify(result, null, 2);
    },
  • Registration of the jupiter_lend_withdraw tool with its name, description, Zod schema, and handler via the register function.
      register(
        "jupiter_lend_withdraw",
        "Create a withdraw transaction for Jupiter Lend Earn. Returns a base64-encoded unsigned transaction.",
        {
          asset: z.string().describe("Token mint address to withdraw"),
          signer: z.string().describe("Wallet address"),
          amount: z.string().describe("Amount to withdraw in base units"),
        },
        async (args) => {
          const result = await client.lendWithdraw(args);
          return JSON.stringify(result, null, 2);
        },
      );
    }
  • The generic HTTP request helper used by lendWithdraw to call the Jupiter API base URL.
    private async request<T>(path: string, opts: RequestOptions = {}): Promise<T> {
Behavior3/5

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

No annotations are given, so the description carries full burden. It discloses that the tool creates an unsigned transaction and returns it base64-encoded, which is useful behavioral info. However, it does not cover side effects, permissions, or other traits, leaving gaps.

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 a single, concise sentence with no unnecessary words. It efficiently conveys the essential purpose and output format.

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 simple tool with three parameters and no output schema, the description covers the core action and return type. It lacks details on the broader withdraw process (e.g., pool interaction, signing), but matches the complexity level adequately.

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% with each parameter having a description. The tool description adds no further parameter details beyond what the schema provides, so baseline of 3 is appropriate.

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 it creates a withdraw transaction for Jupiter Lend Earn and returns a base64-encoded unsigned transaction. The verb 'withdraw' effectively distinguishes it from sibling tool 'jupiter_lend_deposit' (deposit).

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives, nor are there any prerequisites or exclusion conditions mentioned. The description only implies usage for withdrawals but lacks explicit context.

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/ExpertVagabond/jupiter-mcp'

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