Skip to main content

hash_sha384

Compute the SHA-384 (384-bit) hash of a UTF-8 string. Returns a 96-character lowercase hexadecimal digest.

SHA-384 is a truncated variant of SHA-512. It produces a slightly smaller output while sharing the same security properties and internal construction as SHA-512.

Parameters​

ParameterTypeRequiredDescription
inputstringYesThe UTF-8 string to hash.

Response​

FieldTypeDescription
hashstringLowercase hexadecimal digest.

Examples​

Hash a non-empty string​

{
"input": "hello world"
}

Result:

{
"hash": "fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd"
}

Hash an empty string​

The SHA-384 digest of the empty string is a well-known constant and a useful baseline for verifying tool output:

{
"input": ""
}

Result:

{
"hash": "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b"
}

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 input field is missing or not a string.protocol error (invalid_params)
internal_errorAn 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 96 lowercase hex characters (384 bits).
  • SHA-384 output is deterministic — the same input always produces the same digest.