Skip to main content
Glama
QianJue-CN

Random.org MCP Server

by QianJue-CN

generateGaussians

Generate true random numbers from a Gaussian distribution for statistical simulations, modeling, and data analysis applications.

Instructions

Generate true random numbers from a Gaussian distribution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nYesNumber of Gaussian numbers to generate (1-10,000)
meanYesMean of the distribution
standardDeviationYesStandard deviation of the distribution
significantDigitsYesNumber of significant digits (2-20)

Implementation Reference

  • MCP tool handler function that delegates to RandomOrgClient and formats the response as MCP content.
    private async handleGenerateGaussians(args: any) {
      const result = await this.randomOrgClient.generateGaussians(args);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              data: result.random.data,
              completionTime: result.random.completionTime,
              bitsUsed: result.bitsUsed,
              bitsLeft: result.bitsLeft,
              requestsLeft: result.requestsLeft,
              advisoryDelay: result.advisoryDelay,
            }, null, 2),
          },
        ],
      };
  • src/server.ts:149-179 (registration)
    Tool registration in the listTools response, including name, description, and input schema.
    {
      name: 'generateGaussians',
      description: 'Generate true random numbers from a Gaussian distribution',
      inputSchema: {
        type: 'object',
        properties: {
          n: {
            type: 'number',
            description: 'Number of Gaussian numbers to generate (1-10,000)',
            minimum: 1,
            maximum: 10000,
          },
          mean: {
            type: 'number',
            description: 'Mean of the distribution',
          },
          standardDeviation: {
            type: 'number',
            description: 'Standard deviation of the distribution',
            minimum: 0,
          },
          significantDigits: {
            type: 'number',
            description: 'Number of significant digits (2-20)',
            minimum: 2,
            maximum: 20,
          },
        },
        required: ['n', 'mean', 'standardDeviation', 'significantDigits'],
      },
    },
  • TypeScript interface defining the input parameters for generateGaussians, matching the JSON schema.
    export interface GaussianParams {
      n: number;
      mean: number;
      standardDeviation: number;
      significantDigits: number;
    }
  • Client wrapper method that validates params and makes the API request to Random.org.
    async generateGaussians(params: GaussianParams): Promise<GaussianResult> {
      this.validateGaussianParams(params);
      return this.makeRequest<GaussianResult>('generateGaussians', params);
    }
  • Validation helper for Gaussian parameters.
    private validateGaussianParams(params: GaussianParams): void {
      if (params.n < 1 || params.n > 10000) {
        throw new Error('n must be between 1 and 10,000');
      }
      if (params.significantDigits < 2 || params.significantDigits > 20) {
        throw new Error('significantDigits must be between 2 and 20');
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates 'true random numbers' but doesn't clarify aspects like whether this is a read-only operation, if it has side effects, rate limits, or authentication requirements. For a tool with no annotation coverage, this is a significant gap in transparency.

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, efficient sentence that directly states the tool's purpose without any unnecessary words or fluff. It's appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness2/5

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

Given the tool has no annotations and no output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., a list of numbers), behavioral traits, or usage context relative to siblings. For a 4-parameter tool with no structured support, the description should provide more comprehensive guidance.

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?

The schema description coverage is 100%, with all parameters well-documented in the input schema (e.g., 'n' as number of Gaussian numbers with range 1-10,000). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.

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 clearly states the action ('generate') and resource ('true random numbers from a Gaussian distribution'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'generateDecimalFractions' or 'generateIntegers', which would require mentioning the specific distribution type as a distinguishing feature.

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?

The description provides no guidance on when to use this tool versus alternatives like 'generateDecimalFractions' or 'generateIntegers'. There's no mention of use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

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/QianJue-CN/TRUERandomMCP'

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