Skip to main content
Glama
Jambozx

OnlineCyberTools MCP (280+ filterable tools)

webdev_regex_tester

Read-onlyIdempotent

Test JavaScript regular expressions against sample text to find matches, capture groups, and preview find-and-replace results. Validate patterns safely without executing code.

Instructions

Regular Expression Tester (Match / Replace). Test a JavaScript-flavoured regular expression against sample text, returning every match with its position and capture groups, and optionally a regex find-and-replace preview. Set the flags object to toggle global, ignoreCase, multiline, and dotAll behaviour; supply replacement to also get the replaced string. Safe by design - it compiles and runs the pattern on the text you provide only, executes no arbitrary code, reaches no network, database, or filesystem, and is rate-limited (60 requests/minute for anonymous callers). Use this to debug or validate a pattern and inspect groups; use text_find_replace for plain text substitution without regex internals. Returns matches (text, index, end, captures), a replaceResult string, a pattern analysis summary, the resolved flag string, and an error message on invalid patterns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesThe regular expression body without slashes or inline flags (for example a digit-class pattern). Must not be blank; an invalid pattern returns an error field instead of throwing.
testStringYesThe sample text the pattern is run against. Must not be blank. Also accepted under the legacy key text.
flagsNoOptional regex flag toggles assembled into a flag string. Omitted flags use their defaults.
replacementNoOptional replacement string for a find-and-replace preview (supports dollar-1 and named backreferences). When blank, replaceResult is empty. Also accepted under the legacy key replacePattern.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successNoTrue when the pattern compiled and ran without error.
patternNoThe submitted regex pattern, echoed back.
textNoThe submitted test string, echoed back.
flagsNoThe resolved flag string built from the flags object (for example gi).
flagOptionsNoThe effective flag toggles after defaults were applied.
replacementNoThe submitted replacement string, echoed back.
matchesNoOne entry per match (or a single entry when global is false).
replaceResultNoThe text after applying replacement, or empty when no replacement was given.
patternAnalysisNoStructural summary of the pattern, or null when the pattern or text was empty.
errorNoNull on success; an invalid-regex-pattern message when compilation failed.
Behavior5/5

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

Discloses safety guarantees (no arbitrary code, no network/database/filesystem), rate limits, and that invalid patterns return error field. Annotations already indicate read-only, idempotent, non-destructive; description adds context beyond annotations without contradiction.

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?

Slightly verbose but front-loaded with main purpose. Each sentence adds value. Could be more concise but well-organized.

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

Completeness5/5

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

Output schema exists (not shown but implied). Description covers return fields and error handling. With high schema coverage and annotations, the description is fully adequate for the tool's complexity.

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

Parameters4/5

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

Schema covers 100% of parameters with descriptions. Description adds value by noting legacy keys (text, replacePattern), explaining replacement supports dollar-1 and named backreferences, and clarifying replaceResult behavior. Baseline 3 plus extra context warrants 4.

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?

Describes a regex tester for match/replace with specific verb 'test' and resource 'regular expression against sample text'. Distinguishes from sibling text_find_replace by highlighting regex internals vs plain text substitution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: 'Use this to debug or validate a pattern and inspect groups' and when not: 'use text_find_replace for plain text substitution without regex internals'. Also mentions safety and rate limiting.

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/Jambozx/onlinecybertools-mcp-server'

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