Skip to main content
Glama
AgentTanuki

Agent Guild

ag_text_regex_extract

Runs a safe, limited regular expression over provided text and returns matched groups, offsets, and match count.

Instructions

Bounded, safe regex extraction over text.

Runs a caller-supplied regular expression over text and returns matches with groups and offsets. Guarded: pattern length cap, nested-quantifier rejection, match-count cap — safe to expose to strangers.

Deterministic, fixture-verified, free for guests (rate-limited; pass your Guild api_key to use your member budget). Returns the result plus a Guild-signed provenance envelope.

payload MUST match this JSON Schema: {"type": "object", "properties": {"text": {"type": "string", "maxLength": 60000}, "pattern": {"type": "string", "maxLength": 300}, "flags": {"type": "array", "items": {"enum": ["i", "m", "s"]}}, "max_matches": {"type": "integer", "minimum": 1, "maximum": 1000}}, "required": ["text", "pattern"], "additionalProperties": false}

Output schema: {"type": "object", "properties": {"matches": {"type": "array"}, "count": {"type": "integer"}, "truncated": {"type": "boolean"}}, "required": ["matches", "count", "truncated"], "additionalProperties": false}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNo
payloadYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.7.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It discloses determinism, guards, rate-limiting, guest access, and the signed provenance envelope. It does not explicitly state 'read-only' or enumerate error conditions, but the pure regex extraction behavior is reasonably clear.

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?

The description is structured and skimmable, with a concise summary, behavior notes, and an embedded schema. A few phrases like 'safe to expose to strangers' and 'fixture-verified' are somewhat promotional but not distracting.

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 provides the output schema and explains the result includes matches, groups, offsets, and a provenance envelope. It does not cover error cases or invalid regex behavior, but for a focused extraction tool the provided context is sufficient for an agent to call it correctly.

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

Parameters4/5

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

The embedded payload schema adds meaningful constraints for text, pattern, flags, and max_matches, and the api_key sentence explains its purpose. However, the outer input schema allows additional properties for payload while the description says payload must match a schema with additionalProperties false, creating minor ambiguity.

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 clearly identifies the tool as regex extraction over text, explicitly stating it returns matches with groups and offsets. It distinguishes this tool from sibling extraction/parsing tools by focusing on caller-supplied regular expressions and bounded behavior.

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 explains what the tool does and its safety/rate-limiting properties, but it does not explicitly state when to prefer this tool over sibling tools or provide alternative guidance. Usage is implied rather than directly contrasted with similar extraction utilities.

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

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/AgentTanuki/agent-guild'

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