Skip to main content
Glama

FarmDash Agent OS

prepare_solana_swap

Idempotent

Prepare an unsigned Solana swap VersionedTransaction with authoritative RPC simulation. Zero custody: FarmDash returns the unsigned transaction and stops at READY_FOR_USER_SIGNATURE; the customer wallet signs and broadcasts it. Requires a stable idempotencyKey. An expired preparation returns non-retryable 410 and needs a NEW idempotency key; a 409 submitted/ambiguous outcome is not safe to resubmit and must be reconciled first.

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>",
      "inputMint": "<inputMint>",
      "outputMint": "<outputMint>",
      "amount": "<amount>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "prepare_solana_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesInput amount in the input mint base units.
walletYesBase58 Solana public key of the paying/owning wallet. Must not be an EVM address.
inputMintYesBase58 SPL mint address being sold.
outputMintYesBase58 SPL mint address being bought.
slippageBpsNo
minAmountOutNoOptional explicit minimum output in base units; overrides the slippage-derived floor when supplied.
continuationIdNoOptional server-issued execution continuation to bind this preparation to.
idempotencyKeyYesStable replay key for this exact preparation. Reuse it only for a retryable failure of the SAME request.
executionTrialProofNoLocally signed commercial owner challenge; no transaction or delegation authority.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and openWorldHint=true; the description goes well beyond them by disclosing the custody model (FarmDash never signs or broadcasts), the terminal state READY_FOR_USER_SIGNATURE, the mandatory idempotency key, and the distinct 410 vs 409 failure semantics. That is exactly the operational context an agent needs before invoking a stateful preparation step.

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?

Three sentences, front-loaded with what the tool returns and where it stops, then the custody model, then failure handling. Dense but nearly every clause earns its place; the only near-redundancy is restating the idempotencyKey requirement that the schema already marks as required.

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 9-parameter mutation-adjacent preparation tool with no output schema, the description covers the transaction shape, terminal status, and error contract well. It does not say what else the response carries (expiry, simulation output, quote details) or how continuationId affects a subsequent prepare call, which leaves a modest gap.

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 89%, so the schema already carries most parameter meaning, and the baseline of 3 applies. The description reinforces only idempotencyKey ('Requires a stable idempotencyKey') and says nothing about wallet, minAmountOut, continuationId, or executionTrialProof beyond what the schema states.

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?

States a specific verb and resource ('Prepare an unsigned Solana swap VersionedTransaction') plus the exact stopping point ('stops at READY_FOR_USER_SIGNATURE'), which implicitly separates it from confirm/execute siblings. The zero-custody framing makes the tool's boundary unmistakable without opening either schema.

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?

Gives concrete when-to-retry and when-not-to-retry rules: an expired preparation returns non-retryable 410 and needs a NEW idempotency key, while a 409 submitted/ambiguous outcome must be reconciled rather than resubmitted. It does not name the sibling to call after signing (e.g., confirm_solana_swap) or whether a quote should precede preparation, so alternative-routing guidance is incomplete.

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