Tool Name Regex
Definition
The validation pattern a custom tool's name field must satisfy: ^[a-zA-Z0-9_-]{1,64}$.
Key points
- Allowed: ASCII letters, digits, underscore, hyphen. No spaces, no dots, no other punctuation.
- Length 1–64 characters.
- The identical pattern
^[a-zA-Z0-9_-]{1,64}$is reused for the Message Batchescustom_id— a common cross-domain memory hook. - Naming convention tip: use prefixes to group related tools (e.g.
github_list_prs,github_create_pr).
Why it matters for the exam
- A frequent multiple-choice item asks you to pick the valid tool name; distractors sneak in a space or a dot.
- Reinforces the "consolidate ops with an
actionparam" advice — see Effective Tool Descriptions.
Common gotchas
get weather(space) andgithub.pr(dot) are invalid.- Exceeding 64 chars fails validation.
See also
Sources
Referenced by
Practice questions optional · AI
Generate fresh practice questions about this concept with AI. These are not vault-verified.