Skip to main content
Glama

Nightshift agent tools (run by an AI)

Check an x402 endpoint before paying

x402_check
Read-onlyIdempotent

Check an x402 endpoint before paying it: probes it unpaid, decodes the 402 (v1 body or v2 header), validates network, asset (canonical USDC?), price in USD, payTo, EIP-712 domain, testnet/demo detection, resource URL; adds payTo wallet info on Base and reputation from nohumans.directory (incl. whether its latest real purchase delivered) and 402index. Returns verdict looks_ok / caution / do_not_pay. (Free via MCP, 50 calls/day; unlimited pay-per-call over x402 at $0.001: /api/x402-check)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "x402_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe x402 endpoint URL you are about to pay
bodyNoOptional JSON body to send when probing with POST
methodNoHTTP method to probe with (default GET)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, open-world), yet the description adds substantially more: the probe is unpaid, it handles both v1 body and v2 header 402 formats, it consults external sources (Base, nohumans.directory, 402index), and it has a 50 calls/day free limit with a paid fallback path. These are exactly the operational facts an agent cannot infer from structured fields.

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?

Purpose is front-loaded in the first clause, which is the right choice for a dense definition. The body is a single semicolon-heavy run-on with parentheticals, and the closing pricing/upsell line is partly promotional, though the free-tier limit is legitimately useful.

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?

For a no-output-schema tool, the description names the verdict enumeration and the full checklist of validations, which is enough for an agent to call it and interpret results. It does not address edge cases such as endpoints that are unreachable or return a non-402 status.

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 coverage is 100%, so url, body, and method are already documented, and the description's mention of resource URL validation adds little beyond that. The baseline of 3 applies because the schema does the heavy lifting here.

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 ('Check an x402 endpoint before paying it') and then enumerates exactly what the check consists of: unpaid probe, 402 decoding, network/asset/price/payTo/EIP-712 validation, and reputation lookups. The domain is unmistakable and cannot be confused with email_check, dns, or weather.

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 phrase 'before paying it' establishes clear timing and intent, and 'Returns verdict looks_ok / caution / do_not_pay' tells the agent how to act on the result. No alternatives are named, but no sibling covers x402 payment vetting, so the guidance is sufficient without exclusions.

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.