Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Create rule
ARCJET_MCP_CREATE_RULE# Create remote rule Create a new remote rule for an Arcjet site. Supports four rule types: rate_limit (throttle request volume), bot (detect and control automated traffic), shield (WAF — block injection attacks and other OWASP threats), and filter (allow/deny by IP, country, region, ASN, network type, headers, or path). Rules apply globally to all requests. Always create in DRY_RUN mode first, verify behavior with list-requests or get-dry-run-impact, then use promote-rule to switch to LIVE. ## Bot categories allow/deny values are named bots (e.g. GOOGLE_CRAWLER, CURL) or categories: CATEGORY:SEARCH_ENGINE, CATEGORY:AI, CATEGORY:AI_AGENT, CATEGORY:SOCIAL, CATEGORY:MONITOR, CATEGORY:GOOGLE, CATEGORY:AMAZON, CATEGORY:META, CATEGORY:MICROSOFT, CATEGORY:TOOL, CATEGORY:PROGRAMMATIC, CATEGORY:PREVIEW, CATEGORY:FEEDFETCHER, CATEGORY:WEBHOOK, CATEGORY:VERCEL, CATEGORY:SLACK, CATEGORY:ARCHIVE, CATEGORY:ACADEMIC, CATEGORY:ADVERTISING, CATEGORY:OPTIMIZER, CATEGORY:APPLE, CATEGORY:YAHOO, CATEGORY:BOTNET, CATEGORY:UNKNOWN. CATEGORY:AI_AGENT is the subset of CATEGORY:AI that fetches a page on demand for a person, such as ChatGPT-User, Claude-User or a coding agent. To block AI crawlers but let AI agents through, allow CATEGORY:AI_AGENT rather than denying CATEGORY:AI, because a deny of CATEGORY:AI also blocks agents. An allow list denies every detected bot it does not name, so switching from a CATEGORY:AI deny list to a CATEGORY:AI_AGENT allow list also blocks search engines, monitors and every other bot: add the categories the site relies on, such as CATEGORY:SEARCH_ENGINE, to the same allow list. ## Rate limit match pattern The optional `match` field is a glob-style path pattern restricting which requests the rate limit applies to. Examples: `/api/*`, `/api/v1/users`. If omitted, the rate limit applies to all paths. ## Rate limit characteristics Default: ip.src. Other options: http.host, http.method, http.request.uri.path, http.request.headers["name"], http.request.cookie["name"], http.request.uri.args["name"]. ## Filter rules Use a `filter` rule to allow or deny requests by IP, country, region, continent, ASN, network type, headers, method, or path. Filters match known, well-defined values. They are not a WAF — do not use them to block SQL injection, XSS, or other attack payloads (use `shield` for that). Use `bot` rules for automated clients by category. `allow` and `deny` are mutually exclusive. Provide exactly one: - `deny` — blocklist. Matching requests are denied; everything else is allowed. Use this to block specific IPs, countries, ASNs, or network types. - `allow` — allowlist. Matching requests are allowed; everything else is denied. Use this to restrict traffic to approved countries, networks, or paths. Each allow/deny entry is one expression string. Max 10 expressions per rule, each ≤ 1024 bytes. Multiple expressions in the array are combined with OR. Combine conditions with `and` inside a single expression string. Always create filters in DRY_RUN first. After traffic has been logged, use get-dry-run-impact, then promote-rule. ### Syntax The language is Wireshark-like display filters. Comparisons (`eq`/`==`, `ne`/`!=`, `contains`) are case-sensitive byte matches. Wrap strings in `lower()` / `upper()`, or use `matches` with `(?i)`, for case-insensitive matching. - Strings are double-quoted: `ip.src.country eq "US"`. Escape inner quotes as `\"`. - IP addresses and CIDR ranges are a special type and must **not** be quoted: `ip.src eq 1.2.3.4`, `ip.src in { 192.0.2.0/24 }`. - Booleans are written as the field name (truthy) or negated: `ip.src.vpn`, `not ip.src.vpn`. - Sets use braces with **space-separated** values (no commas): `ip.src.country in {"US" "CA" "GB"}`. - `eq`/`==` and `ne`/`!=` are aliases. Prefer `eq` / `ne`. - Other operators: `contains`, `matches`/`~` (regex), `in`, `wildcard`, `strict wildcard`, `not`/`!`, `and`/`&&`, `or`/`||`, `gt`/`lt`/`ge`/`le`. - Functions: `len()`, `lower()`, `upper()`. Do not use `ip.src.asn` — the field is `ip.src.asnum`. ### Fields **IP address:** `ip.src` (unquoted IP or CIDR via `in`) **Geography (ISO / English names from the IP database):** - `ip.src.country` — ISO 3166-1 alpha-2 (`"US"`, `"DE"`). Prefer this over `ip.src.country.name`. - `ip.src.country.name` — `"United States"` - `ip.src.region` — English region/state name (`"California"`, `"England"`) - `ip.src.city`, `ip.src.postal_code` - `ip.src.continent` — `"AF"` `"AN"` `"AS"` `"EU"` `"NA"` `"OC"` `"SA"`. Prefer this over `ip.src.continent.name`. **ASN (all string values, so quote them):** - `ip.src.asnum` — Autonomous System number (`"15169"`) - `ip.src.asnum.name` — `"Google, LLC."` - `ip.src.asnum.domain` — `"google.com"` - `ip.src.asnum.country` — ISO country of the ASN - `ip.src.asnum.type` — `"hosting"`, `"isp"`, `"business"`, or `"education"` **Network type (booleans):** - `ip.src.vpn` — VPN exit - `ip.src.tor` — Tor exit - `ip.src.proxy` — open/anonymous or corporate proxy - `ip.src.relay` — privacy relay (e.g. iCloud Private Relay) - `ip.src.hosting` — cloud / data-center / hosting - `ip.src.crawler` — known crawler IP (`ip.src.crawler.name` for the name) - `ip.src.mobile` — mobile carrier There is no `ip.src.residential` field. `not ip.src.hosting` and `ip.src.asnum.type eq "isp"` only approximate some residential traffic and will also match other non-hosting networks (for example mobile). Do not treat those expressions as equivalent to a residential boolean. `investigate-ip` returns `filterAttributes` (country, region, continent, city, ASN, ASN type) and `suggestedFilters` with ready-to-use expressions. Prefer those values over guessing. When mapping `threatIntel.networkTypes` into a filter: `hosting` → `ip.src.hosting`, `vpn` → `ip.src.vpn`, `proxy` → `ip.src.proxy`, `tor` → `ip.src.tor`, `relay` → `ip.src.relay`, `mobile` → `ip.src.mobile`. `residential` has no dedicated boolean. **HTTP:** `http.host`, `http.request.method`, `http.request.uri.path` **Maps:** `http.request.headers["name"]`, `http.request.cookie["name"]`, `http.request.uri.args["name"]` (arg values are percent-decoded; path is the raw encoded path) ### Common recipes Block one IP (deny): `ip.src eq 203.0.113.10` Block several IPs or a CIDR (deny): `ip.src in { 203.0.113.10 198.51.100.0/24 }` Block one country (deny): `ip.src.country eq "RU"` Block several countries (deny): `ip.src.country in {"RU" "KP" "IR"}` Allow only selected countries (allow — everything else is denied): `ip.src.country in {"US" "CA" "GB"}` Block a region/state (deny): `ip.src.region eq "California"` Block a continent (deny): `ip.src.continent eq "EU"` Block an ASN by number (deny), e.g. Google: `ip.src.asnum eq "15169"` Block hosting/cloud ASNs (deny): `ip.src.asnum.type eq "hosting"` Block VPN, Tor, proxies, or hosting networks (deny — one expression each; OR'd): - `ip.src.vpn` - `ip.src.tor` - `ip.src.proxy` - `ip.src.hosting` Block VPN or Tor in one expression (deny): `ip.src.vpn or ip.src.tor` Allow only non-VPN US GET requests (allow): `http.request.method eq "GET" and ip.src.country eq "US" and not ip.src.vpn` Block a user-agent substring, case-insensitive (deny): `lower(http.request.headers["user-agent"]) contains "curl"` Block a path prefix (deny): `http.request.uri.path wildcard "/admin/*"` ### Pitfalls - Quoting an IP is invalid (`ip.src eq "1.2.3.4"` fails). Leave IPs and CIDRs unquoted. - `in` sets are space-separated. Do not write `{"US", "CA"}`. - `allow` is an allowlist (non-matches are denied). Do not put a single-country `allow` when the user asked to block that country — use `deny`. - Filters are literal. `http.request.uri.path contains "login"` does not match `/Login`. - Do not hand-write injection/XSS signatures as filters; use a `shield` rule. - Prefer one focused filter rule over packing unrelated policies into a single expression list. ## Remote rules vs Guard policies Two remote surfaces, attached to different SDK calls. Choosing wrong fails silently: the thing saves and never fires. | | Remote rule | Guard policy | | ------------ | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | | SDK call | `protect()` | `guard()` | | Protects | HTTP routes and API requests | Tool calls, agent actions, queue jobs, workflow steps | | Selected by | nothing — site-wide, every `protect()` call | an exact `label`, e.g. `email.sent` | | Reads | the request: IP, geo, ASN, headers, method, path, rate | only the typed inputs the app sends, plus detector verdicts | | New app code | none, if the app already calls `protect()` | yes for an application policy — a `guard()` call at the action; none for a coding-agent policy | | Written in | typed config + filter expressions | Rego, or a builder spec | Ask: **is this a request, or an action?** | Ask | Surface | Why | | ------------------------------------------ | ----------- | ----------------------------------------------------- | | Rate limit `/api`, block a country or bot | remote rule | in the request | | Block SQL injection | remote rule | `shield`, not a filter and not a policy | | Don't email outside our domain | policy | recipient is an action argument | | Refunds over $500 need approval | policy | amount and limit are application state | | No card numbers in an email body | policy | needs a `LOCAL` input | | No destructive tools on an injected prompt | policy | combines a detector verdict with app state | | Check a queue job or workflow step | policy | never arrives over HTTP, so `protect()` cannot see it | Notes: - Neither is automatic. A rule needs no code _change_, but is inert unless the app calls `protect()`. - Both can rate limit. A rule counts `protect()` calls keyed by the request; a policy counts what the app sends, keyed by actor — use a policy for per-user or per-tool-call limits. - Prompt injection and sensitive info are not available as remote rules (they need body content). In code they are SDK rules; in a policy they are detectors, whose verdict is a fact to combine (`injection AND destructive`) rather than a verdict alone. - Sites normally have both: rules at the perimeter, policies on the actions behind it. - Policies come in two kinds. One guards the customer's own actions and is selected by the `label` a `guard()` call passes. The other guards a developer's coding agent, is selected by what it **executes on** (Tool call or Prompt), and needs no application code — publishing it turns it on. A policy is one kind or the other, never both. Requires the sites:write permission.
Create site
ARCJET_MCP_CREATE_SITECreate a new Arcjet site within a team. Use this when onboarding a new application to Arcjet protection. Returns the site ID and SDK key (ARCJET_KEY) ready to add to your application's environment. After creating a site, use create-rule to add security rules. Requires the sites:write permission.
Submit error report
ARCJET_MCP_SUBMIT_ERROR_REPORTUse only when the user explicitly asks to report a Guard decision error to Arcjet. Report a coding-agent Guard decision error. Use the decisionId from Activity (`Decision: gdec_…`). Set errorType to false_positive (should not have been denied) or false_negative (should have been denied). This records the report for Arcjet training and Console visibility — it does not unlock a session and does not require admin approve/deny. Returns editUrl (`/report/error/fprep_…` on this environment's Console) a human can open to add email or more detail. For session-taint unlocks use a clear_taint report via the Console Reviews inbox instead.
Submit feedback
ARCJET_MCP_SUBMIT_FEEDBACKSends product feedback about these tools to the Arcjet team. Use it only when the user explicitly asks to send feedback to Arcjet; do not call it on your own initiative. Describe the tool problem itself; do not include request data, IP addresses, keys or other personal or account data.