Skip to main content
Glama

Inject Traffic

simulation.inject_traffic

Change 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

TableJSON Schema
NameRequiredDescriptionDefault
randomNoExplicitly select a random stress spike; never selected implicitly.
targetRpsNoAbsolute traffic level in RPS to set. Server-capped at 10000 RPS in demo mode.
deltaPercentNoRelative traffic change; must be greater than -100.
simulationIdNoSimulation 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

TableJSON Schema
NameRequiredDescriptionDefault
idNoSimulation ID
statusNoUpdated simulation status
trafficNoNew traffic level in RPS after injection

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / deltaPercent
      Added value: +{
      +  "description": "Relative traffic change; must be greater than -100.",
      +  "exclusiveMinimum": -100,
      +  "type": "number"
      +}
    • addedInput schema / properties / random
      Added value: +{
      +  "const": true,
      +  "description": "Explicitly select a random stress spike; never selected implicitly.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / targetRps
      Added value: +{
      +  "description": "Absolute traffic level in RPS to set. Server-capped at 10000 RPS in demo mode.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / properties / traffic
      Removed value: -{
      -  "description": "Absolute traffic level in RPS to set. Omit to trigger a random spike instead. Server-capped at 10000 RPS in demo mode.",
      -  "type": "number"
      -}
  2. Changed1 schema field changed
    • changedInput schema / properties / simulationId / description
      Previous value: -"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. A fresh session has no current-simulation pointer and returns NO_ACTIVE_SIMULATION when the ID is omitted. Anonymous capabilities are short-lived, bound to the creating anonymous client, and revoked when the demo expires or is deleted; do not treat the ID as a durable share link."New value: +"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."
  3. Changed1 schema field changed
    • changedInput schema / properties / simulationId / description
      Previous value: -"Simulation ID returned by simulation.create. Optional in demo sessions — omit to target this session's current simulation (set by simulation.create and updated by the most recent successful explicit use). If the session has no current simulation you get a NO_ACTIVE_SIMULATION result."New value: +"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. A fresh session has no current-simulation pointer and returns NO_ACTIVE_SIMULATION when the ID is omitted. Anonymous capabilities are short-lived, bound to the creating anonymous client, and revoked when the demo expires or is deleted; do not treat the ID as a durable share link."
  4. Changed3 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "One-sentence goal for this session — e.g. 'train RL agent on AWS', 'compare GCP vs Azure costs', or 'run chaos test on database tier'.",
      -  "type": "string"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "context"
      -]
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources