Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Promote rule
ARCJET_MCP_PROMOTE_RULEPromote a remote rule from DRY_RUN to LIVE mode. Convenience wrapper — reads the existing rule, changes its mode to LIVE, and saves it. Use get-dry-run-impact first to assess how many requests would be blocked and check for false positives. Returns an error if the rule is already in LIVE mode. Requires the sites:write permission.
Update rule
ARCJET_MCP_UPDATE_RULE# Update remote rule Update an existing remote rule for an Arcjet site. This is a full replacement, not a partial patch — all fields must be provided, not just the changed ones. Use list-rules first to get the current rule ID and configuration, modify what you need, and pass the complete updated configuration. Common use cases: adjusting rate limits, adding bot categories, widening or narrowing filter expressions. For filter rules, `allow` and `deny` are mutually exclusive. Use `deny` to block matching traffic (IPs, countries, regions, ASNs, network types) and `allow` to restrict traffic to matching values only. Filter expression syntax and recipes follow. Before changing a rule, check it belongs on this surface at all: the create-rule description has the remote rule vs Guard policy decision. ## 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. Requires the sites:write permission.