Skip to content

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 Batches custom_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 action param" advice — see Effective Tool Descriptions.

Common gotchas

  • get weather (space) and github.pr (dot) are invalid.
  • Exceeding 64 chars fails validation.

See also

Sources