Compute net revenue retention (NRR) and gross revenue retention (GRR) from the user's own cohort numbers, and judge against StackSwap's bands (100% floor, 110-120%+ healthy). Pass startingARR plus expansionARR, contractionARR, churnedARR (any of the three optional, default 0). Returns NRR, GRR, a...
AI agents call compute_nrr to retrieve information from StackSwap without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
churnedARR | number | — | Fully churned ARR from the existing base (default 0). |
startingARR | number | Yes | ARR of the existing-customer cohort at the start of the period. |
expansionARR | number | — | Expansion/upsell ARR added within the existing base (default 0). |
contractionARR | number | — | Downgrade/contraction ARR lost within the existing base (default 0). |
Parameters from the server's own tool schema.
compute_nrr is a pure calculation tool that ingests user-supplied metrics and returns analytical insights. It retrieves no external data, creates no records, modifies nothing, executes no code or commands on external systems, and cannot delete or move money. It is a read-only analytical function with no side effects, fitting squarely into the Read category.
From the tool's definition Tool description states: 'Computes on supplied figures only; no data fetch.' It takes input parameters (startingARR, expansionARR, contractionARR, churnedARR) and returns calculated metrics (NRR, GRR, verdict, fragility flag).
Attacks that exploit this kind of access
Compute net revenue retention (NRR) and gross revenue retention (GRR) from the user's own cohort numbers, and judge against StackSwap's bands (100% floor, 110-120%+ healthy). Pass startingARR plus expansionARR, contractionARR, churnedARR (any of the three optional, default 0). Returns NRR, GRR, a verdict, and — critically — a fragility flag when a healthy NRR is sitting on weak GRR (expansion masking a churn problem). Computes on supplied figures only; no data fetch. Use when the user asks 'what's my NRR / net retention', 'is my retention healthy', or pastes expansion/churn numbers. It is categorised as a Read tool in the StackSwap MCP Server, which means it retrieves data without modifying state.
compute_nrr accepts 4 parameters: churnedARR, startingARR, expansionARR, contractionARR. Required: startingARR. The full parameter table on this page comes from the server's own tool schema.
Register the StackSwap MCP server in PolicyLayer and add a rule for compute_nrr: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches StackSwap. Nothing to install.
compute_nrr is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the compute_nrr rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for compute_nrr. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
compute_nrr is provided by the StackSwap MCP server (StonesofCreation/stackswap-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →