Skip to main content
Glama
juliodelimas

jmeter-mcp-server

by juliodelimas

add_jsr223_postprocessor

Add a JSR223 postprocessor to run a script after a sampler or thread group, enabling custom assertions and data extraction in JMeter test plans.

Instructions

Add a JSR223 PostProcessor under an HTTP sampler (or a Thread Group, to apply to every sampler in it), running a script after the sample. Scripts default to Groovy, which only works when JMeter runs on a compatible Java (17 is the safe choice; the Groovy bundled with JMeter 5.6.x fails on very new Java such as 25+, killing each virtual user on its first script run) - the result carries a "warning" field when this server detects a mismatch. For unique or random data, prefer the built-in functions ${__UUID}, ${__RandomString} and ${__Random}, which need no script at all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoJSR223 PostProcessor
planIdYes
scriptYes
parentIdYes
parametersNo
scriptLanguageNogroovy

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.5

TDQS

A4.4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It discloses that scripts default to Groovy, that Groovy can fail on very new Java (killing virtual users), and that the result carries a warning field on mismatch. This is rich behavioral disclosure beyond the schema.

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?

The description is front-loaded with the core action and placement, then adds critical compatibility notes and an alternative. Each sentence earns its place; it is long but information-dense without fluff.

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 complex scripting tool with no output schema, the description covers placement, language, failure modes, and an alternative. It omits the meaning of the 'parameters' string and doesn't state how the script's return value affects the sample, but core invocation details are present. Slightly incomplete on parameter semantics.

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 compensate. It mentions the scriptLanguage default (groovy) and that the script is the core, but does not explain planId, parentId, parameters, or the other language options. The description adds minimal parameter-level meaning beyond the schema defaults.

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 tool adds a JSR223 PostProcessor, specifies placement (under an HTTP sampler or Thread Group), and its function (running a script after the sample). It distinguishes itself from the sibling add_jsr223_preprocessor by explicitly noting 'after the sample'.

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 usage context: placement options, default script language, Java compatibility warning, and a direct alternative (built-in functions like ${__UUID}) for random data. It also implies when not to use a script, making selection guidance strong.

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