uuid_verify_v1
Verify that a string is a well-formed UUID and that it is version 1 (time-based, MAC address). Returns valid: false for any other version.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | Yes | The UUID string to verify as version 1. |
Response
| Field | Type | Description |
|---|---|---|
valid | boolean | true if the input is a well-formed UUID v1. |
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
Assert a known v1 UUID passes
{
"uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
Result:
{
"valid": true,
"version": 1,
"variant": "RFC4122"
}
A v4 UUID fails the v1 check
{
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
Result:
{
"valid": false,
"version": 4,
"variant": "RFC4122",
"error": "expected version v1 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, so you can see the actual version alongside the error.