Skip to main content
Glama
juliodelimas

jmeter-mcp-server

by juliodelimas

add_regex_extractor

Extract values from non-JSON HTTP responses via regex capture groups and save them as JMeter variables. Add an extractor under an HTTP sampler to store matched response data.

Instructions

Add a Regular Expression Extractor under an HTTP sampler, to save a value from its response (body, headers, etc.) into a variable using a regex capture group. Use this instead of add_json_extractor for non-JSON (HTML/XML/plain-text) responses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoRegular Expression Extractor
regexYesRegular expression with at least one capture group
planIdYes
parentIdYesId of the HTTP sampler node this extractor applies to
templateNoWhich capture group(s) to store, e.g. '$1$'$1$
matchNumberNoWhich match to use (1 = first); 0 = random match; negative = all matches
defaultValueNoValue to use if the regex doesn't matchNOT_FOUND
referenceNameYesJMeter variable name to store the extracted value in

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.5

TDQS

A4/5.0
Behavior2/5

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

Annotations are absent, so the description carries the full burden of behavioral disclosure. It mentions what the tool does but not any side effects, failure conditions (e.g., if parentId is not an HTTP sampler), or whether the operation can overwrite existing elements. For an add operation that modifies the test plan, this lack of detail is a significant gap.

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?

Two sentences with no filler. The core purpose is front-loaded, and the usage guidance is efficiently integrated. Every sentence earns its place.

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?

For an 8-parameter tool with a 75% schema coverage and no output schema, the description covers purpose and usage guidance but omits details about error handling and behavioral effects on the test plan. It is reasonably complete for a typical agent, but the lack of behavioral disclosure (as noted) prevents a perfect score.

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 75%, so most parameters are already documented in the schema. The description adds no new parameter-specific information beyond restating the purpose. Baseline 3 is appropriate since the schema handles the heavy lifting.

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 (Add a Regular Expression Extractor), the target (under an HTTP sampler), and the purpose (save a value from response into a variable using a regex capture group). It also explicitly contrasts with add_json_extractor, distinguishing it from a sibling tool.

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

Usage Guidelines5/5

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

Provides explicit guidance: 'Use this instead of add_json_extractor for non-JSON (HTML/XML/plain-text) responses.' This names the alternative and the condition that selects this tool, leaving no ambiguity about when to use it.

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