regex_test
Test a JS-style regex against text. Returns match count and up to 20 match slices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| flags | No | Flags e.g. gi (default g) | |
| pattern | Yes | Regex pattern (no /slashes/) |
Test a JS-style regex against text. Returns match count and up to 20 match slices.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| flags | No | Flags e.g. gi (default g) | |
| pattern | Yes | Regex pattern (no /slashes/) |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses the return type (match count and up to 20 match slices), which is useful, but it does not explain behavior on no matches, invalid patterns, or side effects. It is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary purpose, and includes a concise summary of return behavior. Every word contributes meaning, with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description provides enough context for a simple regex tool by specifying the output format (count and slices). It lacks detail on the exact structure of slices, but for a basic test tool the description is sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already covers pattern and flags with descriptions, and the description adds the context that 'text' is the target string. Since coverage is 67% and the missing text description is somewhat self-evident, the description adds marginal value over the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool tests a JS-style regex against text, which is a specific verb+resource combination. It also distinguishes from siblings by being the only regex-related tool, making its purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is used for testing JS-style regexes, and the context is clear given no sibling tools serve a similar purpose. However, it does not explicitly state when not to use it or mention alternatives, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.