Skip to main content
Glama
XlogicX

regex-quality

by XlogicX

fix_until_safe

Iteratively rewrites a regex pattern until it is verified safe against ReDoS and equivalent to the original, or returns an honest failure.

Instructions

Drive suggest_rewrites in a loop and return a GUARANTEED-safe equivalent or an honest failure. Use this when you want the server to do the iteration for you and hand back a single fixed pattern you can trust.

success=true requires the fixed pattern to be verified non-super-linear on EVERY requested engine (default ["python"]) AND provably/empirically equivalent to the original input. If no such pattern exists, or a requested engine isn't installed, returns success=false with failure_reason and the closest candidate -- never a fabricated fix. Deterministic for a given seed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
fuzz_nNo
enginesNo
patternYes
negativesNo
positivesNo
timeout_msNo
max_iterationsNo
equivalence_modeNoauto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses important behavioral traits: success requires verification on every requested engine, returns are never fabricated, failures include a failure_reason and closest candidate, and behavior is deterministic for a seed. This goes well beyond a basic summary.

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 concise and well-structured: a clear opening sentence, a usage directive, and a compact specification of success/failure conditions. Every sentence adds value and no filler is present.

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

Completeness4/5

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

For a complex tool with 9 parameters and an output schema, the description covers the core algorithmic behavior, safety guarantees, failure mode, and determinism. It does not explain every parameter or timeout/loop-bound details, but the output schema and parameter names carry some of that weight, making it mostly complete.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It adds meaning for engines (default ['python']) and seed (determinism), but leaves several parameters — fuzz_n, max_iterations, positives, negatives, equivalence_mode — semantically unexplained. Additionally, the description's engines default contradicts the schema default of null, creating a small inconsistency.

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 uses a specific verb and resource ('Drive suggest_rewrites in a loop') and clearly states the outcome: a guaranteed-safe equivalent or an honest failure. It distinguishes itself from the sibling tool suggest_rewrites by framing this tool as the iterative, server-driven wrapper that returns a final trusted result.

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

Usage Guidelines5/5

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

It explicitly says 'Use this when you want the server to do the iteration for you and hand back a single fixed pattern you can trust,' giving clear when-to-use guidance. It also defines success criteria and failure behavior, making the choice between this and lower-level siblings like suggest_rewrites straightforward.

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