add_tcp_sampler
Add a TCP sampler to a JMeter test plan under a parent node, opening a raw TCP connection and sending request data to a specified server and port.
Instructions
Add a TCP Sampler under the given parent (usually a Thread Group), opening a raw TCP connection and sending request data.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"planId": "<planId>",
"parentId": "<parentId>",
"server": "<server>",
"port": "<port>",
"request": "<request>"
},
"name": "add_tcp_sampler"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | TCP Sampler | |
| port | Yes | ||
| planId | Yes | ||
| server | Yes | ||
| noDelay | No | ||
| request | Yes | Data to send over the connection | |
| parentId | Yes | ||
| classname | No | TCP client handler class (short name resolves under org.apache.jmeter.protocol.tcp.sampler) | TCPClientImpl |
| timeoutMs | No | ||
| closeConnection | No | ||
| reUseConnection | No | ||
| connectTimeoutMs | No |