Skip to main content
Glama
staffing-math

staffing-math

by bsunter93

Queue staffing (Erlang C)

erlang_staffing
Read-onlyIdempotent

Calculate agents needed for live phone or chat queues using Erlang C, including service level, wait chance, occupancy, and scheduled headcount after shrinkage.

Instructions

Agents needed on a live queue (phone, chat) to answer a target share of contacts within a target time, using Erlang C. Give contacts per hour for the interval being staffed (usually the busiest hour) and handle time in seconds. Returns agents needed, the service level at that number and at one fewer, chance of waiting, occupancy, and people to schedule after shrinkage. Use required_fte for case or ticket work with no answer-time target.

Input Schema

NameRequiredDescriptionDefault
shrinkageNoShare of paid time agents are off the queue. Converts agents to people scheduled. Default 0.3.
service_levelNoShare of contacts to answer within the target time. Default 0.8.
contacts_per_hourYesContacts arriving per hour in the interval being staffed.
handle_time_secondsYesAverage handle time in seconds: talk plus after-contact work.
answer_within_secondsNoTarget answer time in seconds. Default 20.

Output Schema

NameRequiredDescriptionDefault
notesYes
stepsYes
agentsYes
answerYes
engineYes
inputsYes
occupancyYes
people_to_scheduleYes
offered_load_erlangsYes
probability_of_waitingYes
service_level_at_agentsYes
service_level_one_fewerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds what the computation returns (service level at n and n-1, wait probability, occupancy, shrinkage-adjusted headcount), which conveys that this is a sensitivity-producing calculation rather than a single number. It does not mention edge behavior such as what happens at very low load or invalid target/service-level combinations, so it adds only modest context beyond the structured fields and the output schema.

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

Conciseness5/5

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

Three sentences, front-loaded with the purpose, then inputs, then outputs, then the sibling exclusion. Nothing is redundant and no sentence could be dropped without losing information.

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

Completeness5/5

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

For a read-only calculation tool with a full input schema and an output schema, the description supplies everything an agent needs: what it computes, how to parameterize the inputs, what comes back conceptually, and when to prefer the sibling.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description still earns credit by adding interpretation the schema lacks: that contacts_per_hour should represent the busiest interval being staffed, that shrinkage converts agents into people to schedule, and that answer-time targets are optional in spirit for non-queue work.

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

Purpose5/5

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

States a specific computation (agents needed) on a specific resource (live phone/chat queue) with the method named (Erlang C), and explicitly distinguishes itself from the sibling required_fte for case/ticket work with no answer-time target.

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

Usage Guidelines5/5

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

Gives the condition to use it (live queue with a target share answered within a target time), the input heuristic (contacts per hour for the busiest hour), and names the alternative when there is no answer-time target. The routing decision is fully determined from the description alone.

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

Deploy Server

Other Tools