Break the user's ACCOUNTS into segments and show where revenue concentrates and where it grows vs leaks. Groups by groupBy (default 'segment'; any field works — industry, owner, tier) and reports per-group account count, total ARR, share of ARR, and average ARR. If accounts carry cohort-retention...
AI agents call segment_revenue 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 |
|---|---|---|---|
groupBy | string | — | Field to group by (default "segment"). Any account field works, e.g. "industry", "owner", "tier". |
accounts | array | Yes | Accounts as loose records. Recognized fields (with aliases): arr/mrr, segment/tier, industry/vertical, owner; optional retention inputs startingArr, expansionAr |
Parameters from the server's own tool schema.
This tool retrieves and analyzes internal account data to produce insights (segmentation, revenue concentration analysis). It reads user data and computes metrics without modifying, deleting, or executing external operations. The blast radius of misuse is low—worst case reveals internal revenue insights to an unauthorized actor, but no data is altered or financial transactions occur.
From the tool's definition Tool description explicitly states it operates "only on the user's own book" and performs aggregation and analysis: "Break the user's ACCOUNTS into segments and show where revenue concentrates", "Groups by", "reports per-group account count, total ARR",…
Attacks that exploit this kind of access
Break the user's ACCOUNTS into segments and show where revenue concentrates and where it grows vs leaks. Groups by groupBy (default 'segment'; any field works — industry, owner, tier) and reports per-group account count, total ARR, share of ARR, and average ARR. If accounts carry cohort-retention inputs (startingArr + expansionArr/contractionArr/churnedArr), it also computes per-segment NRR and GRR. Accepts loosely-typed account records (arr/mrr, segment/tier, industry normalized). Operates only on the user's own book. Use when the user asks 'which segments drive revenue', 'what's my NRR by segment', or pastes accounts with a segment field. It is categorised as a Read tool in the StackSwap MCP Server, which means it retrieves data without modifying state.
segment_revenue accepts 2 parameters: groupBy, accounts. Required: accounts. 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 segment_revenue: 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.
segment_revenue 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 segment_revenue 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 segment_revenue. 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.
segment_revenue 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 →