Skip to main content
Glama

queue_sizing

Read-onlyIdempotent

Calculate required consumers and concurrency with Little’s law and Erlang C to estimate utilization, wait probability, and backlog drain time for queue workloads.

Instructions

Size consumers with Little's law and stable Erlang C: utilization, wait probability, backlog drain time and target consumers. At most 100,000 total concurrent slots (consumers × concurrency).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "arrivalsPerSecond": "<arrivalsPerSecond>",
      "serviceTimeMs": "<serviceTimeMs>",
      "consumers": "<consumers>"
    },
    "name": "queue_sizing"
  }
}

Input Schema

NameRequiredDescriptionDefault
consumersYes
serviceTimeMsYes
backlogMessagesNo
arrivalsPerSecondYes
targetUtilizationPercentNo
maxConcurrencyPerConsumerNo

Output Schema

NameRequiredDescriptionDefault
kindNo
inputsNo
stableNo
sourcesNo
formulasNo
warningsNo
validatedNo
limitationNo
limitationsNo
meanInSystemNo
totalCapacityNo
waitProbabilityNo
offeredLoadErlangsNo
utilizationPercentNo
backlogDrainSecondsNo
visibilityTimeoutHintSecondsNo
consumersForTargetUtilizationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.5.0
    • changedInput schema / required
      Previous value: -[
      -  "arrivalsPerSecond",
      -  "serviceTimeMs",
      -  "consumers",
      -  "backlogMessages",
      -  "targetUtilizationPercent",
      -  "maxConcurrencyPerConsumer"
      -]New value: +[
      +  "arrivalsPerSecond",
      +  "serviceTimeMs",
      +  "consumers"
      +]
    • addedOutput schema / properties / limitation
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / sources
      Added value: +{
      +  "type": "array"
      +}
    • addedOutput schema / properties / validated
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  2. First observedv0.4.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safe pure-read profile, and the description adds a real constraint not present in structured data: the combined cap of 100,000 total concurrent slots (consumers × concurrency), which is a product of two separate schema maxima. It also names the model family ('stable Erlang C'), hinting at stability assumptions, but does not state what happens when utilization approaches or exceeds 1.

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?

Two dense sentences, both earning their place: the first scopes the computation and outputs, the second front-loads the hard limit. The enumeration of outputs is slightly list-like but remains readable.

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?

The output schema means return values need not be described, and the tool's core purpose is conveyed. For a queueing-model calculator, however, key modeling assumptions (M/M/c, what 'stable' rules out, behavior when demand exceeds capacity) are missing, which an agent needs to trust and correctly apply the results.

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 description coverage is 0%, so the description carries the burden, and it only partially compensates: it references consumers, concurrency and the output concepts (utilization target, backlog drain), implying targetUtilizationPercent and backlogMessages. arrivalsPerSecond, serviceTimeMs, and the defaults (70% target, 0 backlog, concurrency 1) are never explained in the description.

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?

States a specific verb and resource ('Size consumers') plus the exact model used (Little's law, stable Erlang C) and the four outputs produced. This clearly separates it from generic siblings like capacity_plan or latency_budget, though it never names the nearest alternative explicitly.

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

Usage Guidelines3/5

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

Usage is only implied by the domain vocabulary: an agent can infer this is for queue/consumer sizing when you know arrival rate, service time and consumer count. There is no explicit when-to-use, when-not-to-use, or pointer to capacity_plan for non-queue capacity questions.

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