hash_blake3
Compute the BLAKE3 (256-bit) hash of a UTF-8 string. Returns a 64-character lowercase hexadecimal digest.
BLAKE3 is a modern cryptographic hash function that is significantly faster than SHA-256 and SHA-512 on modern hardware while providing equivalent security guarantees. It is suitable for all new applications that require a secure hash.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | The UTF-8 string to hash. |
Response
| Field | Type | Description |
|---|---|---|
hash | string | Lowercase hexadecimal digest. |
Examples
Hash a non-empty string
{
"input": "hello world"
}
Result:
{
"hash": "d74981efa70a0c880b8d8c1985d075dbcbf679b99a5f9914e5aaf96b831a9e24"
}
Hash an empty string
The BLAKE3 digest of the empty string is a well-known constant and a useful baseline for verifying tool output:
{
"input": ""
}
Result:
{
"hash": "af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262"
}
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 input field is missing or not a string. | protocol error (invalid_params) |
internal_error | An unexpected server error. | protocol error (internal_error) |
Notes
- The input is always treated as a UTF-8 string. If you need to hash raw bytes, hex-encode them first.
- The digest is always 64 lowercase hex characters (256 bits).
- BLAKE3 output is deterministic — the same input always produces the same digest.
- BLAKE3 is the recommended choice when raw throughput matters (e.g. hashing large strings or running many hashes in sequence).