Add tags option to create_note and update_note#9
Open
inwoodev wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
tagsfield (array of strings) toCreateNoteOptionsSchemaandUpdateNoteOptionsSchema.Why
The HackMD REST API and
@hackmd/apiboth support a notetagsfield on create and update (it's part ofNoteType/CreateNote/UpdateNote). The note tools already forward the entirepayload/optionsobject straight toclient.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:
Verification
Built with
tsc(no type errors). Ran the built server over stdio and confirmedcreate_note/update_noteadvertisepayload.tags, then end-to-end against a real account:update_notewithpayload.tags: ["resume","worklog"]→get_notereturns those tags withtagsUpdatedAtset.🤖 Generated with Claude Code