generate_uuid7s
Generate UUIDv7 identifiers for applications requiring time-ordered unique IDs. Specify quantity as needed.
Instructions
Generates a specified number of UUIDv7 (default is 1).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | The number of UUIDs to generate |
Implementation Reference
- server.py:23-26 (registration)Registers the 'generate_uuid7s' tool using FastMCP @mcp.tool decorator.@mcp.tool( name="generate_uuid7s", description="Generates a specified number of UUIDv7 (default is 1).", )
- server.py:27-30 (handler)The handler function for the 'generate_uuid7s' tool, which validates input via Annotated Field and delegates to the implementation.def generate_uuid7s( count: Annotated[int, Field(description="The number of UUIDs to generate", default=1, ge=1)], ) -> list[str]: return generate_uuid7s_impl(count)
- tools/generate_uuid_tool.py:7-20 (helper)Core implementation that generates the specified number of UUIDv7 using the uuid6 library.def generate_uuid7s_impl( count: Annotated[int, Field(description="The number of UUIDs to generate", default=1, ge=1)], ) -> list[str]: """ Generates a specified number of UUIDv7. Args: count: The number of UUIDs to generate. Defaults to 1. Must be 1 or greater. Returns: A list of UUIDv7 strings. """ return [str(uuid6.uuid7()) for _ in range(count)]