Skip to main content
Glama

Regex from English

regex-from-english
Read-only

Writes a JavaScript regex from a plain-English description, compiles it, and tests it against your sample strings. Returns { pattern, flags, literal, explanation, tests: [{ input, expected, got }], passed, total } Price: 3 credits (1 credit = 1 CAD cent) per successful call; input that does not match the schema is rejected before billing.

Input Schema

NameRequiredDescriptionDefault
descriptionYesWhat the regex should match, in plain English.
should_matchNoStrings that must match.
should_not_matchNoStrings that must not match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations: it discloses the exact return shape (pattern, flags, literal, explanation, tests, passed, total), the compile-and-test behavior, the cost model (3 credits per successful call, 1 credit = 1 CAD cent), and that schema-invalid input is rejected before billing. Pricing and billing-failure semantics are exactly the kind of context annotations cannot convey.

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 sentences, front-loaded with the core action, followed by the return contract and billing terms. The inline return-object listing is dense but earns its place because no output schema exists.

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?

For a 3-param generative tool with no output schema, the description supplies the return structure, the testing behavior, and billing/validation rules, while the schema fully covers inputs. Nothing an agent needs before calling is missing.

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 three parameters are already documented in the schema. The description only gestures at the sample-string arrays via 'your sample strings' and does not explain the expected/got comparison or how mismatches are surfaced, so it adds little beyond the structured fields — baseline 3 applies.

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 — writes a JavaScript regex from a plain-English description — and adds that it compiles and tests the result. This inherently distinguishes it from the regex-test sibling, which consumes an existing pattern rather than producing one, so an agent need not open either schema to choose.

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?

The phrase 'tests it against your sample strings' implies the intended workflow (supply should_match/should_not_match to validate), but there is no explicit when-to-use, when-not, or named alternative such as regex-test. Usage is inferable rather than stated.

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