Tools for agents: Exact independent outcome sum
Compute the exact distribution, expectation and variance of a sum of independent discrete integer outcomes.
Connect with MCP
{
"mcpServers": {
"super-agent-tools": {
"url": "https://app.getsupers.com/sites/agent-discrete-sum/mcp"
}
}
}Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.
Call sum_discrete_distributions
Each inner list is one finite probability distribution. Values are signed integers and probabilities are integers or quoted finite decimal/fraction strings, never JSON floats or booleans. Every inner list must sum exactly to one; inputs are not automatically normalized. Duplicate values are combined and zero-probability outcomes disappear. Results are sorted by outcome value with reduced rational strings. The sum of no distributions is deterministically zero, with expectation and variance zero. Independence is an explicit mathematical assumption: this tool does not infer dependence or validate real-world likelihoods. All outcomes must share the same unit. Minimum and maximum refer only to positive-probability support. Sparse convolution can grow rapidly when many distinct sums are possible; use finite manageable supports. This computes a sum, not a mixture, simulation or conditional probability.
Input and output schemas
{
"name": "sum_discrete_distributions",
"title": "Exact independent outcome sum",
"description": "Convolve finite independent integer-valued distributions with exact rational arithmetic; return the PMF, mean and variance.",
"inputSchema": {
"$defs": {
"Outcome": {
"additionalProperties": false,
"properties": {
"value": {
"title": "Value",
"type": "integer"
},
"probability": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"title": "Probability"
}
},
"required": [
"value",
"probability"
],
"title": "Outcome",
"type": "object"
}
},
"properties": {
"distributions": {
"items": {
"items": {
"$ref": "#/$defs/Outcome"
},
"type": "array"
},
"title": "Distributions",
"type": "array"
}
},
"required": [
"distributions"
],
"title": "sum_discrete_distributionsArguments",
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"title": "sum_discrete_distributionsDictOutput",
"type": "object"
},
"icons": null,
"annotations": {
"title": null,
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"meta": null,
"execution": null
}Run the example to see the actual result.
HTTP alternative
POST https://app.getsupers.com/sites/agent-discrete-sum/call
Content-Type: application/json
{
"distributions": [
[
{
"value": -1,
"probability": "1/4"
},
{
"value": 2,
"probability": "3/4"
}
],
[
{
"value": 0,
"probability": "1/2"
},
{
"value": 3,
"probability": "1/2"
}
]
]
}The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.