Skip to main content

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​

ParameterTypeRequiredDescription
uuidstringYesThe UUID string to verify as version 5.

Response​

FieldTypeDescription
validbooleantrue if the input is a well-formed UUID v5.
versionintegerDetected UUID version. Present even when valid is false (as long as the UUID parses). null for malformed input.
variantstringUUID variant string. Present when the UUID is structurally valid. null for malformed input.
errorstringHuman-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).

CodeWhenDelivered as
invalid_argumentsThe uuid argument is missing or the wrong type.protocol error (invalid_params)
internal_errorAn unexpected server error.protocol error (internal_error)

Notes​

  • A malformed UUID string is returned as { "valid": false, "error": "..." }, not as an MCP error.
  • version and variant are included in the response even when the version assertion fails.