Skip to main content
Glama

regex_test

Test a regular expression against sample text and return every match, capture group and index. Pure CPU, instant. Use to debug a pattern before shipping it.

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": "regex_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoText to test against
flagsNoFlags such as gims
patternYesRegular expression

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed4 schema fields changed
    • addedInput schema / properties / flags
      Added value: +{
      +  "description": "Flags such as gims",
      +  "type": "string"
      +}
    • addedInput schema / properties / pattern
      Added value: +{
      +  "description": "Regular expression",
      +  "type": "string"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Text to test against",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "pattern"
      +]
  4. Added

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does disclose key traits: pure CPU execution, instant/no-network behavior, and non-mutating intent, which together imply a safe read-only computation. It omits the regex flavor/dialect and whether global versus first-match behavior depends on flags, which are the main remaining behavioral questions.

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?

Three short sentences, front-loaded with the action and return values, then the performance trait, then the use case. Nothing is redundant or padded.

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 3-parameter, no-output-schema tool the description is close to self-sufficient; stating that matches, capture groups and indices are returned substitutes well for a missing output schema. The residual gap is the regex dialect and flag behavior, which an agent must guess when constructing calls.

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% (pattern, text, flags all documented), so the schema already does the parameter work and the baseline of 3 applies. The description adds no flag semantics, dialect constraints, or defaulting behavior beyond what the schema states.

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 and resource ('Test a regular expression against sample text') plus the exact return payload ('every match, capture group and index'), which is enough to separate it from siblings like text_replace, extract or data_filter without opening a schema.

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?

Gives a clear usage scenario, 'Use to debug a pattern before shipping it', which tells an agent this is a pre-flight validation tool rather than a production text-transformation tool. It stops short of naming explicit alternatives or when-not-to-use conditions, so it does not reach a 5.

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