Skip to main content
Glama

Server Details

Run regexes on real engines (JavaScript, RE2/Go) against test strings, and prove ReDoS safety.

Ownership verified
Status
Healthy
Uptime
100.0% over the last 24 hours
Last Tested
Transport
Streamable HTTP · MCP 2025-11-25
URL
ChatGPT
–
Claude
–

TDQS

A4.1/5.0

Scored across 2 tools

Disambiguation3/5

The two tools have distinguishable core purposes (automaton ReDoS analysis vs. live pattern execution), but sieve_test_regex also performs ReDoS analysis and shares signals like "is this regex safe" and "catastrophic backtracking" with sieve_check_redos. Descriptions cross-reference each other, which helps, but an agent could reasonably pick either for a safety question and get partially overlapping output.

Naming Consistency4/5

Both names follow a clean sieve_<verb>_<noun> pattern with a shared server prefix, which is predictable. The verbs 'check' and 'test' are near-synonyms, slightly weakening the distinction the naming should provide.

Tool Count3/5

Two tools is thin for a regex utility surface, even a narrow one; there is no dedicated analyze/explain or batch-test-against-multiple-engine tool. The two existing tools are heavyweight and well-scoped, but the set feels minimal rather than deliberately minimal.

Completeness3/5

Safety analysis and live testing with capture groups, replacement, warnings and verdicts are covered in depth, but engine support is limited to JavaScript and RE2 with Python/PCRE/Java/.NET explicitly unsupported. There is no regex explanation/generation or cross-engine comparison operation, leaving real gaps for common "why does this behave differently" workflows.

Available Tools

2 tools
sieve_check_redosCheck regular expressions for ReDoS (catastrophic backtracking)A
Read-onlyIdempotent
Inspect

Use when a regular expression will run on user input or untrusted data (form validation, request routing, log parsing, WAF or search rules) and must not hang the server, or when reviewing a codebase's regexes for ReDoS (signals: "is this regex safe", "ReDoS", "catastrophic backtracking", "regex hangs", "CPU spike on validation", "security review of regexes", "(a+)+"). Analyzes 1 to 20 patterns with recheck (automaton analysis with a fuzzing fallback) for backtracking engines with JavaScript syntax, and returns per pattern: safe (proven linear, or no attack found when backreferences or lookarounds force fuzzing), or vulnerable with the complexity (exponential, or polynomial with its degree), a concrete attack string (repr like 'a'.repeat(31) + '\x00', plus the string itself when short), the hot part of the pattern and a fix hint. Example: {"patterns":["^(a+)+$","/^([a-z]+\s)*$/","^[\w.+-]+@[\w-]+\.[\w.-]+$"]}. Python re, PCRE, Java, .NET and Ruby backtrack the same way on these constructs; RE2, Go regexp and Rust regex are linear-time and not affected. To also run the pattern on test strings, use sieve_test_regex.

Inputs: patterns (required), flags.

sieve_test_regexRun a regular expression on test strings (JavaScript or RE2/Go) and check it for ReDoSA
Read-onlyIdempotent
Inspect

Use when you have written, been given or are about to commit a regular expression and need to know what it really matches, instead of predicting it (signals: "write a regex for", "does this regex match", "validate emails/phone numbers/dates/slugs/URLs with a regex", "why doesn't my regex match", "test this pattern", "regex for Go", "is this regex safe", "catastrophic backtracking", "convert this Python regex to JavaScript"). Executes the pattern on the real engine: JavaScript (V8 RegExp, the engine in Chrome, Node.js and Cloudflare Workers; flags d g i m s u v y) or RE2 (re2js, with Go regexp parity: Go, RE2, Google Sheets and BigQuery syntax; flags i m s). Give strings that must match and strings that must not; each case comes back pass/fail with the matched text, index and capture groups (numbered and named), and why a "should not match" string matched (usually a missing ^...$). match: "full" tests the whole string. texts lists every match, replace_with shows the replacement ($1/$ in JavaScript, $1/${name} in Go). For JavaScript it also runs a ReDoS analysis (recheck): proven linear, or exponential/polynomial backtracking with a concrete attack string and the hot part of the pattern. Flags patterns that compile but mislead: ^a|b$ anchoring, \A/\Z/\h read as letters, [[:alpha:]], {,3}, [A-z], unescaped dots before extensions. Invalid patterns return the engine's error and a hint (Python (?P), (?i), possessive and atomic groups; lookarounds and backreferences in RE2). Example: {"pattern":"[\w.+-]+@[\w-]+\.[a-z]{2,}","should_match":["ann@example.com"],"should_not_match":["ann@example","see ann@x.io now"]}. Does not run Python, PCRE, Java or .NET engines; it reports what differs for common constructs. Up to 100 strings of 20000 characters; on a ReDoS-vulnerable pattern, long strings are skipped instead of hanging. Returns {valid, verdict: ok|warnings|redos|fails|invalid, summary, engine, engine_name, pattern, flags, match_mode, counts:{should_match, should_not_match, texts, passed, failed, skipped}, group_count, cases:[{text, length, expect: match|no_match|any, matched, pass (null = skipped), match_count, match:{text, index, end, groups?, named?}, matches? (texts only), why?, replaced?, skipped?}], warnings:[{rule, message, fix?, index?}], redos:{status: safe|vulnerable|unknown, complexity: linear|polynomial (degree n)|exponential|no attack found|unknown, attack?:{repr, length, string|null, sample}, hotspots?:[{start, end, text}], explanation?, fix_hint?, note?}|null, fix_message (ready-to-apply list, null when clean), error? and hint? (invalid patterns), notes, checked_at, open_url}.

Inputs: pattern (required), flags, match, texts, +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Runs a regular expression on real engines — JavaScript (V8), Python (CPython re), PCRE2 and RE2 — reporting each engine's own compile errors with positions, every match with its groups and named groups, replacement results, and where the engines disagree. It also detects catastrophic backtracking (ReDoS), naming the at-risk part of the pattern, generating an attack string, and timing how long each engine actually takes on it.
      2
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to run the same regex in real Python, JavaScript, and optional regex engines side by side, flag disagreements, confirm ReDoS by timing adversarial input in a killed child process, explain patterns, convert Python/JavaScript syntax, preview substitutions, and generate verified test suggestions. All execution is isolated in throwaway processes with hard timeouts and strict input caps.
      7
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides tools to test regex patterns for correctness, performance (ReDoS), and memory usage, and suggests safe rewrites. Enables LLMs to iterate on regex generation with verifiable feedback.
      9
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables users to statically analyze regular expressions for catastrophic-backtracking (ReDoS) risk through real AST parsing rather than executing the pattern, flagging nested quantifiers, ambiguous alternation, and backreferences. It also generates candidate proof-of-concept attack strings with a timeout-guarded test snippet and suggests JavaScript-safe rewrites.
      MIT
    Try in Browser

    Glama MCP Gateway

    Add one secure layer between your agents and this server.

    Resources