Skip to main content
Glama

Inject Traffic

simulation.inject_traffic

Use simulationId from simulation.create or current demo. Choose targetRps, deltaPercent, ramp, or random:true. Returns applied traffic; next tool is simulation.step, then simulation.metrics. Keyless demo. cwm://guides/public/simulation.inject_traffic

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "simulation.inject_traffic"
  }
}

Input Schema

NameRequiredDescriptionDefault
rampNo
randomNo
targetRpsNo
deltaPercentNo
simulationIdNoID returned by simulation.create.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / simulationId / description
      Added value: +"ID returned by simulation.create."
  2. Changed11 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / deltaPercent / description
      Removed value: -"Relative traffic change; must be greater than -100."
    • removedInput schema / properties / deltaPercent / exclusiveMinimum
      Removed value: --100
    • changedInput schema / properties / ramp / additionalProperties
      Previous value: -falseNew value: +true
    • removedInput schema / properties / ramp / description
      Removed value: -"Schedule a ramp from startRps to endRps over durationSteps; mutually exclusive with other selectors."
    • removedInput schema / properties / ramp / properties
      Removed value: -{
      -  "durationSteps": {
      -    "maximum": 500,
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  "endRps": {
      -    "maximum": 500000,
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  "startRps": {
      -    "maximum": 500000,
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -}
    • removedInput schema / properties / ramp / required
      Removed value: -[
      -  "startRps",
      -  "endRps",
      -  "durationSteps"
      -]
    • removedInput schema / properties / random / description
      Removed value: -"Explicitly select a random stress spike; never selected implicitly."
    • removedInput schema / properties / simulationId / description
      Removed 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."
    • removedInput schema / properties / targetRps / description
      Removed value: -"Absolute traffic level in RPS to set. Server-capped at 10000 RPS in demo mode."
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": true,
      -  "properties": {
      -    "id": {
      -      "description": "Simulation ID",
      -      "type": "string"
      -    },
      -    "status": {
      -      "description": "Updated simulation status",
      -      "type": "string"
      -    },
      -    "traffic": {
      -      "description": "New traffic level in RPS after injection",
      -      "type": "number"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changed
    • addedInput schema / properties / ramp
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Schedule a ramp from startRps to endRps over durationSteps; mutually exclusive with other selectors.",
      +  "properties": {
      +    "durationSteps": {
      +      "maximum": 500,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "endRps": {
      +      "maximum": 500000,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "startRps": {
      +      "maximum": 500000,
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "startRps",
      +    "endRps",
      +    "durationSteps"
      +  ],
      +  "type": "object"
      +}
  4. 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"
      -}
  5. 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."
  6. 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."
  7. 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"
      -]
  8. First observed

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=false, so the description doesn't need to restate safety. It does add useful facts beyond annotations: the call returns applied traffic and works in a keyless demo with no auth. However, with idempotentHint=false, the critical unanswered question is whether repeated calls stack or replace existing traffic, and the description is silent on that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and front-loaded: prerequisites first, then parameter choice, then return value and next steps. Some sentences are telegraphic almost to the point of ambiguity (e.g., 'random:true'), but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, 'Returns applied traffic' does the minimum to cover the return value, and the workflow chain is spelled out. The gaps are the nested ramp object's structure and the effect of repeat invocations on a non-idempotent tool, both of which an agent needs before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 20% (only simulationId is described in-schema), so the description carries real weight here. It names four of five parameters and signals their either/or relationship ('Choose targetRps, deltaPercent, ramp, or random:true'), which the schema does not express. But it never explains what deltaPercent is relative to or what shape the nested ramp object takes, leaving the most opaque parameter undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The name and description establish a specific action ('inject traffic' with targetRps/deltaPercent/ramp/random) against a simulation resource, and the next-step chain (simulation.step, then simulation.metrics) implicitly distinguishes it from siblings like inject_failure. It never states in plain terms that it applies load to a running simulation, leaving a small inferential step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly tells the agent where to get simulationId (simulation.create or current demo), that exactly one of targetRps/deltaPercent/ramp/random should be chosen, and what to call next. It gives no when-not guidance (e.g., simulation not yet created, or traffic already set), so it falls short of a full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources