78trust / 100

Tool Gate

by TrollBridge in Security & trust

x402 APIPassing, checked 3 h ago

Policy decision API for pre-execution tool gating — submit a tool name + args + your policy and get a structured ALLOW / DENY / MODIFY (with rewritten args) decision, structured reasons, and audit metadata. Heuristic policy decision, not a security guarantee ($0.10). Toll: $0.10 USDC on Base or Solana.

GET https://mini-tollbooth.onrender.com/tool-gate

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
216 ms typical, 260 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://mini-tollbooth.onrender.com/tool-gate?args=%7B%22amount_usd%22%3A+50%2C+%22to%22%3A+%220x...%22%7D&policy=%7B%22allow%22%3A%5B%22send_.*%22%5D%2C%22deny%22%3A%5B%22exec%22%5D%2C%22arg_constraints%22%3A%7B%22max_amount_usd%22%3A100%7D%2C%22unknown%22%3A%22deny%22%7D&tool=send_payment"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fmini-tollbooth.onrender.com%2Ftool-gate
const res = await pay("https://mini-tollbooth.onrender.com/tool-gate?args=%7B%22amount_usd%22%3A+50%2C+%22to%22%3A+%220x...%22%7D&policy=%7B%22allow%22%3A%5B%22send_.*%22%5D%2C%22deny%22%3A%5B%22exec%22%5D%2C%22arg_constraints%22%3A%7B%22max_amount_usd%22%3A100%7D%2C%22unknown%22%3A%22deny%22%7D&tool=send_payment");
console.log(await res.json());

Example input

{
  "args": "{\"amount_usd\": 50, \"to\": \"0x...\"}",
  "policy": "{\"allow\":[\"send_.*\"],\"deny\":[\"exec\"],\"arg_constraints\":{\"max_amount_usd\":100},\"unknown\":\"deny\"}",
  "tool": "send_payment"
}

Example output

{
  "audit": {
    "args_keys": [
      "amount_usd",
      "to"
    ],
    "decided_at": "2026-10-02T08:00:00Z",
    "policy_rules_applied": 2
  },
  "decision": "MODIFY",
  "description": "Policy decision API for pre-execution tool gating — submit a tool name + args + your policy and get a structured ALLOW / DENY / MODIFY (with rewritten args) decision, structured reasons, and audit metadata. Heuristic policy decision, not a security guarantee ($0.10).",
  "lane": "/tool-gate",
  "reasons": [
    {
      "detail": "…",
      "rule": "amount-cap"
    }
  ],
  "rewritten_args": {
    "amount_usd": 100,
    "to": "0x..."
  },
  "summary": "…",
  "tool": "send_payment"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402241 ms$0.1
7 h agoPassed402216 ms$0.1
11 h agoPassed402259 ms$0.1
14 h agoPassed402185 ms$0.1
18 h agoPassed402260 ms$0.1
21 h agoPassed402210 ms$0.1
25 h agoPassed402652 ms$0.1
29 h agoPassed402219 ms$0.1
32 h agoPassed402177 ms$0.1
38 h agoPassed402213 ms$0.1