Skip to main content
Glama

Compare opportunities

compare_opportunities
Read-onlyIdempotent

Side-by-side comparison of 2–5 opportunities by risk-adjusted score.

Pass list_yields opportunities[].id values as poolIds or opportunityIds.

Returns ranked list, compact comparison table fields (including protocolSlug for get_protocol_risk), winnerId, and rationale bullets (including when raw APY leader differs from risk-adjusted winner). sourceChainKey is ethereum|base|arbitrum only (unknown → VALIDATION_ERROR; no invented bridge fee).

Research only — non-custodial.

Example: { "poolIds": ["pool-id-a", "pool-id-b", "pool-id-c"], "horizonDays": 30 }

Input Schema

NameRequiredDescriptionDefault
poolIdsNo2–5 list_yields opportunities[].id values. Example: ["id-a","id-b"]. Alias: opportunityIds.
horizonDaysNoHolding horizon in days for gas/bridge amortization (default 30). Example: 30
notionalUsdNoNotional USD size for net-yield cost amortization and exitRisk TVL multiples (default 10000). Example: 10000
opportunityIdsNoAlias for poolIds — same list_yields opportunities[].id values.
sourceChainKeyNoAgent's current chain for bridge cost estimate: ethereum | base | arbitrum (aliases: eth, ETH, Ethereum, arb, ARB, BASE). Blank/whitespace is VALIDATION_ERROR (omit the field to default). Unknown keys (solana, foo) return VALIDATION_ERROR — no invented bridge fee.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the description isn't obligated to cover safety — yet it adds real behavioral detail: what the response contains (ranked list, comparison table fields, winnerId, rationale bullets), the VALIDATION_ERROR path for unknown chains, and the guarantee that no bridge fee is invented. It doesn't discuss rate limits or the cost/latency of the comparison, keeping it off a 5.

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?

Front-loaded with the core purpose, then input sourcing, then return shape, then the chain constraint, then a compact example. Every line carries a distinct fact; nothing is padded or repeated verbatim beyond the necessary example.

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?

With no output schema, the description carries the return-value burden and does so: ranked list, table fields incl. protocolSlug for chaining into get_protocol_risk, winnerId, and rationale bullets including the raw-APY-vs-risk-adjusted divergence case. For a 5-parameter read-only comparison, an agent has everything needed to invoke and interpret it.

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 100%, so the schema already documents poolIds/opportunityIds aliasing, horizonDays defaults, and the sourceChainKey enum and error behavior. The description largely restates that material (alias, chain restriction) plus one worked example, adding little meaning beyond the structured fields — the 3 baseline is the right call.

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?

First sentence gives a specific verb (side-by-side comparison), resource (opportunities), a bounded cardinality (2–5), and the ranking criterion (risk-adjusted score). Sibling differentiation is only implicit — an agent can infer this is the multi-asset counterpart to score_opportunity/explain_score, but the description never names those alternatives.

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?

Explicitly routes the agent to list_yields opportunities[].id for input values, and states the tool is 'research only — non-custodial', which scopes the use case. There is no explicit when-not clause or statement of when to prefer score_opportunity over this, so it stops short of a full 5.

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.