generateUUID
Generate a random UUID with crypto.randomUUID() for secure and unique identification within the mcp-helper-tools server environment.
Instructions
Generate a random UUID using crypto.randomUUID()
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/generator.ts:19-26 (handler)The handler function for the generateUUID tool. It asynchronously generates a random UUID using Node.js crypto.randomUUID() and returns it wrapped in the MCP content format.handler: async () => { return { content: [{ type: 'text', text: randomUUID() }] }; }
- src/tools/generator.ts:15-18 (schema)Input schema for the generateUUID tool, defining an empty object since the tool requires no input parameters.inputSchema: { type: 'object', properties: {} },
- src/tools/generator.ts:12-27 (registration)Local registration of the generateUUID tool within the generatorTools object exported from this module.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:27-33 (registration)Global registration combining generatorTools (which includes generateUUID) into allTools, used by MCP server handlers for tool listing and execution.const allTools: ToolKit = { ...encodingTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };