Skip to main content
Glama

generateUUID

Generate random UUIDs for unique identifiers in applications using crypto.randomUUID().

Instructions

Generate a random UUID using crypto.randomUUID()

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the generateUUID tool logic, calling randomUUID() and returning the result in MCP content format.
    handler: async () => {
      return {
        content: [{
          type: 'text',
          text: randomUUID()
        }]
      };
    }
  • Input schema for the generateUUID tool, specifying an empty object (no input parameters required).
    inputSchema: {
      type: 'object',
      properties: {}
    },
  • Full definition of the generateUUID tool within generatorTools export, including name, description, schema, and handler.
    generateUUID: {
      name: 'generateUUID',
      description: 'Generate a random UUID using crypto.randomUUID()',
      inputSchema: {
        type: 'object',
        properties: {}
      },
      handler: async () => {
        return {
          content: [{
            type: 'text',
            text: randomUUID()
          }]
        };
      }
    },
  • src/index.ts:32-32 (registration)
    Registers generatorTools (including generateUUID) by spreading it into the allTools object used by the MCP server for tool listing and execution.
    ...generatorTools,
  • Imports the randomUUID utility from Node.js crypto module used in the generateUUID handler.
    import { randomUUID } from 'node:crypto';

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/cyanheads/toolkit-mcp-server'

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