Skip to main content
Glama

define_distribution

Define a probability distribution with PDF/PMF for modeling uncertainty, variability, error propagation, or Monte Carlo simulations. Supports continuous and discrete types.

Instructions

    Define a probability distribution.

    ═══════════════════════════════════════════════════════════════════════
    🆕 NOT AVAILABLE IN SYMPY-MCP! Uses sympy.stats module.
    ═══════════════════════════════════════════════════════════════════════

    Use cases:
    - Model measurement uncertainty
    - Population variability in pharmacokinetics
    - Error propagation
    - Monte Carlo preparation

    Supported distributions:
    - Continuous: normal, exponential, uniform, gamma, beta, lognormal
    - Discrete: poisson, binomial, geometric

    Args:
        distribution_type: Type of distribution
        parameters: Distribution parameters (as strings for symbolic)
        name: Name of the random variable

    Returns:
        Distribution definition with PDF/PMF

    Examples:
        # Normal distribution
        define_distribution("normal", {"mean": "mu", "std": "sigma"}, "X")

        # Exponential (for waiting times)
        define_distribution("exponential", {"rate": "lambda"}, "T")

        # Log-normal (for PK parameters)
        define_distribution("lognormal", {"mean": "mu", "std": "sigma"}, "CL")
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoX
parametersYes
distribution_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, description discloses it uses sympy.stats, warns that it's not available in SymPy-MCP, and states the return type (PDF/PMF). It does not fully detail side effects or error behavior, but for a pure definition tool it provides adequate transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with headers for use cases, supported distributions, args, returns, and examples. It is longer than necessary, but every section adds value and the main purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 params, nested object), the description provides complete usage context, supported distributions, and examples. The output schema exists, so return details are not strictly required, but the description still mentions PDF/PMF. Minor gap: no explanation of how the returned definition can be used with sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, but the description compensates with a thorough Args section, supported distribution names, and examples showing how to pass parameters as strings (e.g., {"mean": "mu", "std": "sigma"}). This goes well beyond the schema's generic additionalProperties.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Define a probability distribution,' which clearly states the action and resource. It lists supported distribution types and use cases, distinguishing it from sibling tools like distribution_stats and distribution_probability which analyze rather than define.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit use cases (model measurement uncertainty, population variability, error propagation, Monte Carlo preparation), giving context for when to use the tool. However, it doesn't mention alternatives or exclusions relative to sibling distribution tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/u9401066/nsforge-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server