Skip to main content
Glama

regex_build_pattern

Turn natural language descriptions into functional regex patterns. Specify the regex flavor and optional flags to generate a pattern that matches your intended text.

Instructions

Build a regular expression pattern from a natural language description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flagsNoRegex flags to apply
flavorYesRegex flavor/engine
api_keyNoAPI key for authentication
descriptionYesNatural language description of what the regex should match
Behavior2/5

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

There are no annotations, so the description carries full burden for behavioral disclosure. It only states the action without revealing whether the tool makes an external API call, requires authentication (api_key param hints at it), produces side effects, or returns a pattern string directly.

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 a single, front-loaded, unambiguous sentence with no wasted words or redundant information. It is appropriately sized for the tool's simple high-level purpose.

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?

Without an output schema or annotations, the description leaves out crucial context: what the returned pattern looks like, how api_key is used, error behavior, and how flags/flavor affect results. For a 4-parameter tool with an authentication parameter, this is insufficiently 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 baseline is 3. The description aligns the 'description' parameter with 'natural language description' but does not add new meaning beyond the schema's property descriptions.

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 uses a specific verb (Build), resource (regular expression pattern), and source (natural language description). It clearly distinguishes this from sibling tools like regex_explain and regex_test_cases, which operate on existing patterns rather than constructing new ones.

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 description implies when to use it (when you need a regex pattern from a natural language description), but it does not explicitly state alternatives or when not to use it. No mention of sibling regex tools or conditions for choosing this tool over them.

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/barnburner121/claude-plugin-marketplace'

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