Skip to main content
Glama

regex

regex

Test/replace regex patterns (200 sats/call; free tier 100 calls/mo)

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

Input Schema

NameRequiredDescriptionDefault
textYesInput text to search against.
flagsNoFlags like "g", "i", "m" (default "g").
patternYesRegex pattern string without slashes.
replacementNoOptional replacement text string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

The annotations only declare openWorldHint, so the description carries most of the burden. It usefully discloses cost and quota (200 sats/call, 100 free calls/mo), which is real behavioral context an agent cannot get elsewhere, but it says nothing about what is returned (match list vs replaced string), error behavior on invalid patterns, or whether a replace is idempotent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single compact line with the operation front-loaded and the cost caveat parenthesized, so nothing is wasted. The terseness edges toward under-specification rather than verbosity, but structurally it is clean.

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

Completeness2/5

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

With no output schema, no rich annotations, and two distinct modes, the agent still lacks the return shape and the test-vs-replace output distinction. The pricing note is helpful but does not compensate for missing output and failure semantics on a four-parameter tool.

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 four parameters including flags and the optional replacement are already documented in the schema. The description adds no syntax or format detail beyond that, which makes the baseline score appropriate.

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 a specific verb pair (test/replace) and resource (regex patterns), which is enough for an agent to know it evaluates a pattern against input text and can optionally substitute. It does not differentiate itself from the sibling v_regex, but the core operation 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 only implied: 'test/replace' hints that supplying a replacement switches to replace mode while omitting it performs a test, but this is never stated. There is no guidance on when to prefer this tool over alternatives or on prerequisites such as valid-regex requirements.

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