Skip to content

Add add_note and update_note tools for diary notes - #77

Open
paultristanwagner wants to merge 1 commit into
rwestergren:mainfrom
paultristanwagner:day-notes
Open

paultristanwagner wants to merge 1 commit into
rwestergren:mainfrom
paultristanwagner:day-notes

Conversation

@paultristanwagner

Copy link
Copy Markdown

All code in this PR was written by an AI agent (Claude Opus 5.5) working with me; I directed it and tested the results on my own account. Feel free to take, change or drop any part of it.

Part of #73.

Adds add_note and update_note tools for diary notes.

The app writes notes through its photo upload endpoint, not the JSON API: POST /photoupload, as a
multipart form, authenticated by the session token in a sessionKey
field.

field add edit
action diaryImage diaryImage
sessionKey session token session token
noteId 0 the note's id
day, order where it goes unchanged
deleteExistingPhoto true true
noteText text new text

It answers {"noteId": …, "text": …, "day": …, "order": …}. Verified
against the live API on 1900-01-02. Notes show up in get_diary as
"type": "Note" entries. Deleting them needs the v3 delete with the note
keyed by id (#74).

Changes:

  • client: add_note(text, day, diary_group) and
    update_note(note_id, text, day), sharing _save_note. The form is
    built with httpx and posted through the client's existing connection.
    update_note finds the note in get_diary so it keeps its day and
    position.
  • server: add_note and update_note tools.
  • README: tool table rows.

https://claude.ai/code/session_01MCJFDo71qoSqTRtcGfkpXJ

The app writes day notes through /photoupload: a multipart form carrying
the session token as `sessionKey`, noteId 0 to create or the note's id to
overwrite it, plus day, order and the text. Verified against the live API.

Claude-Session: https://claude.ai/code/session_01MCJFDo71qoSqTRtcGfkpXJ

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant