Skip to main content
Glama

TinyFn

find_all_matches

Find all matches of a pattern in text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to search
flagsNoFlags: i=ignore case, m=multiline, s=dotall
patternYesRegular expression pattern

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
countNo
errorNo
matchesNo
patternYes
valid_patternNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3/5.0
Behavior2/5

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

With no annotations, the description must fully disclose behavior. It only says 'Find all matches' without explaining that the pattern is a regular expression, how matches are returned (e.g., array of strings or indices), or the effect of flags. This is insufficient for an agent to anticipate tool behavior.

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

Conciseness3/5

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

The description is a single sentence with no waste, but it is too terse and omits critical details like the fact that the pattern is a regular expression. Conciseness is achieved at the expense of clarity, resulting in a middling score.

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?

Given the presence of an output schema, the description is somewhat relieved of explaining return values. However, the tool has 3 parameters and relates to regex, and the description fails to convey the fundamental nature of the pattern (regex) or how flags modify behavior. It is minimally complete but lacks key context.

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?

The input schema already provides descriptions for all three parameters (text, pattern, flags) with 100% coverage. The description adds no additional meaning or context beyond what is in the schema, so it meets the baseline expectation.

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 states the action ('Find all matches') and the resource ('pattern in text'). It distinguishes from sibling tools like 'test_pattern' (which tests existence) and 'regex_replace' (which replaces), 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 Guidelines2/5

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

No guidance is provided on when to use this tool over alternatives like 'test_pattern', 'contains', or 'extract_groups'. There is no mention of typical use cases or exclusions, leaving the agent to infer usage without support.

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.