Skip to main content
Glama

prepare_solana_swap

Idempotent

Prepare an unsigned Solana swap with authoritative RPC simulation and return it for user signing; FarmDash stays zero-custody. Use a stable idempotency key for safe retries.

Instructions

[Capability: available; tier: scout_capacity_signature_gated; API: /api/agents/solana-swap; authority: /api/v1/agent/status] 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. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, idempotentHint=true and openWorldHint=true; the description goes well beyond them with the zero-custody guarantee, authoritative RPC simulation, the terminal READY_FOR_USER_SIGNATURE state, and a precise 410 vs 409 error taxonomy. This is exactly the mutation-safety context annotations cannot express.

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?

Front-loaded with the core action and the safety boundary, then the error semantics. The bracketed capability/tier/API/authority preamble is routing metadata rather than tool behavior and slightly dilutes the opening, but the remaining prose is dense and earns its place.

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, nested-object tool with no output schema, the description covers the return artifact (an unsigned VersionedTransaction), the terminal state, and the two non-obvious failure classes. It does not touch the optional executionTrialProof or continuationId semantics, leaving those entirely to the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 89%, so the baseline is 3, but the description adds lifecycle meaning the schema cannot: the idempotency key expires and must be rotated on 410, while a 409 means the same key must not be reused at all. That is genuine semantic value beyond the field description.

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') and pins the exact stopping point (READY_FOR_USER_SIGNATURE). That boundary makes it distinguishable from the confirm/execute siblings without inspecting their schemas.

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?

Explains the custody model (customer wallet signs and broadcasts) and gives concrete retry rules: 410 requires a NEW idempotency key, 409 must be reconciled rather than resubmitted. It stops short of naming the confirm/execute sibling that follows this preparation, so the routing is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools