tm_update_profile
Modify an existing traffic profile by ID, updating only specified fields (duration, target URL, RPS curve) while preserving others. Prevents duplicate names on rename.
Instructions
Update an existing profile by id. Fields you omit are kept as-is.
The underlying API endpoint is a full PUT (the request body replaces every field of the profile), but exposing that directly would force the AI to GET-then-PUT in two calls for every tweak. This tool does the read-merge-write internally: fetches the current profile, overlays the kwargs you provided, PUTs the merged body back.
Use this when you know the profile's id. Examples:
"Make this profile last 5 minutes instead of 1" → call with
profile_id=42, duration_seconds=300."Switch the target to staging" →
profile_id=42, target_url='https://staging.example.com/api'."Replace the RPS curve" →
profile_id=42, points=[...].
Fields not yet exposed (scripts / alerts / schedule) are preserved verbatim from the existing profile.
Rename caveat: the server's PUT endpoint correctly routes
by path id (it pins the request body's profile id to the
path id, so the save path takes its id-based update branch).
But the server does NOT enforce name uniqueness, so a
rename to another profile's name would create a duplicate-
named pair. To keep the data model clean and AI workflows
predictable, this tool still pre-flights a GET /profiles
whenever the name kwarg changes the current value, and
raises :class:ToolError if the new name collides with any
other profile (whitespace + case-insensitive match, mirroring
the server's normalization). Updates that don't change the
name skip this check entirely (no extra roundtrip).
Returns the full updated profile dict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile_id | Yes | ||
| name | No | ||
| target_url | No | ||
| duration_seconds | No | ||
| points | No | ||
| http_method | No | ||
| request_body | No | ||
| request_headers | No | ||
| loop | No |