uuid_verify_v5
Verify that a string is a well-formed UUID and that it is version 5 (SHA-1 name-based). Returns valid: false for any other version.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | Yes | The UUID string to verify as version 5. |
Response
| Field | Type | Description |
|---|---|---|
valid | boolean | true if the input is a well-formed UUID v5. |
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 known v5 UUID passes
{
"uuid": "c66bbb60-d62e-5f17-a399-3a0bd237c503"
}
Result:
{
"valid": true,
"version": 5,
"variant": "RFC4122"
}
A v3 UUID fails the v5 check
{
"uuid": "c6db027c-615c-3b4d-959e-1a917747ca5a"
}
Result:
{
"valid": false,
"version": 3,
"variant": "RFC4122",
"error": "expected version v5 but got v3"
}
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.