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, 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

TableJSON 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.

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=true. The description adds behavioral context beyond that: it is 'research only — non-custodial', it can produce validation errors for unknown sourceChainKey and mentions it does not invent bridge fees, and it notes the output includes rationale for when the raw APY leader differs from the risk-adjusted winner. This is helpful extra transparency, though it doesn't fully describe all edge cases (e.g., what happens if an opportunity ID is invalid). The bar is lowered due to robust annotations, so 4 is fair.

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?

The description is concise—a few sentences—with a clear structure: purpose, parameter guidance, output summary, constraint note, and an example. It is front-loaded with the most important info (what it does, how many items), and every sentence adds value. No wasted words.

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?

Given the tool has no output schema, the description compensates by stating what the return contains (ranked list, comparison table fields, winnerId, rationale bullets). It also covers key constraints (2–5 items, SDK validation error for unknown sourceChainKey, aliases). The annotations cover safety (read-only, idempotent). It doesn't explicitly state what happens on invalid opportunity IDs or other error cases, but given the rich schema (with descriptions on every parameter) and clear output summary, it's quite complete. A 4 is appropriate; a 5 would require explicit error-handling for invalid IDs or other edge cases.

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%, so the baseline is 3. The description adds value by explaining the relationship between poolIds and opportunityIds (aliases) and telling the agent to use list_yields opportunities[].id values, which is not fully explicit in the schema. It also clarifies that sourceChainKey maps to the agent's current chain and that blank is a validation error, reinforcing the schema enum-like behavior. Since it adds meaningful context beyond the schema, a 4 is justified.

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?

The description clearly states the tool does a side-by-side comparison of 2–5 opportunities by risk-adjusted score, and returns a ranked list with comparison fields. It distinguishes itself from siblings like score_opportunity (single scoring) and list_yields (list fetching), and it explicitly mentions the raw APY vs risk-adjusted winner distinction, so an agent can differentiate it from related tools.

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?

The description explicitly tells the agent when to use it: for comparing 2–5 opportunities. It provides guidance on parameter source (pass list_yields opportunities[].id values as poolIds or opportunityIds), and it names sibling tool list_yields as the source for the IDs. It also gives a concrete example. This is strong usage guidance that goes beyond generic 'how to call' and covers data sourcing.

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.2/5.0
Disambiguation4/5

The tools are mostly distinct: list_yields for ranking, score_opportunity for detailed scoring of one, explain_score for explaining a score, compare_opportunities for side-by-side comparison, get_protocol_risk for protocol-level risk, and health for connectivity. However, score_opportunity and explain_score have overlapping purposes (both return factor scores and rationale), which could cause some confusion, though they serve different output formats.

Naming Consistency4/5

The naming pattern is mostly consistent using verb_noun (e.g., list_yields, get_protocol_risk, explain_score, compare_opportunities, score_opportunity). One deviation: 'health' is a single-word name that breaks the verb_noun pattern, but it's a minor deviation and still readable.

Tool Count5/5

With 6 tools, this is well-scoped for a yield research server. Each tool has a distinct role: listing, scoring, explaining, comparing, protocol risk, and health check. The count feels appropriate for the domain, not overly heavy or thin.

Completeness3/5

The server covers core research needs: listing opportunities, detailed scoring, explanation, comparison, protocol risk, and health check. However, there are some minor gaps: no direct way to filter by specific pool ID without first listing, no tool to get historical trends or detailed market info beyond the scoring. But the domain is research-only non-custodial, so a full CRUD lifecycle isn't expected; still, a tool to fetch specific opportunity details without scoring could be missing.