Skip to main content
Glama

Check risk before a Solana swap

swap_preflight
Read-onlyIdempotent

Pass the token mint, side (buy or sell), amount in quote units for buy or token units for sell, and optional quote mint (SOL by default). Checks route price impact, historical pool sandwich share, Token-2022 transfer fees, hooks, permanent delegate, mint and freeze authority. Returns a verdict with reasons and an assessment (ok, unverified, high_slippage_risk, high_sandwich_risk, blocked). Does not sign, execute or guarantee a swap; missing history remains unverified. Price: 0.005 USDC per call, included in subscriptions.

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": {
      "mint": "<mint>",
      "amount": "<amount>",
      "side": "<side>"
    },
    "name": "swap_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
mintYesToken to buy or sell
sideYes
quoteNoQuote mint, SOL by default
amountYesAmount in quote units for buy, in token units for sell

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the readOnly/openWorld/idempotent annotations, it discloses the cost model (0.005 USDC per call, included in subscriptions), the failure semantics (missing history stays 'unverified'), and the exact verdict vocabulary. It also clarifies it is advisory only and performs no signing or execution.

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?

The first sentence front-loads the required inputs and each subsequent clause maps to a distinct check or output element, so little is wasted. It is dense but scannable; the parameter-recap clause is slightly procedural given the schema already covers it.

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?

With no output schema, the description carries return-value burden and does so by enumerating both the verdict reasons and the five assessment values. It also sets expectations about unverified history and the advisory-only nature, leaving nothing essential an agent needs before calling.

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 75%, so most parameters are already documented structurally. The description restates the amount unit convention (quote units for buy, token units for sell) and the SOL default for quote, but adds no new detail such as amount precision, minimums, or how quote affects the verdict — roughly baseline for a well-covered schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Checks') and a concrete resource set (route price impact, pool sandwich share, Token-2022 fees, hooks, authorities) scoped to a Solana swap preflight. It is clearly distinct in substance from siblings like token_deep_check or pool_health, though it never explicitly names an alternative to route the agent.

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 gives a clear usage context — call before swapping, with the exact inputs to supply — and states a boundary ('Does not sign, execute or guarantee a swap'). It does not name a sibling to use instead when the question is token quality rather than swap risk, so alternatives are left implicit.

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