Skip to main content
Glama

Tinplate Edge AI Safety, Security & EU Compliance

tinplate_regex_safety

Read-onlyIdempotent

Regex ReDoS Vulnerability Scanner & Pattern Explainer API: Audit regular expressions for O(2^n) ReDoS backtracking, explain patterns, and test matches. (Endpoint: POST /v1/regex-safety)

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>"
    },
    "name": "tinplate_regex_safety"
  }
}

Input Schema

NameRequiredDescriptionDefault
flagsNoOptional ECMAScript RegExp flags (e.g. 'i', 'g', 'm', 's', 'u', 'v').
patternYesRegular expression pattern string (without surrounding /.../ slashes, or in /pattern/flags literal format).
test_stringsNoOptional sample strings (max 512 chars each) to test against the pattern when safe to execute.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed13 schema fields changed
    • addedInput schema / properties / flags / default
      Added value: +""
    • changedInput schema / properties / flags / description
      Previous value: -"Parameter 'flags' (e.g. \"i\")"New value: +"Optional ECMAScript RegExp flags (e.g. 'i', 'g', 'm', 's', 'u', 'v')."
    • addedInput schema / properties / flags / example
      Added value: +"i"
    • addedInput schema / properties / flags / maxLength
      Added value: +16
    • changedInput schema / properties / pattern / description
      Previous value: -"Parameter 'pattern' (e.g. \"^([a-zA-Z0-9_]+)+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,}$\")"New value: +"Regular expression pattern string (without surrounding /.../ slashes, or in /pattern/flags literal format)."
    • addedInput schema / properties / pattern / example
      Added value: +"^([a-zA-Z0-9_]+)+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
    • addedInput schema / properties / pattern / maxLength
      Added value: +8192
    • addedInput schema / properties / pattern / minLength
      Added value: +1
    • changedInput schema / properties / test_strings / description
      Previous value: -"Array parameter 'test_strings'"New value: +"Optional sample strings (max 512 chars each) to test against the pattern when safe to execute."
    • addedInput schema / properties / test_strings / example
      Added value: +[
      +  "alice@example.com",
      +  "invalid-email@"
      +]
    • addedInput schema / properties / test_strings / items / maxLength
      Added value: +512
    • addedInput schema / properties / test_strings / maxItems
      Added value: +20
    • changedInput schema / required
      Previous value: -[
      -  "pattern",
      -  "flags"
      -]New value: +[
      +  "pattern"
      +]
  3. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so safety is covered. The description adds the concrete endpoint (POST /v1/regex-safety) and, via the schema, the important nuance that test strings are only exercised 'when safe to execute', but it says nothing about severity output or limits beyond that.

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 front-loaded sentence: capability triples first, endpoint last. No filler, and an agent can grasp the scope in one read.

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?

For a scanner with no output schema, the description never characterizes the returned result (vulnerability verdict, severity, explanation text), which is exactly the information an agent would need to act on the output. It is otherwise complete for the inputs, which the schema fully covers.

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% and each parameter (pattern, flags, test_strings) is documented with format, length limits, and examples. The description adds no meaning beyond the schema, so the baseline 3 applies.

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 names specific verbs+resources: auditing regexes for O(2^n) ReDoS backtracking, explaining patterns, and testing matches. That is far more concrete than the tool name alone, though it makes no explicit distinction from the many other 'tinplate_' guard/scanner siblings.

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: the tool is for checking a regex's ReDoS safety before use. There is no explicit when-to-use/when-not-to-use guidance, no mention of prerequisites, and no named alternative when the goal is something else (e.g., secret or PII scanning).

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