execute_joplin_readonly_script
Execute JavaScript to read and search Joplin notes and notebooks without modification. Access pre-formatted output for notebooks and notes.
Instructions
Execute JS with global 'joplin' object in read-only mode. Top-level await. Return the result. Modifications, deletions, and creations are blocked.
NOTEBOOKS (read-only): listNotebooks(fields?, orderBy?, orderDir?, limit?) getNotebook(id) getNotebookNotes(notebookId, fields?, orderBy?, orderDir?, limit?) getNotebookTree(notebookId, depth?) — formatted tree getAllNotebooksTree({ exclude? }) — notebooks only, respects scope getScopedTree({ exclude?, depth? }) — notebooks + notes, respects scope
NOTES (read-only): listAllNotes(fields?, includeDeleted?, orderBy?, orderDir?, limit?) searchNotes(query) — returns note array readNote(id) — formatted display with metadata + line numbers getNote(id) — raw object getNoteLineRange(id, startLine, endLine) searchInNote(id, pattern) getNoteSections(id)
Call as joplin.notebooks.X() or joplin.notes.X().
SEARCH: searchNotes("any:1 term1 term2"). Use OR/synonyms, not user's literal phrase. Syntax: "any:1", "tag:X", "notebook:X", "title:X", "updated:month-1", "type:todo", "iscompleted:0", "docker*", "-excluded".
RULES:
These methods return pre-formatted output: readNote, getNoteLineRange, searchInNote, getNoteSections, getNotebookTree, getAllNotebooksTree, getScopedTree. After calling them, respond only "Done." — do not repeat, summarize, or reformat the output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | The JavaScript code to execute. |