Skip to main content
Glama

Scrooge

Build a swap to sign

build_swap
Read-only

The transactions that make a swap from wallet, for that wallet to sign and send in order: an approval of exactly the amount sold when ScroogeRouter needs one, then the swap, which pays the output to the same wallet. The swap is simulated from the wallet where it can be. Nothing is signed or sent by this tool. Send within a couple of minutes, or build again.

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": {
      "token_in": "<token_in>",
      "token_out": "<token_out>",
      "amount": "<amount>",
      "wallet": "<wallet>"
    },
    "name": "build_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesHow much of token_in to sell, as a decimal number such as 0.5
walletYesThe address that will sign and send the transactions, and receive the output
token_inYesWhat is sold: a symbol (ETH, USDG, SCROOGE, NVDA…) or a contract address on Robinhood Chain
token_outYesWhat is bought: a symbol (ETH, USDG, SCROOGE, NVDA…) or a contract address on Robinhood Chain
slippage_bpsNoOptional: the most the price may move before the swap reverts, in basis points (default 50 = 0.5%, at most 300 = 3% unless allow_high_slippage)
allow_high_slippageNoOptional: allow slippage up to 1000 basis points (10%); leave it off unless a thin market needs it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint/openWorldHint), it discloses the exact shape of the result: an approval of exactly the amount sold, only when ScroogeRouter requires one, followed by the swap paying output to the same wallet. It also states that the swap is simulated where possible, that nothing is signed or sent, and that the payload goes stale within a couple of minutes — all behavior an agent cannot read off the schema.

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?

Four short sentences, front-loaded with what is returned and the ordering of the transactions, then the simulation note, the no-signing disclaimer and the freshness window. The opening clause is slightly dense ('The transactions that make a swap from `wallet`') but no sentence is wasted.

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?

With six parameters, no output schema and only two annotations, the description carries the burden of explaining the return value, and it does so via the ordered approval/swap framing plus the staleness window. It is silent on failure behavior — e.g., what is returned if the simulation fails or if slippage limits cannot be met — which is the main remaining gap for a build-and-sign tool.

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 schema already documents amount, wallet, token_in/token_out, slippage_bps and allow_high_slippage in detail; baseline 3 applies. The description adds one useful nuance — the approval is for exactly the amount sold rather than an unlimited allowance — but does not otherwise extend parameter meaning.

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 and resource ('The transactions that make a swap from `wallet`') and specifies the returned artifact as an ordered list: approval then swap. It does not name the sibling it is paired with (get_swap_quote for pricing) nor explicitly contrast itself with it, so an agent must infer the split from the sibling list rather than from the text.

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?

It gives a real usage constraint — 'Send within a couple of minutes, or build again' — and clarifies that nothing is signed or sent, which implies this is the pre-execution step. However, it never says when to call this instead of get_swap_quote or when a quote is a prerequisite, so the when-vs-alternative 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.

Resources