Skip to main content
Glama
turlockmike

MCP Rand

by turlockmike

generate_uuid

Generate a random UUID v4 using a secure Node.js crypto module. Ideal for creating unique identifiers in applications and systems efficiently.

Instructions

Generate a random UUID v4

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The generateUuidHandler function implements the core logic: generates a random UUID v4 using Node.js crypto.randomUUID() and returns it formatted as MCP tool result content.
    export const generateUuidHandler = async (
      _request: CallToolRequest
    ): Promise<CallToolResult> => {
      const uuid = randomUUID();
      
      return {
        content: [
          {
            type: 'text',
            text: uuid
          }
        ]
      };
    };
  • The toolSpec defines the tool's name, description, and input schema (empty object since no parameters required).
    export const toolSpec = {
      name: 'generate_uuid',
      description: 'Generate a random UUID v4',
      inputSchema: {
        type: 'object' as const,
        properties: {},
      }
    };
  • src/index.ts:19-19 (registration)
    Registers the generate_uuid tool handler in the MCP server registry for 'tools/call' operations.
    registry.register('tools/call', 'generate_uuid', generateUuidHandler as Handler);
Behavior3/5

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

With no annotations provided, the description carries the full burden. It clearly indicates a generation operation (not read-only or destructive) and specifies the UUID version (v4), but lacks details on randomness quality, potential collisions, or output format. It provides basic behavioral context but misses deeper operational traits.

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—'Generate a random UUID v4'—that immediately conveys the core functionality. It's appropriately sized and front-loaded, making every word count.

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 simplicity (0 parameters, no output schema, no annotations), the description is complete enough for basic understanding but lacks depth. It doesn't explain the return value (e.g., format of the UUID) or potential use cases, which could enhance contextual completeness for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the lack of inputs. The description doesn't need to add parameter information, and it appropriately focuses on the tool's purpose without redundant details, meeting the baseline for parameterless tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Generate a random UUID v4' clearly states the specific action (generate) and resource (UUID v4), distinguishing it from sibling tools like generate_password or generate_random_number. It precisely identifies the type of UUID (v4) being generated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (when a random UUID is needed) but doesn't explicitly state when to use this tool versus alternatives like generate_string or generate_random_number. No exclusions or specific scenarios are mentioned, leaving usage guidance at an implied level.

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

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/turlockmike/mcp-rand'

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