Inject Traffic
simulation.inject_trafficChange traffic on a demo simulation using targetRps, deltaPercent, or explicit random: true. targetRps takes precedence over deltaPercent; random cannot be combined with either. Missing or unknown selectors are rejected, and no random spike is selected implicitly. Absolute targets are capped at 10000 RPS in demo mode. The change affects metrics after the next simulation.step. For Redis Cache Crash & Recovery, the default 5,000 RPS load has no active pattern, so this controlled traffic update also works after replay identity finalizes. Do not use it to read metrics (simulation.metrics) or advance time (simulation.step). Pass the simulationId returned by simulation.create when your connector opens a fresh MCP session; preserve Mcp-Session-Id to use the omitted-ID current-simulation default. Returns the updated simulation with its new traffic level; the likely next tool is simulation.step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| random | No | Explicitly select a random stress spike; never selected implicitly. | |
| targetRps | No | Absolute traffic level in RPS to set. Server-capped at 10000 RPS in demo mode. | |
| deltaPercent | No | Relative traffic change; must be greater than -100. | |
| simulationId | No | Simulation ID returned by simulation.create. Preserve Mcp-Session-Id to omit this field and use the session's current simulation; if your connector starts a fresh MCP session for each call (for example Grok Bot or Cursor), pass this explicit ID after every fresh initialization. A fresh session has no current-simulation pointer and returns NO_ACTIVE_SIMULATION when the ID is omitted. Anonymous capabilities are short-lived (30 minutes by default), unguessable, and revoked when the demo expires or is deleted; proxy IP changes do not invalidate them. Do not treat the ID as a durable share link. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Simulation ID | |
| status | No | Updated simulation status | |
| traffic | No | New traffic level in RPS after injection |