Skip to main content
Glama

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

x402_find_alternatives

Find higher-trust x402 endpoints that serve the same purpose as a given URL, with price and similarity details, to avoid paying for unreliable or overpriced 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. It also carries 'hasDescription': false means the endpoint advertises no description, so its similarity was computed from service name + URL path tokens only, a weaker signal worth more skepticism than a description-based match. 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 provided, the description carries the full burden of behavioral disclosure. It covers exclusions (same-host siblings and avoid-flagged endpoints), edge cases (empty array meaning nothing beats the subject), the independence of similarity from latency/geography, and the payment mechanism (auto-pays if wallet configured, otherwise returns quote). It also explains the 'hasDescription' caveat and the meaning of 'priceCeiling'. This is exceptionally transparent.

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 description is long but well-structured and front-loaded with the core purpose, followed by usage, output field explanations, exclusions, and payment details. Every sentence adds value; there is no filler. It could be slightly tighter, but the length is justified given the complexity of the tool's output semantics and caveats.

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?

Given the absence of an output schema, the description thoroughly explains every returned field (score, grade, recommendation, similarity, amountUsd, priceCeiling, endpointPage, hasDescription) and their implications. It also covers edge cases (empty array, weaker similarity signal) and payment behavior. Nothing an agent needs to correctly call and interpret the result 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?

The input schema already provides 100% description coverage for all three parameters (resource, limit, minScoreDelta). The tool description does not add extra meaning to the parameters themselves; it only gives context about the resource (e.g., full URL example) which is already in the schema. With full schema coverage, the baseline of 3 applies.

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 states a clear, specific purpose: given an x402 endpoint URL, it returns semantically similar endpoints that out-score it on trust score. It explicitly differentiates from a generic semantic search by focusing on out-scoring and same-function routing, and mentions exclusions (same-host siblings, avoid-flagged). This is a strong verb-resource-scope statement that distinguishes it from sibling tools like x402_semantic_search.

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?

The description gives explicit use-case guidance: '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.' It clearly tells when to invoke the tool. However, it does not explicitly mention when not to use it or name a specific alternative tool to use instead, though the context is sufficiently clear.

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