Skip to main content
Glama

Lint JMeter Groovy (JSR223) Script

lint_groovy_script

Statically analyze a Groovy script for a JMeter JSR223 element. Flags Thread.sleep, ${var} interpolation, System.out, BeanShell APIs, per-call Random or Pattern.compile, and bindings such as prev, SampleResult, or sampler that the selected element type does not expose; optionally returns ready-to-paste JMX element XML.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesGroovy script source.
nameNotestname for the generated JMX element (default: element label).
parametersNoSpace-separated parameters available through Parameters and args.
elementTypeNo(default: JSR223PostProcessor)
includeJmxElementNoAlso return the JSR223 element XML with compilation caching enabled (default: true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does so reasonably: it discloses the specific anti-patterns flagged (Thread.sleep, ${var} interpolation, System.out, BeanShell APIs, per-call Random/Pattern.compile) and the element-type-dependent binding check. It also reveals the optional JMX XML return. It does not state that the operation is non-mutating or describe the findings format, but behavior is well characterized.

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?

A single dense sentence, front-loaded with the verb and resource, following immediately with the detection list and the optional output. No filler, though the enumerations make it long and slightly harder to scan.

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 five-parameter, no-annotation, no-output-schema tool, the description covers purpose, detection scope, element-type sensitivity, and the optional XML return, which is most of what an agent needs. The lint findings' structure and the absence of side effects are the remaining gaps.

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 100%, so the schema already documents all five parameters; baseline 3 applies. The description only adds the semantic link that the selected element type determines which bindings are flagged, and that includeJmxElement produces paste-ready XML, without new syntax or format detail.

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?

States a specific verb (statically analyze) and resource (Groovy script for a JMeter JSR223 element), and enumerates the exact defects it detects. This clearly separates it from the sibling lint_jmx_snippet, which operates on JMX, not script source.

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

Usage Guidelines3/5

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

The triggers it detects imply the tool's use case (you have a JSR223 Groovy script and want pre-flight checks), but there is no explicit when-to-use/when-not guidance or reference to alternatives such as get_jsr223_recipe. Usage is inferable rather than stated.

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.