Skip to main content
Glama
matetools

@mate-tools/mcp-server

Official
by matetools

regex_test

Match, replace, or split text via PCRE regex. Provides offsets, capture groups, and ReDoS protection by erroring on catastrophic patterns.

Instructions

Match, replace or split text with a PCRE regular expression. Returns offsets and capture groups. ReDoS-protected: catastrophic patterns return an error rather than hanging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
flagsNoany of i, m, s, u, x
patternYes
operationNomatch_all
replacementNo
split_limitNo
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool returns offsets and capture groups, and notably explains ReDoS protection, which is a valuable behavioral trait. This goes beyond a minimal description, though it doesn't cover every edge case.

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?

The description is two concise sentences, front-loaded with the primary purpose and including safety/behavioral notes. No wasted words.

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 description covers the core functionality and return type, but lacks details on auxiliary parameters (e.g., replacement, split_limit) and does not provide examples. Given the tool's complexity (6 parameters, no output schema), it is minimally complete but not thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 17%, so the description must compensate. It mentions the main operations (match, replace, split) and the regex flavor (PCRE), but does not explain the `replacement` or `split_limit` parameters, nor does it clarify flag behavior beyond the schema.

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?

The description clearly states 'Match, replace or split text with a PCRE regular expression', specifying the exact operations and resource. This differentiates it from sibling text tools like text_cleanup or case_convert, which do not focus on regex operations.

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?

The usage context is clear: use this tool when you need to perform regex match, replace, or split operations. However, it does not explicitly mention alternative tools or when not to use it, so it misses a perfect score.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matetools/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server