Analyze the user's CLOSED deals (won + lost) to surface which attributes actually predict wins. Computes win rate per attribute value WITH sample size, and ranks attributes by the spread between their best- and worst-converting values — the data version of the win-rate-by-signal motion. By defaul...
AI agents call analyze_win_loss 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 |
|---|---|---|---|
deals | array | Yes | Closed deals as loose records, each with an outcome of won/lost (aliases: outcome/status). Other recognized fields: source/leadSource, type, owner, plus any cus |
minSample | number | — | Minimum deals per value to report a win rate (default 5). Smaller groups are suppressed as noise. |
attributes | array | — | Attributes to cut win rate by (default ["source","type","owner"]). Any field on the deal works — e.g. "segment", "competitor", "industry". |
Parameters from the server's own tool schema.
This is a pure analytical tool that queries and aggregates historical deal data to surface predictive attributes. It performs no writes, deletions, or external executions. The input is deal records with outcome labels, and the output is statistical rankings. Even though it processes business-critical sales data, the tool itself cannot modify records, trigger actions, or cause irreversible changes.
From the tool's definition Tool analyzes closed deals to compute win rates and rank attributes by conversion spread. Description explicitly states it "Analyzes" and "Computes" statistics on existing deal data without modifying, deleting, or executing external operations.
Attacks that exploit this kind of access
Analyze the user's CLOSED deals (won + lost) to surface which attributes actually predict wins. Computes win rate per attribute value WITH sample size, and ranks attributes by the spread between their best- and worst-converting values — the data version of the win-rate-by-signal motion. By default cuts by source, type, and owner; pass attributes to add any field present on the deals (e.g. segment, competitor, size). Values below minSample (default 5) are suppressed as noise. Accepts loosely-typed deal records; needs an outcome of won/lost (aliases: outcome/status). Returns the ranked attributes with per-value win rates and the reallocation takeaway. Operates only on supplied deals. Use when the user asks 'which sources/signals convert best', 'why are we winning/losing', or pastes closed-won and closed-lost deals. It is categorised as a Read tool in the StackSwap MCP Server, which means it retrieves data without modifying state.
analyze_win_loss accepts 3 parameters: deals, minSample, attributes. Required: deals. 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 analyze_win_loss: 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.
analyze_win_loss 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 analyze_win_loss 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 analyze_win_loss. 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.
analyze_win_loss 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 →