Skip to content

Add tags option to create_note and update_note#9

Open
inwoodev wants to merge 1 commit into
yuna0x0:mainfrom
inwoodev:add-note-tags
Open

Add tags option to create_note and update_note#9
inwoodev wants to merge 1 commit into
yuna0x0:mainfrom
inwoodev:add-note-tags

Conversation

@inwoodev

Copy link
Copy Markdown

What

Adds a tags field (array of strings) to CreateNoteOptionsSchema and UpdateNoteOptionsSchema.

Why

The HackMD REST API and @hackmd/api both support a note tags field on create and update (it's part of NoteType/CreateNote/UpdateNote). The note tools already forward the entire payload/options object straight to client.createNote / client.updateNote, so the only thing preventing MCP clients from setting structured tags is that the two zod schemas don't expose the field.

Without this, the only way to "tag" a note via MCP is inline body text, which the HackMD UI's tag search doesn't pick up.

Change

Two lines — one per schema:

tags: z.array(z.string()).optional().describe("Note tags"),

Verification

Built with tsc (no type errors). Ran the built server over stdio and confirmed create_note/update_note advertise payload.tags, then end-to-end against a real account: update_note with payload.tags: ["resume","worklog"]get_note returns those tags with tagsUpdatedAt set.

🤖 Generated with Claude Code

The HackMD REST API and @hackmd/api support a note `tags` field (array of
strings) on both create and update, and the note tools already forward the
whole payload to the client. Exposing `tags` in CreateNoteOptionsSchema and
UpdateNoteOptionsSchema lets MCP clients set a note's structured tags instead
of only inline body text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@yuna0x0 yuna0x0 self-assigned this Jun 10, 2026
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.

2 participants