get_notebook_fingerprint
Generate a deterministic notebook fingerprint and per-paragraph sub-hashes to check if cached docs are stale; server-side comparison returns match status and exact changed paragraph IDs.
Instructions
Get a deterministic content fingerprint of a notebook, plus per-paragraph sub-hashes.
Cheap freshness check for cached notebook documentation. Only stable content is
hashed (paragraph id, title, code text); execution status, output, form
values/definitions, chart configs, and paragraph order are all excluded — none of
those flag the notebook stale.
The comparison against the cached doc happens server-side — never hand-compare
hash maps. Preferred: pass `spec_path` (the spec file under $WIKI_DOCS_PATH) and
the server reads the stored fingerprint/units from its frontmatter itself; the
response gains `"match": true|false` and `"diff": {changed, added, removed}`
naming the exact paragraph ids that differ. If the spec can't be used, the
response carries a `spec_note` explaining why and no match/diff. Fallback when
there is no docs repo: pass the stored values explicitly as `known_fingerprint` /
`known_units` (they take precedence over `spec_path` if both are given).
Args:
notebook_id: The notebook ID to fingerprint
spec_path: Optional path to the cached spec file inside $WIKI_DOCS_PATH
known_fingerprint: Optional stored overall fingerprint to compare against
known_units: Optional stored per-paragraph sub-hash map to diff against
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec_path | No | ||
| known_units | No | ||
| notebook_id | Yes | ||
| known_fingerprint | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |