uuid_verify_v7
Verify that a string is a well-formed UUID and that it is version 7 (time-ordered, RFC 9562). Returns valid: false for any other version.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | Yes | The UUID string to verify as version 7. |
Response
| Field | Type | Description |
|---|---|---|
valid | boolean | true if the input is a well-formed UUID v7. |
version | integer | Detected UUID version. Present even when valid is false (as long as the UUID parses). null for malformed input. |
variant | string | UUID variant string. Present when the UUID is structurally valid. null for malformed input. |
error | string | Human-readable failure reason. Only present when valid is false. |
Examples
A valid v7 UUID passes
{
"uuid": "0190d3a2-1234-7abc-8def-000000000001"
}
Result:
{
"valid": true,
"version": 7,
"variant": "RFC4122"
}
A v4 UUID fails the v7 check
{
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
Result:
{
"valid": false,
"version": 4,
"variant": "RFC4122",
"error": "expected version v7 but got v4"
}
Errors
Each failure carries a precise code in the response. Argument-schema and server errors are JSON-RPC protocol errors; a rejected value is returned as a tool result with isError: true (so the agent can read the code and self-correct).
| Code | When | Delivered as |
|---|---|---|
invalid_arguments | The uuid argument is missing or the wrong type. | protocol error (invalid_params) |
internal_error | An unexpected server error. | protocol error (internal_error) |
Notes
- A malformed UUID string is returned as
{ "valid": false, "error": "..." }, not as an MCP error. versionandvariantare included in the response even when the version assertion fails.