Skip to main content
Glama

Validar expresión regular

validar_regex

Ejecuta un patrón de expresión regular (motor nativo de JavaScript) contra una lista de strings de prueba y devuelve, para cada uno, si hizo match, el match completo y los grupos capturados. Usa RegExp real, no una suposición del modelo sobre qué haría el patrón. Cuesta $0.02 USDC (Base) por llamada.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flagsNoFlags de RegExp de JavaScript a aplicar (ej: "gi" para global + case-insensitive). Vacío por defecto.
patternYesEl patrón de la expresión regular, sin delimitadores de barra (ej: "^[0-9]{3}-[0-9]{4}$", no "/^[0-9]{3}-[0-9]{4}$/").
test_stringsYesLista de strings a evaluar contra el patrón, uno por uno. Máximo 50 strings, 2000 caracteres cada uno.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorYesMensaje de error si valid_pattern es false; null si es válido.
resultsYesUn resultado por cada test_string, en el mismo orden en que se recibieron.
valid_patternYesfalse si el patrón no es una expresión regular válida en JS.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full transparency burden. It discloses the use of the native JavaScript engine, per-call cost, and the output structure (match, full match, captured groups). However, it does not mention error handling for invalid regex patterns or potential timeouts, which is a minor gap.

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 three sentences long, front-loaded with the main verb 'Ejecuta' and resource. Every sentence adds value: function, reliability disclaimer, and cost. No wasted words, ideal for quick agent parsing.

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?

The description covers the tool's core purpose, output details, and cost, and an output schema exists to handle return values. It does not explain behavior for invalid regex or edge cases, but that is a minor omission given the tool's simplicity and other structured metadata. Overall, it is adequately complete.

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 the input schema already fully documents all three parameters. The description adds no additional parameter-level detail, merely restating 'patrón' and 'strings de prueba' conceptually. Baseline 3 is appropriate here.

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 states a specific verb ('Ejecuta') and resource ('expresión regular'), and clearly differentiates itself from sibling validators (validar_cron, validar_sql) by focusing on regex execution. It also explains what it returns, making its purpose unambiguous.

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 description implies usage for validating regex against test strings and emphasizes that it uses the real JavaScript engine rather than a model's guess, which is a strong guideline for when to rely on it. It does not explicitly mention alternatives like validar_cron or validar_sql, but the sibling list and regex-specific wording provide sufficient context.

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.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool targets a completely different domain: cron expressions, regular expressions, and SQL queries. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow the same 'validar_' prefix followed by the target domain (cron, regex, sql). This creates a clear and predictable pattern.

Tool Count5/5

With exactly three tools for three distinct validation areas, the count is well-scoped and each tool justifies its existence.

Completeness5/5

The server fully covers the stated purpose of validating cron, regex, and SQL. Each tool provides meaningful execution and results, leaving no obvious gaps.