Skip to main content
Glama

expected_surplus

Read-only

Estimate how much better Ophis quotes than the open market for a sell: fetches the Ophis orderbook sell-quote and a public all-DEX aggregator (KyberSwap) quote for the same input, and returns beatBps (+ = Ophis returns more of the buy token). Use before build_order to show the expected edge. The reference can reflect thin or manipulated liquidity, so treat beatBps as advisory, not a sole execution signal. Sell-side (exact-in) only. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesThe trading account address (quotes are account-aware).
chainIdYesEVM chain id (use a chainId from list_chains `tradeable`).
buyTokenYesBuy token address (0x...).
sellTokenYesSell token address (0x...).
sellAmountYesExact sell amount in atoms (uint256 decimal string).

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and openWorldHint. Description adds value by explaining it fetches two quotes, compares them, returns beatBps, and warns about liquidity. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, front-loaded with main purpose. Each sentence adds essential information: purpose, usage, caveat, restriction. No fluff or 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?

Although no output schema, description explains the return value (beatBps) and its meaning. Covers input, process, output, and operational caveats. Fully adequate for a tool of this complexity.

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?

Schema description coverage is 100% with adequate descriptions. Description adds context that sellAmount is exact-in and that the tool is sell-side only, which the schema does not specify. Adds value beyond 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?

Clearly states the tool estimates how much better Ophis quotes are than the open market for sells. Uses specific verb 'estimate', specific resource 'Ophis vs open market surplus', and distinguishes from siblings like get_quote. No ambiguity.

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

Usage Guidelines5/5

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

Explicitly says 'Use before build_order to show the expected edge' and constrains to 'Sell-side (exact-in) only. Read-only.' Also advises that beatBps is advisory due to thin liquidity. Provides clear when and when-not guidance.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool covers a distinct function: order building, submitting, validating, quoting, data retrieval, token resolution, etc. No two tools have overlapping purposes; even related tools like 'build_order' and 'submit_order' are clearly separated by stage.

Naming Consistency5/5

All 14 tool names follow a consistent snake_case verb_noun pattern (e.g., build_order, get_balances, resolve_token). No mixing of conventions or ambiguous naming.

Tool Count5/5

14 tools is well within the optimal 3-15 range. Each tool addresses a specific need for interacting with the Ophis protocol, from token resolution to order submission and analytics.

Completeness4/5

The tool set covers the full order lifecycle (quote, build, validate, submit) plus supporting data (balances, portfolio, chains, gas, token info, surplus, earnings). A minor gap is the lack of an order cancellation or status retrieval tool, but this is acceptable given the server's focus on building and submitting orders.