Skip to main content
Glama

ToolForte

Regex Tester

test_regex
Read-onlyIdempotent

Run a JavaScript regular expression against a test string using a real regex engine. Returns all matches with capture groups and indices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to run the expression against
flagsNoRegex flags such as g, i, m, s, u (default g)g
patternYesJavaScript regular expression source, without the slashes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of items
resultNoThe result, when it is not an object
matchesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
  2. Changed4 schema fields changed
    • addedInput schema / properties / flags / description
      Added value: +"Regex flags such as g, i, m, s, u (default g)"
    • addedInput schema / properties / pattern / description
      Added value: +"JavaScript regular expression source, without the slashes"
    • addedInput schema / properties / text / description
      Added value: +"The text to run the expression against"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "count": {
      +      "description": "Number of items",
      +      "type": "number"
      +    },
      +    "matches": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "result": {
      +      "description": "The result, when it is not an object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed4 schema fields changed
    • removedInput schema / properties / flags / description
      Removed value: -"Regex flags such as g, i, m, s, u (default g)"
    • removedInput schema / properties / pattern / description
      Removed value: -"JavaScript regular expression source, without the slashes"
    • removedInput schema / properties / text / description
      Removed value: -"The text to run the expression against"
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "https://json-schema.org/draft/2020-12/schema",
      -  "additionalProperties": {},
      -  "properties": {
      -    "count": {
      -      "description": "Number of items",
      -      "type": "number"
      -    },
      -    "matches": {
      -      "items": {},
      -      "type": "array"
      -    },
      -    "result": {
      -      "description": "The result, when it is not an object"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  4. Changed4 schema fields changed
    • addedInput schema / properties / flags / description
      Added value: +"Regex flags such as g, i, m, s, u (default g)"
    • addedInput schema / properties / pattern / description
      Added value: +"JavaScript regular expression source, without the slashes"
    • addedInput schema / properties / text / description
      Added value: +"The text to run the expression against"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "count": {
      +      "description": "Number of items",
      +      "type": "number"
      +    },
      +    "matches": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "result": {
      +      "description": "The result, when it is not an object"
      +    }
      +  },
      +  "type": "object"
      +}
  5. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world). The description adds meaningful behavior beyond that: it uses a real JS regex engine and returns all matches with capture groups and indices, which tells the agent what to expect.

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 tight sentences, front-loaded with the core action and followed by the return shape. No wasted words.

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 simple pure-function tool with full annotation coverage, complete schema descriptions, and an output schema, the description is sufficient. Only minor gap is no mention of behavior on invalid patterns.

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 pattern, text, and flags are already well documented with defaults and max lengths. The description adds no parameter-level detail, so 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?

States a specific verb (run) and resource (JavaScript regular expression against a test string), and clarifies it uses a real regex engine and returns matches with groups/indices. Clear purpose, though it doesn't explicitly differentiate from 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 by the name and description (testing a regex pattern), but there is no explicit when-to-use/when-not guidance or mention of alternatives like text_diff. Minimum viable context only.

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