tool_name_glob field on a rule. It’s a deliberately small,
case-sensitive grammar (no regex, no backtracking) so a rule reads the same
way you’d type a tool name from the Discovered tools tab, and matching
stays linear-time on the relay hot path.
This page is the focused grammar reference for that one field. For where a
glob sits inside a full rule — the surface, argument clauses, egress lists,
verdict — see Rule schema and the deep
engine reference in Firewall Rules.
1. Why a tool name glob instead of regex
Tools are conventionally namespaced server.tool or category.action
(shell.exec, db.query, community.http_fetch). A glob lets one rule
catch a whole family — shell.* for every shell verb, *.delete for a
verb across servers — without the foot-guns of a regex on a path that runs
on every tool call.
The grammar is intentionally tiny. Matching is case-sensitive —
MCP tool names are conventionally lowercase-with-dots, so a case-fold would
surprise an author who copy-pastes a name straight from the Discovered
tools view. There’s no catastrophic backtracking because there’s no regex
engine behind it; every pattern below is a handful of string operations.
2. The five pattern shapes
Atool name glob is exactly one of these shapes. Anything that doesn’t fit
the wildcard forms is treated as a literal, exact match.
| Pattern | Shape | Matches |
|---|---|---|
"" or * | any | Every tool call. |
foo.* | prefix | foo.bar, foo.exec — not bare foo. |
*.exec | suffix | shell.exec, db.exec, and bare exec. |
*.shell.* | infix | local.shell.exec, byo.shell.run. |
shell.exec | exact | Only the literal string shell.exec. |
3. Prefix — foo.*
Matches any tool whose name starts with foo. and has at least one more
character after the dot.
Matches
shell.exec, shell.run, shell.rm for the pattern shell.*Does not match
bare
shell (the prefix requires the trailing dot and something
after it)shell.* deny covers every shell verb a server might add later.
4. Suffix — *.exec
Matches any tool whose name ends with .exec, anchored at a dot — and
also matches the bare, un-namespaced verb exec on its own.
The suffix stays anchored — it won’t match a partial word:
| Pattern | shell.exec | bare exec | shell.execute |
|---|---|---|---|
*.exec | matches | matches | no match |
*.execute would be needed for shell.execute; the suffix only fires at a
dot boundary or the start of the string, never mid-word.
5. Infix — *.shell.*
Matches any tool name that contains .shell. as an infix, with at least
one character on each side. This is how one rule covers a verb wherever a
BYO-MCP server happens to namespace it.
local.shell.exec, byo.shell.run, and any other
<server>.shell.<verb> shape. It does not match bare shell or a bare
.shell. with nothing around it — the character-on-each-side requirement
keeps the infix honest.
6. Exact — shell.exec
Anything that isn’t one of the wildcard shapes above is a literal string
match. shell.exec matches shell.exec and nothing else. This is the right
choice when you want to name one specific tool — pair it with an
argument clause to narrow further
(“block shell.exec only when the command is rm -rf”).
7. One concrete example
Say you want to deny every destructive shell verb regardless of how an MCP server namespaces it, while letting everything else audit. In the console rule editor (writes require Developer+), the match half of the rule is a single infix glob:firewall_policy_id on the key), and the rule
now catches local.shell.exec, byo.shell.run, and acme.shell.rm — three
servers, one glob. Want to confirm it fires on what you expect before you
depend on it? Use Test rules — it returns
the verdict, the matched rule, and the reason without dispatching anything.
A glob narrows which tool. To narrow with what arguments, AND an
argument clause onto the same rule;
to govern a tool only when a particular skill owns it, add a skill name
glob (same grammar, matched against the owning skill). Both are covered in
Firewall Rules.
8. Quick reference
Is the bare verb covered by a suffix glob?
Is the bare verb covered by a suffix glob?
Yes.
*.exec matches shell.exec, db.exec, and the bare,
un-namespaced exec. Prefix globs (foo.*) do not match the bare
namespace foo — only names with something after the dot.Does the middle star in foo.*.bar work?
Does the middle star in foo.*.bar work?
No. The only wildcard-in-the-middle shape the engine understands is the
symmetric infix
*.X.*. foo.*.bar falls through to an exact literal
match. Use two rules or an argument clause instead.Is matching case-sensitive?
Is matching case-sensitive?
Yes.
Shell.Exec and shell.exec are different tools. Copy names
verbatim from the Discovered tools tab.What if the glob is malformed?
What if the glob is malformed?
Any shape that isn’t one of the five above is treated as an exact match
— it simply won’t match a real tool name, so the rule never fires rather
than matching something unexpected. The console validates rules on save.
Related
Tool allow-listing
Use globs to allow a known set and deny the rest.
Validate arguments
AND a JSONPath argument clause onto a glob.
Rule schema
Every field of a rule, in one place.
