Skip to main content
Glama
QianJue-CN

Random.org MCP Server

by QianJue-CN

generateBlobs

Generate true random binary data in base64 or hex format for cryptographic applications, simulations, or testing purposes using Random.org's entropy source.

Instructions

Generate true random binary data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nYesNumber of blobs to generate (1-100)
sizeYesSize of each blob in bytes (1-1,048,576)
formatNoOutput formatbase64

Implementation Reference

  • MCP tool handler for 'generateBlobs': calls RandomOrgClient.generateBlobs and formats the response as MCP content with JSON stringified result.
    private async handleGenerateBlobs(args: any) {
      const result = await this.randomOrgClient.generateBlobs(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:227-254 (registration)
    Tool registration in ListToolsRequestSchema response, defining name, description, and input schema for generateBlobs.
    {
      name: 'generateBlobs',
      description: 'Generate true random binary data',
      inputSchema: {
        type: 'object',
        properties: {
          n: {
            type: 'number',
            description: 'Number of blobs to generate (1-100)',
            minimum: 1,
            maximum: 100,
          },
          size: {
            type: 'number',
            description: 'Size of each blob in bytes (1-1,048,576)',
            minimum: 1,
            maximum: 1048576,
          },
          format: {
            type: 'string',
            description: 'Output format',
            enum: ['base64', 'hex'],
            default: 'base64',
          },
        },
        required: ['n', 'size'],
      },
    },
  • Type definition for input parameters (BlobParams) used in generateBlobs.
    export interface BlobParams {
      n: number;
      size: number;
      format?: 'base64' | 'hex';
    }
  • Type definition for output result (BlobResult) from generateBlobs API call.
    export interface BlobResult {
      random: {
        data: string[];
        completionTime: string;
      };
      bitsUsed: number;
      bitsLeft: number;
      requestsLeft: number;
      advisoryDelay: number;
    }
  • RandomOrgClient method that validates params and makes the API request for generateBlobs.
    async generateBlobs(params: BlobParams): Promise<BlobResult> {
      this.validateBlobParams(params);
      return this.makeRequest<BlobResult>('generateBlobs', params);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Generate true random binary data,' implying a creation operation, but doesn't disclose behavioral traits like whether this requires authentication, has rate limits, or what the output looks like (e.g., format details beyond schema). This is a significant gap for a tool with no annotation coverage.

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 with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

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?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on output format, behavioral context, or usage guidelines, making it incomplete for optimal agent understanding.

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 documents all parameters (n, size, format) with descriptions, constraints, and defaults. The description adds no additional meaning beyond what the schema provides, such as explaining what 'blobs' are or usage examples, meeting the baseline 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 'Generate true random binary data' clearly states the verb ('Generate') and resource ('true random binary data'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like generateStrings or generateUUIDs, which also generate random data but of different types, so it lacks sibling distinction.

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. It doesn't mention sibling tools or contexts where binary data generation is preferred over other random data types, leaving the agent without usage direction.

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