Skip to main content
Glama

devanvil_regex_test

Tests a regex pattern against sample text and statically checks for catastrophic ReDoS risk, running matches in an isolated 250ms sandbox.

Instructions

Analyze a regular expression for catastrophic ReDoS risk statically and execute it inside an isolated 250ms node:vm sandbox.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pattern": "<pattern>",
      "text": "<text>"
    },
    "name": "devanvil_regex_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesTest text to run the pattern against.
flagsNoRegex flags (default "g").
patternYesRegex pattern.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose two meaningful traits: analysis is static, and execution is isolated in a node:vm sandbox with a 250ms cap. It stops short of saying what happens on timeout or a catastrophic pattern, and says nothing about return shape or permissions.

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?

A single sentence with no filler, front-loading the analysis purpose before the execution detail. Every clause carries information an agent cannot get from the name or schema.

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 simple (three flat parameters, no nested objects), but with no output schema the description should say what comes back: match results, a risk verdict, a timeout signal. That return-value gap leaves an agent guessing about the response.

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 all three parameters (pattern, text, flags) are already documented in the schema. The description adds no per-parameter meaning such as flag defaults or pattern syntax expectations, which is the baseline-3 case.

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 pairs specific verbs with a specific resource: statically analyze a regex for ReDoS risk and execute it in a sandbox. That is far more informative than the tool name alone. It does not explicitly contrast itself with any sibling, but the purpose is unambiguous.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: an agent can infer this is for testing a pattern against sample text and checking for ReDoS, but there is no explicit when-to-use, when-not-to-use, or named alternative. The sibling list contains no other regex tool, so the cost of that omission is limited.

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