Skip to main content
Glama
VeriTeknik

Pluggedin Random Number Generator

generate_uuid

Create cryptographically secure UUIDs (v4) with customizable count and format options, ensuring reliable unique identifiers for various applications.

Instructions

Generate a cryptographically secure UUID (v4)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of UUIDs to generate
formatNoUUID formatstandard

Implementation Reference

  • Implements the generate_uuid tool logic using crypto.randomUUID() to generate UUID v4 strings, supports multiple UUIDs and standard/compact formats.
    private async generateUUID(args: any) {
      const count = args.count ?? 1;
      const format = args.format ?? "standard";
    
      if (count < 1 || count > 100) {
        throw new Error("Count must be between 1 and 100");
      }
    
      const results: string[] = [];
      for (let i = 0; i < count; i++) {
        const uuid = randomUUID();
        results.push(format === "compact" ? uuid.replace(/-/g, "") : uuid);
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              type: "uuids",
              values: results,
              parameters: { count, format },
              timestamp: new Date().toISOString(),
            }, null, 2),
          },
        ],
      };
    }
  • Defines the input schema for the generate_uuid tool, including optional count (1-100) and format (standard/compact) parameters.
    inputSchema: {
      type: "object",
      properties: {
        count: {
          type: "integer",
          description: "Number of UUIDs to generate",
          default: 1,
          minimum: 1,
          maximum: 100,
        },
        format: {
          type: "string",
          description: "UUID format",
          enum: ["standard", "compact"],
          default: "standard",
        },
      },
      required: [],
    },
  • src/index.ts:133-155 (registration)
    Registers the generate_uuid tool in the ListToolsRequestSchema handler with name, description, and input schema.
    {
      name: "generate_uuid",
      description: "Generate a cryptographically secure UUID (v4)",
      inputSchema: {
        type: "object",
        properties: {
          count: {
            type: "integer",
            description: "Number of UUIDs to generate",
            default: 1,
            minimum: 1,
            maximum: 100,
          },
          format: {
            type: "string",
            description: "UUID format",
            enum: ["standard", "compact"],
            default: "standard",
          },
        },
        required: [],
      },
    },
  • src/index.ts:255-256 (registration)
    Registers the tool dispatch in the CallToolRequestSchema switch statement, routing generate_uuid calls to the generateUUID handler.
    case "generate_uuid":
      return await this.generateUUID(args);

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related 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/VeriTeknik/pluggedin-random-number-generator-mcp'

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