# hash_required

`fs_write` would replace an existing file and no `expect_sha256` came with it: get its
SHA-256 with `fs_stat` and `hash=true` and pass it. Nothing was written.

**In short:** Over MCP the tool result is an error with the text `hash_required: <message>`, and a second line `details: …` when there are details. Over HTTP the answer is `{"error": {"code": "hash_required", "message": "…"}}`.

## What to do

Get the file's SHA-256 with `fs_stat` and `hash=true` (or use the `sha256` your last write of it returned), then repeat the `fs_write` with it as `expect_sha256`. Nothing was written.
