Skip to main content
Glama

tool_regex

Apply regular expression patterns to text for matching, testing, or replacing. Provide the text, pattern, flags, and optional replacement to receive matches and test results.

Instructions

[text] Regex

Parameters:

  • text (string): Text

  • pattern (string): Pattern

  • flags (string): Flags

  • replacement (string): Replacement

Outputs:

  • matches (json): Matches

  • test (string): Test

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testNoTest
textNoText
flagsNoFlags
matchesNoMatches
patternNoPattern
replacementNoReplacement
Behavior1/5

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

No annotations are provided and the description fails to disclose any behavioral traits. It does not explain whether this tool performs replacement, global matching, or how the 'test' and 'matches' outputs are produced. This is a significant gap for a tool with six parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is minimal but under-specified rather than concise. It is a bare list of parameters and outputs without explanatory sentences, which is not effective conciseness.

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

Completeness1/5

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

For a regex utility with six parameters and no output schema, the description is incomplete. It does not explain how the tool behaves, how outputs are formatted, or how the parameters interact, leaving the agent without enough context to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the schema descriptions are merely placeholder words ('Text', 'Pattern', 'Flags', 'Replacement'). The tool description adds no semantic meaning beyond the parameter names, leaving an agent without understanding that 'pattern' is a regex pattern or what flag syntax is expected.

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

Purpose2/5

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

The description 'Regex' is essentially a restatement of the tool name, indicating the general domain but with no specific verb or operation (e.g., match, replace, test). It does not differentiate from sibling tools like tool_string or tool_json.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives, no prerequisites, and no exclusions. The description simply lists parameters and outputs without contextualizing when regex operations would be appropriate.

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/maple-awa/tool-mcp'

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