Skip to main content
Glama

SoFinance

prepare_transaction

Prepare an unsigned, fully-simulated transaction for adding liquidity. Returns base64-encoded transaction for signing, HMAC permit, and summary. The server NEVER holds private keys. Transaction must be signed by the user/agent wallet. Includes: full simulation, 1232-byte limit check, Jupiter swap + Raydium increase_liquidity_v2, short-lived permit. Failure modes: same as quote_add_liquidity, plus simulation failure, size limit, blockhash expiry. After signing, use submit_signed_transaction.

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": {
      "wallet": "<wallet>",
      "positionMint": "<positionMint>",
      "inputMint": "<inputMint>",
      "inputKind": "<inputKind>",
      "amount": "<amount>"
    },
    "name": "prepare_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount in token units
walletYesWallet public key
inputKindYesAsset kind: 'native' or 'token'
inputMintYesInput asset mint address
positionMintYesPosition NFT mint address
resaleFloorBpsNoResale floor in basis points (9500-10000, default 9900)
slippageToleranceBpsNoAdd-liquidity price tolerance in basis points (0-500, multiple of 10, default 100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations, it discloses that the transaction is unsigned and fully simulated, that the server never holds private keys, that signing must happen in the user/agent wallet, that a short-lived HMAC permit is returned, and it enumerates concrete failure modes (simulation failure, 1232-byte size limit, blockhash expiry). The annotations already cover the mutation and open-world profile, and this adds substantially. Minor gap: it does not say how long the permit lasts or how to re-run after expiry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is dense and front-loaded: the core action leads, the output artifacts follow, and the failure modes come last. Some phrasing in the 'Includes:' list is dense shorthand, but no sentence is redundant.

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?

With 7 parameters, no output schema, and a multi-step signing flow, the description supplies the return artifacts (base64 transaction, HMAC permit, summary), the simulation and size-limit guarantees, and the failure modes. That is nearly complete. The remaining gap is the handoff mechanics, i.e. how the permit is passed to submit_signed_transaction and its lifetime.

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%, so every parameter, including slippageToleranceBps and resaleFloorBps ranges and defaults, is already documented in the schema. The description adds no parameter-level meaning such as unit conventions or how 'amount' interacts with inputKind. The baseline of 3 is appropriate when the schema does the work.

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 names a specific verb and resource: 'Prepare an unsigned, fully-simulated transaction for adding liquidity.' It also names the underlying protocol actions (Jupiter swap + Raydium increase_liquidity_v2), which distinguishes it from siblings like prepare_withdraw, prepare_open_position, and prepare_compound_transaction.

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?

It clearly states the follow-up path ('After signing, use submit_signed_transaction') and says failure modes match quote_add_liquidity, which hints at the quote comes first. It never explicitly says 'run quote_add_liquidity first' or when to prefer a different prepare tool, so the guidance is clear but not exhaustive.

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.

Resources