Skip to main content
Glama

near_swap_quote

Read-onlyIdempotent

What does swapping A for B through NEAR Intents give back? — An indicative quote for swapping any asset NEAR Intents routes — NEAR, USDC, USDT, BTC, SOL and more, across chains. Name assets as a symbol (USDC = on NEAR, USDC@base for another chain), a NEAR token account, or a 1Click asset id. Returns amount out, minimum out, USD in and out, the rate, the cost in percent lost to fees and price impact, and the expected time. Nothing is reserved or paid. Required inputs: from, to, amount. Priced $0.01 per call over x402 on Base; send a prepaid x-credit-token header for unlimited calls, or get 1 free call/day per tool. No wallet or API key required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesAsset you want
fromYesAsset you pay with
amountYesAmount of the paying asset

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoThe result payload. Shape is service-specific; every field is documented in the tool description.
serviceNoThe service id that answered.
checkedAtNoISO-8601 timestamp of when the underlying reads were taken.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and idempotentHint, but the description adds valuable context: it clarifies that nothing is reserved or paid, lists the exact return fields, and discloses per-call pricing with header requirements for unlimited calls and a free daily quota. This goes well beyond the annotations without contradiction.

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 description is comprehensive but slightly lengthy. It is well-structured: starts with the core purpose, then asset naming, return fields, and pricing. Every sentence adds value, but it could be tightened without losing information. A 4 reflects its efficiency with minor redundancy.

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?

The description covers all critical aspects an agent needs: the exact inputs, asset naming conventions, output details, cost structure, and the fact that no reservation or payment occurs. Combined with an output schema and annotations, nothing is missing for correct invocation.

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

Parameters5/5

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

While the schema has 100% coverage with basic descriptions, the description adds crucial semantic detail: it explains that 'USDC' means on NEAR while 'USDC@base' specifies a different chain, and that assets can be a NEAR token account or 1Click asset ID. This significantly enriches parameter understanding beyond the schema.

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 clearly states the tool's function: generating an indicative quote for swapping assets via NEAR Intents. It specifies the verb ('swap'), the resource ('assets NEAR Intents routes'), and the output (amount out, minimum out, etc.), distinguishing it from execution tools and siblings like swap_route by noting 'Nothing is reserved or paid'.

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?

The description gives explicit input requirements (from, to, amount) and explains how to name assets (symbol, NEAR token account, 1Click ID, with @chain suffix), which is essential for correct usage. It also mentions pricing and free tier, but does not explicitly contrast with alternative quote tools or state when not to use it, so a 4 is warranted.

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