Let hackmd_get_note leave the body out
Closed
PA
2d ago+56+56+01234567890123456789-4-4-0123456789
Closes #25
Adds include_content (default true) to hackmd_get_note. With false, the body is dropped from the result after body_hash is computed; every other field stays. With local_path the flag is refused like team_path and refresh, since the sync report has no body. The tool description and docs/tools.md say it saves context, not requests.
Tests
without_content_the_body_hash_stays: nocontent,body_hashof the body as read, other fields kept.exactly_one_of_note_ref_and_local_path_is_takennow also coverslocal_pathwithinclude_content: false.cargo test --all-features: 353 passed;cargo clippy --all-features --all-targets: clean.- Manual check against hackmd.io on a team note: the result without the body has the same
body_hashas a full read (about 1 KB instead of 23 KB).
š¤ Generated with Claude Code
Summary by cubic
Adds include_content (default true) to hackmd_get_note so callers can check many notes for changes or read their permissions without pulling every body into context.
- With
false, the body is dropped from the result afterbody_hashis computed; every other field stays. - HackMD still sends the whole note, so this saves context, not requests.
- With
local_path,include_content: falseis refused liketeam_pathandrefresh, since the sync report carries no body.