Skip to main content
Glama

nps-calculator

Read-onlyIdempotent

Compute Net Promoter Score (NPS) from promoter / passive / detractor counts, or from a raw array of 0–10 scores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scoresNoOptional raw scores in 0–10. When provided, the engine buckets them itself and ignores `promoters`/`passives`/`detractors`.
passivesNoCount of respondents who scored 7 or 8. Required if `scores` is not provided.
promotersNoCount of respondents who scored 9 or 10. Required if `scores` is not provided.
detractorsNoCount of respondents who scored 0–6. Required if `scores` is not provided.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
npsYesNet Promoter Score in the range −100 to +100. Rounded to the nearest whole number.
totalYesTotal respondents counted.
ratingYesBain & Company's standard NPS bands: <0 needs-work, 0–30 good, 30–70 great, >70 world-class.
npsExactYesUnrounded NPS, useful when the caller wants extra precision.
passivesYesResolved passive count.
promotersYesResolved promoter count (echoed back so the widget can chart it).
detractorsYesResolved detractor count.
passivePctYesPassives as a percentage of total, to one decimal.
promoterPctYesPromoters as a percentage of total, to one decimal.
detractorPctYesDetractors as a percentage of total, to one decimal.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the key behavioral fact that raw scores are auto-bucketed (and the schema clarifies that scores override counts), which is useful beyond annotations.

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?

A single sentence that leads with the action and metric, then lists the two supported input forms. No filler or redundancy.

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?

The tool is a simple pure calculation; annotations cover read-only/idempotent behavior, the schema fully documents parameters and constraints, and an output schema exists for return values. The description supplies the remaining piece—what the tool computes and which inputs are accepted—so it is complete for the tool's complexity.

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 100%, with each parameter's bucket meaning and the mutual-exclusion rule documented in the JSON schema itself. The description only reiterates the two modes at a high level, so it adds minimal new semantic value beyond the schema.

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?

The description names the exact calculation ('Net Promoter Score') and the verb 'Compute,' and it specifies two distinct input modes (pre-aggregated counts vs raw 0–10 scores). This distinguishes it from the many sibling calculators by naming a unique metric.

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?

The description states the tool computes NPS from either counts or raw scores, giving clear context for when to choose it. It doesn't explicitly name alternative tools to use instead, nor does it state exclusions, but the context is unambiguous among the sibling calculators.

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