{"openapi":"3.1.0","info":{"title":"endpoint-diligence","version":"0.1.0","description":"Runs live diligence on an x402-metered endpoint before you pay it: verifies its 402 payment challenge is spec-compliant, checks the price against market baselines, inspects the payTo address on-chain (Base), checks third-party directory presence, and checks basic infra hygiene, and detects possible upstream API resale with evidence-based markup estimates. Returns a 0-100 score, a pass/caution/fail verdict, and per-check evidence.; Compares an x402 endpoint's price (or a given price/category pair) against market percentiles from our daily radar snapshot of the x402 ecosystem.; Free possible-reseller preview. Matches an endpoint's live unpaid 402 description/schema, or a supplied description and price, against a dated catalog of well-known upstream APIs and reports confidence, matched signals, and documented markup math without asserting resale as fact.","x-guidance":"Call `check_endpoint` with `url`: the exact resource URL you'd otherwise pay (the one that returns HTTP 402). Never pass a URL on x402supply.com — self-audits are refused. Returns `score` (0-100), `verdict` (\"pass\" | \"caution\" | \"fail\"), and `checks[]`, one entry per sub-check with `name`, `weight`, `result` (\"pass\" | \"caution\" | \"fail\" | \"unknown\"), and `evidence` describing exactly what was observed. A failed spec-compliance check forces the overall verdict to \"fail\" regardless of score. \"unknown\" results mean a sub-check couldn't complete (e.g. an RPC timeout) and were excluded from scoring, not held against the endpoint. `resellerMarkup` never asserts resale as fact: it reports possible resemblance, confidence, documented list-price math, and the matched evidence. Call `compare_price` with either `url` (fetches its live 402 challenge to read price and category) or both `category` and `priceUsd` directly. Returns `category`, `priceUsd`, `percentiles` (p25/median/p75/p95/n for that category, or null if we have no baseline data for it), and `position` (where the price falls relative to those percentiles). Call `reseller_check` with either `url`, or both `description` and `priceUsd`. URL mode makes only the cheap unpaid 402 probe. `possible reseller` is a resemblance signal, not an accusation; inspect `confidence` and `evidence` before acting.","contact":{"email":"jeff@fosterinstruments.com"}},"servers":[{"url":"https://diligence.x402supply.com"}],"paths":{"/mcp":{"post":{"operationId":"endpoint-diligence_call","summary":"Call endpoint-diligence via MCP tools/call","tags":["endpoint-diligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"check_endpoint"},"arguments":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"compare_price"},"arguments":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"category":{"type":"string"},"priceUsd":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"reseller_check"},"arguments":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string","minLength":1},"priceUsd":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}]}}}},"responses":{"200":{"description":"Tool result","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"JSON-RPC 2.0 response envelope. `result.content[0].text` is a JSON-encoded string matching the schema in `x-mcp-result-schema`.","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"result":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"text"},"text":{"type":"string"}}}}}}},"x-mcp-result-schema":{"type":"object","required":["url","score","verdict","checks","resellerMarkup"],"properties":{"url":{"type":"string"},"score":{"type":"integer","minimum":0,"maximum":100},"verdict":{"type":"string","enum":["pass","caution","fail"]},"checks":{"type":"array","items":{"type":"object","required":["name","weight","result","evidence"],"properties":{"name":{"type":"string"},"weight":{"type":"integer"},"result":{"type":"string","enum":["pass","caution","fail","unknown"]},"evidence":{"type":"string"}}}},"resellerMarkup":{"type":"object","required":["verdict","matchedUpstream","confidence","markupMultiple","upstreamPriceUsd","priceAsOf","evidence"],"properties":{"verdict":{"type":"string","enum":["no reseller signals","possible reseller"]},"matchedUpstream":{"type":["string","null"]},"confidence":{"type":"string","enum":["none","weak","moderate","strong"]},"markupMultiple":{"type":["number","null"]},"upstreamPriceUsd":{"type":["number","string","null"]},"priceAsOf":{"type":["string","null"]},"evidence":{"type":"array","items":{"type":"string"}}}}}}},{"type":"object","description":"JSON-RPC 2.0 response envelope. `result.content[0].text` is a JSON-encoded string matching the schema in `x-mcp-result-schema`.","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"result":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"text"},"text":{"type":"string"}}}}}}},"x-mcp-result-schema":{"type":"object","required":["category","priceUsd","position"],"properties":{"category":{"type":"string"},"priceUsd":{"type":"number"},"percentiles":{"type":["object","null"],"properties":{"n":{"type":"integer"},"p25":{"type":["number","null"]},"median":{"type":["number","null"]},"p75":{"type":["number","null"]},"p95":{"type":["number","null"]}}},"position":{"type":"string"}}}},{"type":"object","description":"JSON-RPC 2.0 response envelope. `result.content[0].text` is a JSON-encoded string matching the schema in `x-mcp-result-schema`.","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"result":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"text"},"text":{"type":"string"}}}}}}},"x-mcp-result-schema":{"type":"object","required":["verdict","matchedUpstream","confidence","markupMultiple","upstreamPriceUsd","priceAsOf","evidence"],"properties":{"verdict":{"type":"string","enum":["no reseller signals","possible reseller"]},"matchedUpstream":{"type":["string","null"]},"confidence":{"type":"string","enum":["none","weak","moderate","strong"]},"markupMultiple":{"type":["number","null"]},"upstreamPriceUsd":{"type":["number","string","null"]},"priceAsOf":{"type":["string","null"]},"evidence":{"type":"array","items":{"type":"string"}}}}}]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]},"x-free-tools":["compare_price","reseller_check"]}},"/tools/check_endpoint":{"post":{"operationId":"endpoint-diligence_check_endpoint_http","summary":"Runs live diligence on an x402-metered endpoint before you pay it: verifies its 402 payment challenge is spec-compliant, checks the price against market baselines, inspects the payTo address on-chain (Base), checks third-party directory presence, and checks basic infra hygiene, and detects possible upstream API resale with evidence-based markup estimates. Returns a 0-100 score, a pass/caution/fail verdict, and per-check evidence.","tags":["endpoint-diligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false},"example":{"url":"https://example.com/api/paid"}}}},"responses":{"200":{"description":"Tool result (plain JSON, not MCP-wrapped)","content":{"application/json":{"schema":{"type":"object","required":["url","score","verdict","checks","resellerMarkup"],"properties":{"url":{"type":"string"},"score":{"type":"integer","minimum":0,"maximum":100},"verdict":{"type":"string","enum":["pass","caution","fail"]},"checks":{"type":"array","items":{"type":"object","required":["name","weight","result","evidence"],"properties":{"name":{"type":"string"},"weight":{"type":"integer"},"result":{"type":"string","enum":["pass","caution","fail","unknown"]},"evidence":{"type":"string"}}}},"resellerMarkup":{"type":"object","required":["verdict","matchedUpstream","confidence","markupMultiple","upstreamPriceUsd","priceAsOf","evidence"],"properties":{"verdict":{"type":"string","enum":["no reseller signals","possible reseller"]},"matchedUpstream":{"type":["string","null"]},"confidence":{"type":"string","enum":["none","weak","moderate","strong"]},"markupMultiple":{"type":["number","null"]},"upstreamPriceUsd":{"type":["number","string","null"]},"priceAsOf":{"type":["string","null"]},"evidence":{"type":"array","items":{"type":"string"}}}}}},"example":{"url":"https://example.com/api/paid","score":29,"verdict":"fail","checks":[{"name":"spec_compliance","weight":35,"result":"fail","evidence":"unexpected status 405 Method Not Allowed"},{"name":"price_sanity","weight":15,"result":"unknown","evidence":"no challenge to price"},{"name":"payto_onchain","weight":25,"result":"unknown","evidence":"no payTo address to check"},{"name":"directory_presence","weight":15,"result":"caution","evidence":"origin not found on x402scan or in our market-baseline snapshot — no third-party discovery footprint"},{"name":"infra_hygiene","weight":10,"result":"pass","evidence":"HTTPS enforced; domain registration age unavailable (RDAP lookup failed or unsupported TLD)"},{"name":"reseller_markup","weight":0,"result":"pass","evidence":"no reseller signals"}],"resellerMarkup":{"verdict":"no reseller signals","matchedUpstream":null,"confidence":"none","markupMultiple":null,"upstreamPriceUsd":null,"priceAsOf":null,"evidence":["No upstream catalog entry reached the two-distinctive-signal threshold."]}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/tools/compare_price":{"post":{"operationId":"endpoint-diligence_compare_price_http","summary":"Compares an x402 endpoint's price (or a given price/category pair) against market percentiles from our daily radar snapshot of the x402 ecosystem.","tags":["endpoint-diligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"category":{"type":"string"},"priceUsd":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result (plain JSON, not MCP-wrapped)","content":{"application/json":{"schema":{"type":"object","required":["category","priceUsd","position"],"properties":{"category":{"type":"string"},"priceUsd":{"type":"number"},"percentiles":{"type":["object","null"],"properties":{"n":{"type":"integer"},"p25":{"type":["number","null"]},"median":{"type":["number","null"]},"p75":{"type":["number","null"]},"p95":{"type":["number","null"]}}},"position":{"type":"string"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/tools/reseller_check":{"post":{"operationId":"endpoint-diligence_reseller_check_http","summary":"Free possible-reseller preview. Matches an endpoint's live unpaid 402 description/schema, or a supplied description and price, against a dated catalog of well-known upstream APIs and reports confidence, matched signals, and documented markup math without asserting resale as fact.","tags":["endpoint-diligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string","minLength":1},"priceUsd":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result (plain JSON, not MCP-wrapped)","content":{"application/json":{"schema":{"type":"object","required":["verdict","matchedUpstream","confidence","markupMultiple","upstreamPriceUsd","priceAsOf","evidence"],"properties":{"verdict":{"type":"string","enum":["no reseller signals","possible reseller"]},"matchedUpstream":{"type":["string","null"]},"confidence":{"type":"string","enum":["none","weak","moderate","strong"]},"markupMultiple":{"type":["number","null"]},"upstreamPriceUsd":{"type":["number","string","null"]},"priceAsOf":{"type":["string","null"]},"evidence":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}