Skip to main content
Glama

validate_custom_pattern

Validates a custom regex pattern and rule metadata before adding it to the tech debt rule set, helping prevent invalid or misconfigured rules.

Instructions

Validate a custom pattern before adding it as a rule.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>",
      "pattern": "<pattern>",
      "message": "<message>",
      "severity": "<severity>",
      "category": "<category>"
    },
    "name": "validate_custom_pattern"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesUnique identifier for the rule
messageYesIssue title/message
patternYesRegex pattern to validate
categoryYesDebt category
severityYesIssue severity level

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full burden of behavioral disclosure and only says a validation occurs. It does not say what is checked (regex syntax, ReDoS/backtracking risk, duplicate id collisions, category/severity consistency) or whether the tool is read-only or has side effects.

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?

A single front-loaded sentence with no filler; the purpose and timing land immediately. It is arguably too terse for the amount of behavior it leaves unstated, but nothing in it is wasted.

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

Completeness2/5

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

This is a five-required-parameter tool with no annotations and no output schema, so the description is the only place to explain outcomes such as pass/fail reporting. It says nothing about what a successful or failed validation returns, which leaves an agent unable to plan around the call.

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% with two enumerated parameters, so all five fields are already documented in the schema. The description adds no meaning beyond it — for example, it does not say whether `id` is checked against existing rules or whether `pattern` must be anchored.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ("Validate a custom pattern") and frames the result as a gate on rule creation. It implicitly distinguishes itself from add_custom_rule by making the validation step a prerequisite, though it never names that sibling.

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?

"before adding it as a rule" gives a clear trigger point for when to call it, which is useful ordering guidance. There is no statement about when to skip it, what happens if the pattern was already validated, or what to do after a failure.

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