Skip to main content
Glama

Test an MPB regex

mpb_test_regex
Read-only

Tests a regular expression against a sample string using MPB's regex engine, matching the check used for metric and property extraction in the MPB UI.

Instructions

Runs a regular expression against a sample string with MPB's own regex engine, the same check the MPB UI uses for metric/property extraction.

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": {
      "regex": "<regex>",
      "sample": "<sample>"
    },
    "name": "mpb_test_regex"
  }
}

Input Schema

NameRequiredDescriptionDefault
regexYes
sampleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3/5.0
Behavior3/5

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

The annotations already establish readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so safety is covered. The description adds genuinely useful behavior context by stating that evaluation uses MPB's own engine and matches the UI's check, which signals fidelity to production behavior. It does not disclose the result shape (match/no-match, capture groups) or any dialect or performance limits of the engine.

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?

It is a single compact sentence that front-loads the action and adds a differentiating clause about engine fidelity. There is no filler, though the sentence is dense enough that a second short sentence about return values would have been well spent.

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

Completeness3/5

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

For a simple two-parameter, read-only test tool, the description covers what is evaluated and with which engine. Since there is no output schema, it should say what the agent gets back (a boolean, match positions, captured groups, errors), and that omission leaves a material gap.

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?

Schema description coverage is 0%, so the description must carry parameter meaning and it largely does not. It maps loosely to the two parameters via 'regular expression' and 'sample string', but says nothing about regex syntax or dialect, escaping, anchoring, or whether the sample is matched wholly or partially.

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 has a specific verb ('Runs a regular expression') and a specific object ('against a sample string'), and it clarifies the engine used ('MPB's own regex engine'). It does not name sibling tools such as mpb_test_source, so the distinction from siblings is only implied through the regex-vs-source framing.

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?

There is no explicit when-to-use or when-not-to-use guidance; there are no named alternatives and no prerequisites. The phrase 'the same check the MPB UI uses for metric/property extraction' gives only indirect context for the tool's role, leaving the agent to infer that it is for validating extraction regexes before applying them.

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