Joplin Manage Tags
This skill manages tags in Joplin and handles tagging/untagging notes via the REST API.
Configuration
- Base URL:
http://localhost:${JOPLIN_PORT:-41184} - Auth Token:
$JOPLIN_TOKEN
List All Tags
curl -s "http://localhost:${JOPLIN_PORT:-41184}/tags?token=$JOPLIN_TOKEN&fields=id,title"
Pagination
curl -s "http://localhost:${JOPLIN_PORT:-41184}/tags?token=$JOPLIN_TOKEN&fields=id,title&page=2"
Get a Tag
curl -s "http://localhost:${JOPLIN_PORT:-41184}/tags/TAG_ID?token=$JOPLIN_TOKEN"
Create a Tag
curl -s -X POST "http://localhost:${JOPLIN_PORT:-41184}/tags?token=$JOPLIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "tag-name"
}'
Note: Tag titles are case-insensitive and typically lowercase.
Rename a Tag
curl -s -X PUT "http://localhost:${JOPLIN_PORT:-41184}/tags/TAG_ID?token=$JOPLIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "new-tag-name"
}'
Delete a Tag
curl -s -X DELETE "http://localhost:${JOPLIN_PORT:-41184}/tags/TAG_ID?token=$JOPLIN_TOKEN"
This removes the tag from all notes. Confirm with the user before deleting.
List Notes with a Specific Tag
curl -s "http://localhost:${JOPLIN_PORT:-41184}/tags/TAG_ID/notes?token=$JOPLIN_TOKEN&fields=id,title,updated_time"
Add a Tag to a Note
curl -s -X POST "http://localhost:${JOPLIN_PORT:-41184}/tags/TAG_ID/notes?token=$JOPLIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "NOTE_ID"
}'
Remove a Tag from a Note
curl -s -X DELETE "http://localhost:${JOPLIN_PORT:-41184}/tags/TAG_ID/notes/NOTE_ID?token=$JOPLIN_TOKEN"
List Tags on a Note
curl -s "http://localhost:${JOPLIN_PORT:-41184}/notes/NOTE_ID/tags?token=$JOPLIN_TOKEN&fields=id,title"
Finding a Tag by Name
curl -s "http://localhost:${JOPLIN_PORT:-41184}/search?query=TAG_NAME&type=tag&token=$JOPLIN_TOKEN&fields=id,title"
Or filter from the full list:
curl -s "http://localhost:${JOPLIN_PORT:-41184}/tags?token=$JOPLIN_TOKEN&fields=id,title" | jq '.items[] | select(.title == "tag-name")'
Bulk Tagging Workflow
To tag multiple notes with the same tag:
- Find or create the tag to get its ID.
- For each note, POST to
/tags/TAG_ID/noteswith the note ID.
Workflow
- Resolve tag names to IDs when needed (search or list).
- Resolve note titles to IDs when needed (search notes).
- Perform the requested operation.
- Confirm destructive operations (delete) with the user.
- Report success with tag name and ID.
Error Handling
- 403: Invalid token
- 404: Tag or note not found — verify IDs
- Connection refused: Joplin not running