Skip to main content
Glama
juliodelimas

jmeter-mcp-server

by juliodelimas

add_xpath_extractor

Add an XPath extractor to an HTTP sampler to capture a value from an XML/HTML response into a JMeter variable, with optional tolerant parsing for real-world HTML.

Instructions

Add an XPath Extractor under an HTTP sampler, to save a value from an XML/HTML response into a variable using an XPath expression. Set tolerant=true for real-world (non-strict) HTML.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoXPath Extractor
planIdYes
parentIdYesId of the HTTP sampler node this extractor applies to
tolerantNoUse a lenient HTML parser instead of a strict XML parser
xpathQueryYes
matchNumberNoWhich match to use (1 = first)
defaultValueNoNOT_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
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It provides a useful tip about setting tolerant=true for non-strict HTML, implying the parser behavior. However, it does not disclose what happens when no match occurs (defaultValue defaults to NOT_FOUND) or that matchNumber defaults to the first match, which are relevant behaviors for an extractor.

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 compact sentences, with the primary purpose front-loaded and a specific operational tip in the second sentence. There is no filler, repetition, or unnecessary detail; 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 a simple add-element operation with no output schema, the description covers the core purpose, placement, and a key behavioral toggle. Minor gaps remain around no-match handling and match selection, but the schema covers those defaults, making the overall description adequately complete.

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 50%, so the description must compensate for the four undocumented parameters. It adds context for xpathQuery (it is an XPath expression) and clarifies the tolerant parameter's purpose, but does not explain defaultValue, name, or planId beyond what the schema already provides. Moderate value, not full compensation.

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 states a clear verb ('Add'), a specific resource ('an XPath Extractor'), and its placement ('under an HTTP sampler'). It further specifies the function: extracting a value from XML/HTML responses via XPath. This clearly distinguishes it from sibling tools like add_regex_extractor and add_json_extractor.

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

Usage Guidelines4/5

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

The description gives explicit context for when to use this tool: when the response is XML/HTML and the extraction method is XPath, placed under an HTTP sampler. It does not name alternatives or exclusions, but the conditions are specific enough for an agent to select correctly among similar add_* extractor tools.

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