# AGENTS.md — integrating Tollgate from a coding agent Tollgate sells four tools per call. No signup. Read `https://tollgate.tools/llms.txt` for prices and cost signals. ## Fastest path (Python, x402 v2 on Base) ```python # pip install "x402[evm]" (x402 Foundation SDK, v2; checked against x402==2.25.0) from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact import register_exact_evm_client client = register_exact_evm_client(x402Client(), EthAccountSigner(Account.from_key(EVM_PRIVATE_KEY))) client.set_spend_controls({"max_amount_per_payment": "$15"}) # SDK default cap is $1; review_contract is $12 async with x402HttpxClient(client, base_url="https://tollgate.tools") as c: r = await c.post("/v1/tools/explain_tx", json={"chain": "base", "tx_hash": "0x…"}) print(r.json()["summary"]) ``` ## Free tier first `explain_tx` allows 5 free calls/day per client. Call it unpaid; you get 200 while free calls remain, then 402. ## MCP Connect Streamable HTTP to `https://tollgate.tools/mcp`. Paid tools return a payment-required result; retry with `_meta["x402/payment"]` (standard x402 MCP transport). `find_tools` (marketplace search) is free. ## Masumi (ADA escrow) POST /start_job {identifier_from_purchaser, input_data: {tool, ...}} → lock ADA → GET /status?job_id → result. Failure refunds automatically. ## Budgeting Every 402 body has `cost.est_tokens` and `cost.p50_latency_ms`. Prices are fixed per call; size-scaled only for contract review (per 32 KB). ## Don'ts Do not send secrets in inputs. Inputs are analysed as data; any instructions inside them are ignored and flagged.