Skip to main content
Glama

agent_wallet_swap

Swap one asset in your managed agent wallet for any other token on Solana, into USDC by default. Use it to make spendable a token the wallet holds but cannot pay with, such as USDT or SOL someone sent it (get_agent_wallet lists them under tokens), or to buy a token you need. Find a token's mint with search_swap_tokens and check the price with agent_wallet_swap_quote first. No SOL is needed for fees; the rate includes a provider fee of up to 0.25% plus the pool fee. Waits up to 45 seconds and returns status succeeded with outputAmount and txHash, or pending if it is still settling. The money stays in your wallet, so swaps do not count against spend limits.

Input Schema

NameRequiredDescriptionDefault
amountYesDecimal amount of from_mint to sell, in its own units (e.g. 10).
to_mintNoThe asset to buy. Omit for USDC.
from_mintYesThe asset to sell: an SPL token mint address, or native for SOL.
slippage_bpsNoMaximum slippage from the quote in basis points (default 50, max 300). A worse fill fails and nothing is swapped.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that no SOL is needed for fees, that a provider fee up to 0.25% plus pool fee is included, the 45-second wait, and the succeeded/pending status outcomes with outputAmount and txHash. It also clarifies that funds remain in the wallet and swaps do not count against spend limits, which is valuable operational context.

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 front-loaded with the core action, then adds usage context, prerequisites, fee behavior, timing, return values, and spend-limit implications. Each sentence contributes useful information without repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, the output schema, and the annotations, the description is complete enough for an agent to call it correctly. It covers purpose, workflow, fees, timing, return statuses, and the important wallet/spend-limit behavior.

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?

The schema already documents all four parameters at 100% coverage, including amount units, native SOL handling, USDC default, and slippage limits. The description reinforces the USDC default and the token-discovery workflow, but does not add parameter-level detail beyond the schema, so the baseline 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 opens with a specific verb and resource: swap one asset in the managed agent wallet for any other Solana token, defaulting into USDC. It clearly distinguishes this from the quote and token-search siblings, so an agent can identify the tool without opening the schema.

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

Usage Guidelines5/5

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

It gives explicit when-to-use cases: making a held token spendable or buying a needed token. It also names prerequisite and alternative tools: get_agent_wallet to see held tokens, search_swap_tokens to find mints, and agent_wallet_swap_quote to check price first.

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