Skip to main content
Glama

generate_regex_dfa

Analyzes regular expressions for catastrophic backtracking vulnerabilities and generates safe DFA transition tables to prevent ReDoS attacks.

Instructions

Analyzes regular expressions for catastrophic exponential backtracking vulnerabilities (ReDoS) and generates safe DFA transition tables. (0.01 USDC on Base L2)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadYesInput parameters or JSON string payload for the tool execution
paymentSignatureNoBase L2 USDC micropayment signature or transaction hash for x402 settlement

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden and does add one valuable behavioral fact: the 0.01 USDC Base L2 payment requirement, which explains the purpose of the paymentSignature parameter. However, it fails to disclose what the tool returns, the format of the 'DFA transition tables', or whether the tool only analyzes or also transforms input, leaving significant behavioral gaps.

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?

Two sentences with zero filler: the core function is front-loaded and the cost disclosure is tucked into a compact parenthetical. Every word earns its place, and the description is appropriately sized for the tool's complexity.

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

Completeness3/5

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

The tool is moderately complex with no output schema and no annotations, so the description should compensate by explaining return values or the DFA output format, but it does not. The payment disclosure and function clarity are helpful, yet the missing output format, payload structure, and sibling differentiation leave an agent under-informed for a tool with this much ambiguity.

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 coverage is 100%, so the baseline is 3. The description adds minimal meaning beyond the schema: it reveals that payload contains a regular expression to analyze and that the payment cost is 0.01 USDC, slightly enriching the generic payload schema description ('Input parameters or JSON string payload'). It does not specify the expected JSON structure for payload, which remains ambiguous.

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

Purpose4/5

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

The description uses specific verbs ('Analyzes', 'generates') with a clear resource ('regular expressions') and a concrete output ('safe DFA transition tables'), making the tool's function unambiguous. It covers both parts of the name (regex analysis + DFA generation), though it doesn't explicitly differentiate itself from the close sibling regex_redos_exponential_scanner.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus the nearly identical sibling regex_redos_exponential_scanner. There are no stated prerequisites, exclusions, or context cues to help an agent choose this tool over alternatives, so the agent must infer usage purely from the tool name.

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

Deploy Server

Other Tools