Skip to main content
Glama

search_swap_tokens

Read-onlyIdempotent

Search the tokens agent_wallet_swap can buy, by symbol, name, or mint address; an empty query returns USDC, SOL and USDT. Returns up to 20 tokens with mint (native for SOL), symbol, name, decimals, usdPrice, and verified, verified first. An unverified token is often a copy of a real one with the same symbol: confirm the mint with your human before buying it.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_swap_tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoSymbol, name, or mint address. Empty for the common tokens.

Output Schema

NameRequiredDescriptionDefault
tokensNoUp to 20 matches, verified tokens first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "tokens": {
      +    "description": "Up to 20 matches, verified tokens first.",
      +    "items": {
      +      "description": "One token `agentWalletSwap` can buy, from the public token list.",
      +      "properties": {
      +        "decimals": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "iconUrl": {
      +          "description": "The token's icon. Absent when the list has none.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "mint": {
      +          "description": "The mint address to pass as `toMint`, or `native` for SOL.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "description": "The token's name from the token list.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "symbol": {
      +          "description": "The token's symbol. Several tokens can carry the same symbol, because an impersonation copies the symbol of the token it imitates, so confirm the mint.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "usdPrice": {
      +          "description": "Price of one whole unit in USD. Absent for an unpriced token.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "verified": {
      +          "description": "Listed as verified by the token list. An unverified token is often an impersonation of a real one with the same symbol, so confirm the mint with your human before buying it.",
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "type": [
      +      "array",
      +      "null"
      +    ]
      +  }
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/openWorld annotations, the description discloses result capping (up to 20 tokens), sort ordering (verified first), the fields returned, and the default result set for an empty query. It also flags the substantive risk that unverified tokens are often impersonations and prescribes human confirmation, which is behavioral context annotations cannot carry.

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?

Three tightly packed sentences, front-loaded with purpose and scope, then returns, then the safety caveat in the position where it matters most. No filler and nothing restated from the title alone.

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?

For a one-parameter read tool with annotations and an output schema already present, this covers everything an agent needs: what it searches, what comes back, ordering, limits, and the pre-purchase verification step. Nothing material is missing.

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 100%, so the baseline is 3, but the description adds meaning by naming the exact tokens returned for an empty query (USDC, SOL, USDT) where the schema only says "the common tokens". It does not add matching syntax or partial-match behavior for symbol versus mint address, so it is not a full 5.

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 ("Search the tokens") and scopes it to what agent_wallet_swap can buy, which cleanly separates it from sibling searches like search_merchants or search_gift_cards. An agent knows exactly what this tool returns 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 Guidelines4/5

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

Usage context is clear: this is the discovery step for the swap flow, and the closing sentence tells the agent to confirm the mint with a human before buying an unverified token. There is no explicit statement of when not to use it or a named alternate token-search path, which keeps it just short of a 5.

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