Skip to main content
Glama

QuassLabs API

regex_lint

Static safety analysis of a regular expression plus an English explanation of what it matches. Parses the pattern into an AST and flags the structures that cause catastrophic backtracking (ReDoS): nested unbounded quantifiers like (a+)+, repeated alternations whose branches can start with the same character like (a|ab)*, adjacent unbounded quantifiers over overlapping character sets like \d+\d+, and implausibly large bounded repeats. The pattern is COMPILED but never EXECUTED against input - running a caller-supplied regex is itself the denial-of-service vector. Detection is a structural heuristic, so a risk of "none" means no known dangerous shape was found, not a proof of safety. Deterministic, no LLM.

Input Schema

NameRequiredDescriptionDefault
flagsNoOptional inline flags, any of "imsxau" (ignorecase, multiline, dotall, verbose, ascii, unicode).
patternYesThe regular expression source, without delimiters. Max 2,000 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the pattern is compiled but never executed, that detection is a structural AST heuristic, and that the tool is deterministic with no LLM. The remaining gap is the absence of any statement about the return shape (findings, risk levels, explanation), which matters because there is no output schema.

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?

Front-loaded with the purpose, then the detection categories with concrete examples, then the critical safety caveat. Every sentence carries information an agent would otherwise have to guess; nothing is padding.

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 two-parameter analysis tool with no annotations, it covers the essential behavior and limits. Without an output schema it should say more about what comes back — e.g., a risk verdict plus explanation fields — rather than only hinting at it via "a risk of 'none'."

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 100%, so both `pattern` and `flags` are already documented in structured data; the description adds no new syntax or constraints beyond restating the pattern. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb+resource — static safety analysis of a regular expression — plus an auxiliary output (English explanation of what it matches). It is unmistakable against lint siblings like story_lint, ticket_lint, and pr_description_lint, which lint prose/config rather than regex structure.

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 makes clear the operating context (ReDoS/backtracking risk analysis) and adds a usage caveat: a risk of "none" means no known dangerous shape was found, not a proof of safety. It does not name an alternative tool or state when-not to use it, so it stops short of the top band.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources