Skip to main content
Glama

Distribution Operation

distribution_operation
Idempotent

Calculate PDF, CDF, quantiles, mean, variance, or generate samples for supported probability distributions such as normal, exponential, Poisson, chi-squared, and more.

Instructions

Probability distribution operations: PDF, CDF, quantile, mean, variance, sampling

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of samples (for sample operation)
xNoPoint for pdf/cdf/quantile evaluation
sessionNoWorkspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'.default
operationYesOne of: pdf, cdf, quantile, mean, variance, sample
parametersYesDistribution parameters (e.g. [0, 1] for standard normal)
distributionYesDistribution name: normal, exponential, poisson, chi_squared, student_t, uniform, beta, gamma

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / properties / session / description
      Previous value: -"Named workspace to use. Workspaces have independent variables; omit for 'default'."New value: +"Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'."
  2. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / session
      Added value: +{
      +  "default": "default",
      +  "description": "Named workspace to use. Workspaces have independent variables; omit for 'default'.",
      +  "type": "string"
      +}
  3. First observedv0.3.1

TDQS

B3.1/5.0
Behavior2/5

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

The annotations already provide idempotent/readOnly/destructive hints, but the description adds no behavioral context beyond the operation names. It does not mention that sampling draws random values, whether session state is consulted or modified, or whether results are computed symbolically/numerically, so it fails to add value beyond the structured fields. No direct contradiction with annotations is present.

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

Conciseness5/5

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

The description is a single front-loaded sentence with no filler; it leads with the domain and immediately specifies the available operations. Every word contributes, and the list format is easy to scan.

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

Completeness3/5

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

An output schema exists and the input-schema parameter descriptions are rich, so the tool is reasonably invokable without the description explaining return values. However, for a dispatcher with six operations, eight distributions, and many sibling tools, the description omits behavioral caveats (notably sampling randomness) and any guidance for choosing between this and related statistical tools.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already explains operation, distribution, parameters, x, n, and session. The description repeats the operation names but adds no parameter semantics beyond the schema's own example ('[0, 1] for standard normal'), which puts it at the baseline.

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

Purpose4/5

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

The description names a specific domain (probability distributions) and lists six concrete operations (PDF, CDF, quantile, mean, variance, sampling), so an agent can see it is a distribution-focused dispatch tool rather than a general calculator. It lacks an explicit verb like 'perform' or 'compute', and it does not name sibling tools, but the resource and operation set are clear.

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

Usage Guidelines2/5

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

There is no explicit statement of when to use this tool versus a sibling such as statistics_summary or calculate_expression, and 'mean, variance, sampling' overlaps with general statistics tools. The intended use is only implied by the operation list, with no exclusions or alternatives.

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