Safety
These actions are side-effectful by default
item createitem add-doiitem add-urlitem add-fileitem updateitem trashitem restoreitem attachitem note additem note updateitem note deleteitem tag additem tag removeitem tag batchitem annotation createitem annotation create-areacollection createcollection renamecollection deletecollection add-itemcollection remove-itemlibrary saved-search createlibrary saved-search deletelibrary duplicates-merge --confirmsync update-status --applyconfig initconfig setconfig profiles use
Execution rules
- If the user clearly asked for the action, do it
- If the user only wants inspection or analysis, do not mutate the library
- Confirm intent for these actions before proceeding:
item trashitem note deletecollection deletelibrary saved-search deletelibrary duplicates-merge --confirmsync update-status --apply
Read/write boundary
- Local reads:
zotero.sqlite, attachment storage, and local index sidecars - Remote writes: Zotero Web API
Never write directly to zotero.sqlite.
What to do when write access is missing
If doctor shows missing credentials:
- stay in read-only mode
- tell the user exactly what is missing
- do not pretend the action succeeded
If the task is configuration troubleshooting:
- inspect with
config showfirst - use
config initorconfig setonly when the user wants the environment changed - treat profile switching as a side effect too
Extra notes for annotations and attach mode
- annotation creation requires both local PDF access and write credentials
attach-mode autofailing to find an OA PDF does not mean the whole command failed