Skip to main content
Glama
juliodelimas

jmeter-mcp-server

by juliodelimas

add_if_controller

Add an If Controller to a test plan so child samplers run only when a JavaScript condition evaluates true after variable substitution.

Instructions

Add an If Controller under the given parent (usually a Thread Group). Samplers added under it (as its children) only run when the condition evaluates truthy. condition is evaluated as a real JavaScript (Rhino) expression after JMeter substitutes any ${var} references, so comparisons work directly, e.g. '${count} < 10' or '"${status}" == "ok"'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoIf Controller
planIdYes
parentIdYes
conditionYesJavaScript boolean expression evaluated after ${var} substitution, e.g. '${count} < 10'
evaluateAllNoEvaluate the condition for every iteration, not just the first

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.5

TDQS

A3.7/5.0
Behavior3/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 samplers run only when the condition is truthy and that the condition is evaluated as a JavaScript expression after variable substitution. However, it omits the default evaluation timing (first iteration only unless evaluateAll is true) and any side effects or failure behavior, which are important for a complete behavioral picture.

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 two concise sentences, front-loaded with the primary action and purpose, and includes practical examples. Every sentence adds value without redundancy, making it efficient for an agent to parse quickly.

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 5-parameter creation tool with no output schema, the description covers the core purpose and condition semantics but misses key operational details such as the default evaluation behavior (evaluateAll=false), what the tool returns (e.g., created node ID), and any prerequisites or validations for parentId. This leaves the agent without full guidance for a correct invocation.

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 coverage is only 40%, so the description must compensate for undocumented parameters. It adds substantial meaning for 'condition' with examples and clarifies the JavaScript/Rhino evaluation, but does not elaborate on 'planId', 'parentId', or 'name' beyond what the schema shows. It partially fills the gap but leaves other parameters to be inferred from context.

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 specific verb ('Add') and resource ('If Controller'), clarifies placement under a parent, and explains the conditional execution of child samplers. It clearly distinguishes this tool from sibling controllers like add_while_controller or add_loop_controller by specifying the 'If' type and its condition-based behavior.

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 description implies usage for conditional execution but does not explicitly compare with alternatives or state when not to use it. It gives context (parent is usually a Thread Group) and condition evaluation details, but no direct guidance on choosing this over while/loop/random controllers. This leaves the agent to infer the appropriate use case.

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