Skip to main content
Glama
XlogicX

regex-quality

by XlogicX

analyze

Test a regex pattern for correctness, ReDoS safety, and memory efficiency, and get actionable rewrite suggestions when it fails.

Instructions

Composite verdict: accept pattern only if it (a) passes all test cases, (b) shows no super-linear NFA growth on the engine, and (c) compiles within the RE2 memory bound. On rejection, names the dangerous construct and the family of safe rewrites to try. Does not auto-rewrite.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
engineNopython
qlimitNo
patternYes
negativesNo
positivesNo
timeout_msNo
mem_bound_bytesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full transparency burden. It discloses meaningful behavioral details: the three criteria for acceptance, rejection output (names dangerous construct and safe rewrite families), and a limitation (does not auto-rewrite). It omits potential side effects like whether user-supplied test cases are executed, but the core behavior is well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise and well-structured: three sentences, front-loaded with the tool's purpose, and each sentence adds critical information (accept criteria, rejection behavior, non-rewrite boundary). No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, this is a 7-parameter tool with no schema descriptions and no annotations. The description provides a strong high-level overview, but it is insufficiently complete for an agent to correctly configure parameters like qlimit, timeout_ms, and positives/negatives. The complexity demands more parameter-level detail and usage guidance than is provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It references 'pattern' and hints at test cases and 'RE2 memory bound,' which map to positives/negatives and mem_bound_bytes, but it fails to explain engine, qlimit, timeout_ms, or the structure of positives/negatives. This leaves several parameters under-specified for correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Composite verdict' and clearly specifies the exact accept criteria (passes all test cases, no super-linear NFA growth, RE2 memory bound). It also distinguishes itself from siblings by framing itself as an overarching analyzer and explicitly noting it does not auto-rewrite, which sets it apart from mutation-oriented tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context: this tool returns a composite accept/reject verdict and is not for rewriting. It implies when to use it (when a holistic safety decision is needed) and when not (when auto-rewrite is desired), though it does not explicitly name sibling alternatives or provide explicit exclusions beyond 'Does not auto-rewrite.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/XlogicX/ReDetox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server