simulate-monte-carlo
Real Monte Carlo simulation of a compound event/conditional probability. Paid via x402.
사용해야 할까요
품질 및 안전성
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"simulate-monte-carlo": {
"url": "https://simulate-monte-carlo.encodari.workers.dev/mcp"
}
}
}원격 엔드포인트
https://simulate-monte-carlo.encodari.workers.dev/mcpstreamable-http할 수 있는 일
도구 목록
도구 (1)
⚪simulate_monte_carlo(variables, event, condition, trials, seed)
Actually draws random samples from real distributions and counts outcomes, instead of a model guess about a probability. Declare named random variables (uniform, normal, bernoulli, binomial, poisson, exponential, discrete), an "event" boolean expression over those variable names (e.g. "a > 0.5 && b == 1"), and an optional "condition" expression to estimate a conditional probability P(event | condition) by rejection sampling. Event/condition expressions are parsed and evaluated by a small built-in interpreter (arithmetic, comparisons, &&/||/!, min/max/abs) — no arbitrary code execution. Returns the estimated probability, a 95% confidence interval, and the seed used (pass the same seed back to reproduce the exact result). Costs $0.03 USDC (Base) per call.
입력 스키마
{
"type": "object",
"properties": {
"variables": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
"description": "Variable name, referenced by \"event\"/\"condition\" (e.g. \"a\", \"wait_time\")."
},
"distribution": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "uniform"
},
"min": {
"type": "number"
},
"max": {
"type": "number"
}
},
"required": [
"type",
"min",
"max"
],
"description": "Continuous, equally likely between min and max."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "normal"
},
"mean": {
"type": "number"
},
"stdDev": {
"type": "number",
"minimum": 0
}
},
"required": [
"type",
"mean",
"stdDev"
],
"description": "Gaussian/bell curve, via Box-Muller sampling."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "bernoulli"
},
"p": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"type",
"p"
],
"description": "Single 0/1 trial with success probability p."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "binomial"
},
"n": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 1000
},
"p": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"type",
"n",
"p"
],
"description": "Count of successes in n independent Bernoulli(p) trials. n capped at 1000."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "poisson"
},
"lambda": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000
}
},
"required": [
"type",
"lambda"
],
"description": "Event count with mean rate lambda, via Knuth's algorithm. lambda capped at 1000."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "exponential"
},
"rate": {
"type": "number",
"exclusiveMinimum": 0
}
},
"required": [
"type",
"rate"
],
"description": "Time between events at the given rate."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "discrete"
},
"values": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "number"
}
},
"weights": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "number",
"minimum": 0
}
}
},
"required": [
"type",
"values",
"weights"
],
"description": "Weighted pick from a custom list of outcomes (e.g. a die). Up to 20 outcomes."
}
]
}
},
"required": [
"name",
"distribution"
]
},
"description": "Random variables to sample each trial. Max 10."
},
"event": {
"type": "string",
"maxLength": 500,
"description": "Boolean expression over the variable names, evaluated each trial (e.g. \"a + b > 10\", \"x == 1 && y < 0.2\")."
},
"condition": {
"description": "Optional boolean expression; if given, the result is P(event | condition), estimated only over trials where this is true.",
"type": "string",
"maxLength": 500
},
"trials": {
"description": "Number of trials to run. Default 10000, between 100 and 100000.",
"type": "integer",
"minimum": 100,
"maximum": 100000
},
"seed": {
"description": "Optional PRNG seed for a reproducible run. If omitted, a random seed is generated and returned in the output.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"variables",
"event"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}출력 스키마
{
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"description": "false if the input (variables, expressions, limits) was invalid."
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Error or warning message. null if none."
},
"trials_run": {
"type": "number",
"description": "Number of trials actually simulated (0 if valid is false)."
},
"seed_used": {
"type": "number",
"description": "The PRNG seed used — pass it back as `seed` to reproduce this exact result."
},
"probability": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Estimated P(event) or P(event | condition). null if invalid, or if condition matched zero trials."
},
"event_successes": {
"type": "number",
"description": "Number of trials (or condition-matching trials) where event was true."
},
"condition_successes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of trials where condition was true. null if no condition was given."
},
"standard_error": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Estimated standard error of the probability estimate."
},
"confidence_interval_95": {
"anyOf": [
{
"type": "array",
"prefixItems": [
{
"type": "number"
},
{
"type": "number"
}
]
},
{
"type": "null"
}
],
"description": "Approximate 95% confidence interval [low, high] via the normal approximation."
}
},
"required": [
"valid",
"error",
"trials_run",
"seed_used",
"probability",
"event_successes",
"condition_successes",
"standard_error",
"confidence_interval_95"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}커뮤니티
증거