Skip to main content
Glama

Phlece

Prepare a trade

phlece_prepare_trade
Read-only

Builds the transactions to buy or sell a Phlece coin from a given wallet (with payWith, a buy paid in another Arc coin, routed in one transaction): any one-time approvals first, then the swap with a minimum output. Checks the balance and, when no approval is needed, simulates the swap on Arc. Returns unsigned transactions in order; the caller's wallet signs and sends them. Nothing is sent by this tool.

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": {
      "wallet": "<wallet>",
      "coin": "<coin>",
      "side": "<side>",
      "amount": "<amount>"
    },
    "name": "phlece_prepare_trade"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYesThe coin's 0x address or its ticker (for example PHLECE or $PHLECE).
sideYes
amountYesFor a buy, the coin to spend (the paired coin, or payWith); for a sell, the coins to sell. A decimal string.
walletYesThe wallet that will sign and send, as a 0x address.
payWithNoBuys only: pay with a coin other than the pair, in one transaction. EURC, GBPA, cirBTC, WETH or XAUM, another Phlece coin with the same pair (ticker or address), or any token address with a Uniswap v3 pool against the pair. The route goes through the pool that gives the most coins. Omit to pay with the pair.
slippageBpsNoDefault 250 (2.5%).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so safety is largely covered. The description adds genuinely new behavior: it checks the balance, simulates the swap on Arc when no approval is needed, and returns unsigned transactions in order with any one-time approvals placed first. That is meaningful context beyond the annotations.

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 operative points – build transactions, ordering, simulation, nothing is sent – are front-loaded in a tight paragraph. The parenthetical about payWith is slightly convoluted 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?

With no output schema, the description carries the burden of explaining return values, and it does so: unsigned transactions in order for the caller to sign. For a six-parameter, multi-step prep tool it is nearly complete, though it does not mention failure modes (e.g., insufficient balance) or whether the returned list is empty when an approval exists.

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 description coverage is 83%, so the schema already documents coin, wallet, payWith, and slippageBps well. The description reinforces the payWith routing (best-pool selection, same-pair alternative) and the minimum-output guarantee, but adds little about amount or slippageBps beyond what the schema already states. Baseline 3 is appropriate.

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 opens with a specific verb and resource ('Builds the transactions to buy or sell a Phlece coin from a given wallet') and explains the payWith routing variant. It does not name any sibling such as phlece_quote_trade, so the agent must infer the boundary between quoting and preparing.

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 conveys the relevant workflow context ('the caller's wallet signs and sends them. Nothing is sent by this tool'), which implies this is the step before signing. However, it never states when to prefer phlece_quote_trade or phlece_compare_providers first, and gives no prerequisites or exclusions.

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