Skip to main content
Glama

Find better-scored alternatives to an x402 endpoint (paid)

x402_find_alternatives

Before paying, compare an x402 endpoint URL against semantically similar alternatives with higher trust scores, so you can route around dead, expensive, or low-grade services.

Instructions

Given an x402 endpoint URL, returns the top semantically-similar endpoints (matched on advertised purpose via description embeddings) that currently OUT-SCORE it on the deterministic trust score. Use this to route away from a mediocre/dead/expensive endpoint toward a more reliable, better-settled one serving the SAME function — e.g. before paying, check if a higher-graded equivalent exists. Each alternative carries its trust 'score', 'grade', 'recommendation', cosine 'similarity' (0-1), 'amountUsd' price, 'priceCeiling' (true when amountUsd is an x402 'upto' authorization ceiling, not a fixed per-call price), and a free 'endpointPage' URL. Same-host siblings and 'avoid'-flagged endpoints are excluded. An empty 'alternatives' array is a valid answer meaning nothing beats the subject. Similarity is independent of latency/geography. Pay-per-call over x402 (~$0.005); auto-pays if a wallet is configured, otherwise returns the price quote.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax alternatives to return (1-25, default 5)
resourceYesFull x402 resource URL to find better alternatives for, e.g. https://api.example.com/v1/thing
minScoreDeltaNoMinimum trust-score advantage an alternative must have over the subject (default 5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: it discloses exclusions ('same-host siblings and avoid-flagged endpoints are excluded'), the empty-result semantics, that similarity is independent of latency/geography, and the billing behavior ('pay-per-call over x402 (~$0.005); auto-pays if a wallet is configured, otherwise returns the price quote'). It even explains the priceCeiling field's meaning, which is non-obvious.

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?

Front-loaded with the core purpose and the return-shape enumeration, which is dense but relevant. It is a single long paragraph with no filler, though the field-by-field listing could be tightened slightly.

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?

For a complex, paid, billed tool with no output schema and no annotations, the description covers return fields, pricing/authorization semantics, filtering exclusions, and empty-result behavior. Nothing an agent needs in order to call and interpret this tool is missing.

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 limit, resource, and minScoreDelta. The description adds no additional syntax or format detail for these three parameters beyond what the schema provides, so this sits at the baseline 3.

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?

States a specific verb and resource ('Given an x402 endpoint URL, returns the top semantically-similar endpoints that currently OUT-SCORE it'), which carves out a distinct niche combining semantic similarity with trust-score filtering. This implicitly separates it from x402_semantic_search (pure similarity) and x402_trust_leaderboard (pure score), so an agent can select it without opening the schema.

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?

Explicit when-to-use: 'route away from a mediocre/dead/expensive endpoint... before paying, check if a higher-graded equivalent exists.' It also clarifies the negative case ('An empty alternatives array is a valid answer'). It stops short of naming which sibling to use for a pure semantic or pure score lookup, so no explicit exclusion of alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.