Skip to main content
Glama

Quote a trade

quote
Read-only

Exact quote from the contract's own math: the amount out, price, fees per hop and price impact. Give amount (what is sold) or buy_amount (what should come out; the quote finds the input). Pass account to check its balances, trustlines and whether the trade would push it over the Event Horizon.

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": {
      "sell": "<sell>",
      "buy": "<buy>"
    },
    "name": "quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
buyYesHITZ, XLM, USDC (any case), or a token contract address (C…).
sellYesHITZ, XLM, USDC (any case), or a token contract address (C…).
amountNoAmount of sell to trade, e.g. "100".
accountNoOptional: the account that would trade.
buy_amountNoInstead of amount: how much of buy to receive.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, and the description adds real context: the quote is derived from the contract's own math (authoritative, not estimated) and passing account additionally runs balance/trustline/Event Horizon checks. It stops short of describing failure modes when a trade would exceed the horizon.

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?

Three front-loaded sentences, each carrying information; the returned fields come first and the parameter guidance after. The opening 'Exact quote from the contract's own math' is slightly awkward phrasing but not wasteful.

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?

No output schema exists, and the description compensates by enumerating the return fields (amount out, price, per-hop fees, price impact). For a 5-parameter read tool this covers what an agent needs before calling, with only the error/threshold behavior left implicit.

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?

With 100% schema coverage the baseline is 3, and the description earns more by clarifying the semantics the schema cannot: amount is 'what is sold', buy_amount is 'what should come out' with input solved backwards, and account triggers a solvency/trustline check rather than merely identifying the trader.

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?

States a specific verb and resource plus the returned data: 'Exact quote from the contract's own math: the amount out, price, fees per hop and price impact.' An agent immediately knows this is a read-only pricing call, distinct in kind from build_swap, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Explains the two invocation modes ('Give amount ... or buy_amount ... the quote finds the input') and why to pass account, which is genuine usage guidance. It never says when to prefer this over build_swap or get_account, so selection guidance is only implied.

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.