Import Script
import_scriptImport an open-source load test (JMeter .jmx, k6 .js, or Locust .py) into an existing script, converting it to Loadster commands. An import may create script assets, datasets, and a scenario; replace=true also replaces the script's existing commands and variables. Returns action items to review. For OpenAPI/Swagger or Postman, read the spec yourself and build commands with create_script instead.
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": {
"projectId": "<projectId>",
"scriptId": "<scriptId>",
"source": "<source>",
"content": "<content>"
},
"name": "import_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | The source tool: jmeter, k6, or locust. | |
| baseUrl | No | Optional base URL to prefix relative requests. | |
| content | Yes | The source file content (the .jmx XML, .js, or .py text). | |
| replace | No | Replace existing commands (true) or append to them (false). Defaults to false. | |
| scriptId | Yes | The script id to import into (create an empty script first). | |
| projectId | Yes |