Path Pattern Syntax
Quick reference for path pattern matching in Agentable.
Quick reference
| Pattern | Matches | Notes |
|---|---|---|
| (blank) | All paths | Global tool |
/contact | /contact only | Exact match |
/products/* | /products/shoes | One segment wildcard |
/products/** | /products/shoes, /products/shoes/detail | Multi-segment wildcard |
/blog/[slug] | /blog/hello-world | Dynamic segment (same as *) |
Matching rules
- Patterns are matched against
window.location.pathname— no query string, no fragment - Leading slash is required
- Trailing slashes are normalised (both
/contactand/contact/match/contact) - Patterns are case-sensitive
Wildcard details
* matches exactly one path segment — a sequence of characters with no /:
/products/*matches/products/shoes✓/products/*does NOT match/products/shoes/detail✗
** matches zero or more path segments including slashes:
/products/**matches/products/✓/products/**matches/products/shoes/detail/blue✓
Dynamic segments
[param] syntax is supported as a single-segment wildcard — identical to * in behaviour:
/blog/[slug]matches/blog/hello-world✓/blog/[slug]does NOT match/blog/2026/post✗ (use/blog/**for that)
Testing your pattern
Fetch the config endpoint with a test path to verify:
GET /api/sites/YOUR_PUBLIC_ID/config?path=/products/test-product
The response tools array will contain only tools whose pattern matches.
Edge cases
- Query strings (
?foo=bar) are ignored by the matcher - Fragments (
#section) are ignored by the matcher - An empty string pattern behaves the same as blank (matches all)