tm_import_capture
Import selected groups from an analysed JSONL capture as traffic profiles for load testing. Select groups by method and URL skeleton, and optionally name the profiles.
Instructions
Import the chosen groups from an analysed JSONL capture as real traffic profiles.
Workflow: call :func:tm_analyse_capture first to inspect the
derived groups (method + URL skeleton + variables + RPS curve);
pick the ones you want to persist; pass them here as
selections.
capture_path must be the SAME JSONL file you analysed —
server re-derives the analysis on commit (the preview response
deliberately doesn't carry full per-row values, so trusting
client-supplied preview data would be both heavy and tamper-
able). The path resolves under $TM_MCP_CAPTURE_ROOT with
the same security checks as tm_analyse_capture.
selections is a dict of shape::
{
"groups": [
{
"method": "POST",
"urlSkeleton": "https://api.example.com/api/x",
"profileName": "load-test users" # optional
},
...
]
}Each (method, urlSkeleton) pair must match a group returned
by the prior tm_analyse_capture call exactly — index-based
references would be fragile across re-analysis (groups sort by
row count, ties break alphabetically). profileName is
optional; omit / null lets the server pick a default like
"[capture] POST /api/x". Empty groups list is allowed
(no-op; result reports zero profiles created).
Returns the server's import result: createdProfiles (array
of {profileId, name}), createdVariablesSetCount,
skippedSelections (with reasons), warnings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| capture_path | Yes | ||
| selections | Yes |