Skip to main content
Glama

near_swap

Read-onlyIdempotent

Swap any asset through NEAR Intents — get a deposit address — An executable NEAR Intents swap: a binding quote with a deposit address. Send amountIn of the origin asset there before the deadline; the output goes to recipient, or it is refunded to refundTo. Funds never pass through us. Any asset NEAR Intents routes, across chains. Buying a NEAR token runs near-token-safety first and refuses a STOP token unless force=1. Track with near-swap-status. Required inputs: from, to, amount, recipient, refundTo. 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
refundToYesYour address on the origin chain (refunds)
slippageNoSlippage in bps (optional, default 100)
recipientYesReceiving address on the destination chain
depositTypeNoINTENTS to pay from a NEAR Intents balance (optional)

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. Changed1 schema field changed
    • addedInput schema / properties / depositType
      Added value: +{
      +  "description": "INTENTS to pay from a NEAR Intents balance (optional)",
      +  "type": "string"
      +}
  2. Added

TDQS

A3.5/5.0
Behavior1/5

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

The description contradicts the readOnlyHint annotation by describing an executable swap that sends funds and executes a trade. This is a direct contradiction, so the score is 1 per the rules. It does add other behavioral details like pricing and 'funds never pass through us', but the contradiction overrides.

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 dense and front-loaded with the primary purpose. It covers execution flow, safety, pricing, and tracking in a structured manner. While somewhat long, each sentence contributes value, though it could be tightened.

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?

The description explains the execution flow, deposit address, refund mechanism, safety check for NEAR tokens, pricing, and how to track status. However, it fails to clarify the 'force' parameter it references, and the deposit address mechanics are not fully detailed. With an output schema present and annotations covering safety, this is largely complete.

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 100%, so the baseline is 3. The description lists required inputs but adds little semantic depth. It mentions a 'force' parameter that is not in the schema, which is confusing and detracts from clarity. Overall, it does not meaningfully enhance parameter understanding.

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 it performs an executable NEAR Intents swap, specifies the deposit address mechanism, and differentiates from near-swap-status by mentioning tracking. It also references near-token-safety for NEAR purchases, distinguishing it from that sibling.

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 explicitly directs users to near-swap-status for tracking, implying that is the alternative for status. It mentions a conditional for STOP tokens (force=1) but doesn't discuss near_swap_quote or other alternatives. This provides some guidance but not a comprehensive comparison.

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