Skip to main content
Glama
juliodelimas

jmeter-mcp-server

by juliodelimas

add_http_sampler

Add an HTTP Request sampler to a JMeter test plan under a specified parent. Define method, path, and optional body; omit domain, port, or protocol to inherit from HTTP Request Defaults.

Instructions

Add an HTTP Request sampler under the given parent node (usually a Thread Group). To inherit protocol, domain or port from an HTTP Request Defaults config element in scope (add_http_request_defaults), leave that argument out of the call - do not pass an empty string or a placeholder, because those fields have no default of their own. Passing an explicit value always overrides the Defaults for that field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
pathYesRequest path, e.g. /v1/users
portNoOmit to inherit from HTTP Request Defaults
domainNoHost name, e.g. api.example.com. Omit to inherit from HTTP Request Defaults
methodYes
planIdYes
bodyJsonNoRaw JSON request body, if any
parentIdYes
protocolNoOmit to inherit from HTTP Request Defaults

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.4.5
    • changedInput schema / properties / domain / description
      Previous value: -"Host name, e.g. api.example.com"New value: +"Host name, e.g. api.example.com. Omit to inherit from HTTP Request Defaults"
    • addedInput schema / properties / port / description
      Added value: +"Omit to inherit from HTTP Request Defaults"
    • removedInput schema / properties / protocol / default
      Removed value: -"https"
    • addedInput schema / properties / protocol / description
      Added value: +"Omit to inherit from HTTP Request Defaults"
    • changedInput schema / required
      Previous value: -[
      -  "planId",
      -  "parentId",
      -  "name",
      -  "method",
      -  "domain",
      -  "path"
      -]New value: +[
      +  "planId",
      +  "parentId",
      +  "name",
      +  "method",
      +  "path"
      +]
  2. First observedv0.1.2

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the inheritance behavior and the critical warning about not passing empty strings/placeholders, which is a behavioral trait beyond what the schema shows. However, it doesn't mention whether the operation is destructive or requires specific permissions, but for an add operation this is less critical. The description adds meaningful behavioral context 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 concise and front-loaded: it states the core action first, then the inheritance rule, then the warning. Every sentence earns its place, and the warning is critical for correct usage. No fluff or repetition.

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?

Given the tool's complexity (9 params, 5 required, no output schema), the description covers the most important behavioral nuance (inheritance) and the key pitfall (empty strings). It doesn't explain return values, but with no output schema that's less critical. The description is complete enough for an agent to call the tool correctly, though it could mention that the sampler is added to a JMeter test plan context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 56%, so the description partially compensates. The description adds crucial semantics for protocol, domain, and port by explaining the inheritance behavior and the warning about empty strings. It also clarifies the parentId parameter ('usually a Thread Group'). However, it doesn't explain planId or bodyJson beyond what the schema already says, but the schema covers those adequately.

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's function: adding an HTTP Request sampler under a parent node, typically a Thread Group. It distinguishes itself from related tools by explicitly referencing add_http_request_defaults and explaining the inheritance relationship, which differentiates it from other add_* samplers like add_jsr223_sampler or add_tcp_sampler.

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?

The description provides explicit guidance on when to use this tool and how to handle inheritance: omit protocol/domain/port arguments to inherit from HTTP Request Defaults, and avoid passing empty strings or placeholders. It also names the related tool add_http_request_defaults, giving clear context for when to use this vs. that tool.

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