Skip to main content
Glama

Stackhal

Convert Regex Between Engines

transpile_regex_engine
Read-only

Transpile and analyze regular expressions across engines (PCRE, Go RE2, JavaScript, Python re, Rust regex) with compatibility checks and ReDoS safety analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesThe regular expression pattern string to analyze and transpile.
source_engineNoOptional source engine: "pcre" (default), "go_re2", "javascript", "python", "rust".pcre
target_engineNoOptional target engine: "go_re2" (default), "pcre", "javascript", "python", "rust".go_re2

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, so safety is already covered. The description adds real value beyond them by disclosing that the tool also performs compatibility checks and ReDoS safety analysis, which tells an agent to expect diagnostic output rather than a bare converted string.

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?

A single front-loaded sentence with no filler; every clause (engines, compatibility checks, ReDoS analysis) carries distinct information.

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, read-only tool with full schema coverage and no output schema, the description is nearly sufficient — it names the engines and the two analysis behaviors. It stops short of saying anything about the shape or content of the result, which an agent would benefit from given there is no output schema.

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 coverage is 100% and each parameter carries its own engine-list description, so the schema does the heavy lifting. The description repeats the engine names but adds no dialect-specific syntax or defaults beyond what is already documented; 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 specific verbs (transpile and analyze) plus the resource (regular expressions) and enumerates the exact engines involved. Nothing among the siblings touches regex, and the scope 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?

The implied use case — moving a pattern from one engine's dialect to another — is clear from the engine list, but the description never states when to use this versus, say, a plain analyzer, nor any prerequisites (e.g., that source_engine must match the dialect actually in use).

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.