Skip to main content
Glama

generateUuid

Create unique, timestamp-based UUIDs (v7) without input parameters, ensuring chronological sorting and uniqueness for efficient identifier generation.

Instructions

Generate a UUID v7 that's timestamp-based and guaranteed to be unique

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'generateUuid' tool. Checks if the requested tool name is 'generateUuid', generates a UUID v7 using the uuidv7() function, and returns it as text content in the response format expected by MCP.
    if (request.params.name === "generateUuid") { // UUID v7 is timestamp-based with additional random data for uniqueness const uuid = uuidv7(); return { content: [ { type: "text", text: uuid } ] }; }
  • Tool schema definition advertised in the tools/list response, including name, description, and empty inputSchema (no parameters required).
    { name: "generateUuid", description: "Generate a UUID v7 that's timestamp-based and guaranteed to be unique", inputSchema: { type: "object", properties: {} } }
  • src/index.ts:18-34 (registration)
    Registration of the tools/list handler, which advertises the 'generateUuid' tool to MCP clients.
    server.setRequestHandler( ListToolsRequestSchema, async () => { return { tools: [ { name: "generateUuid", description: "Generate a UUID v7 that's timestamp-based and guaranteed to be unique", inputSchema: { type: "object", properties: {} } } ] }; } );
  • Import of the uuidv7 function from the 'uuid' library, used as the core utility to generate UUID v7 in the tool handler.
    import { v7 as uuidv7 } from 'uuid';

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/tanker327/uuid-mcp'

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