Skip to content

feat(#258): add file_path parameter to note_publish_article#259

Merged
drillan merged 4 commits into
mainfrom
feat/258-add-file-path-to-publish-article
Feb 1, 2026
Merged

feat(#258): add file_path parameter to note_publish_article#259
drillan merged 4 commits into
mainfrom
feat/258-add-file-path-to-publish-article

Conversation

@drillan

@drillan drillan commented Feb 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add file_path parameter to note_publish_article tool to extract tags from Markdown frontmatter when publishing existing drafts
  • When article_id is specified with file_path (and no explicit tags), tags are extracted from the Markdown file's YAML frontmatter
  • Explicit tags parameter takes precedence over file_path
  • file_path is ignored for new article creation (title/body mode)
  • Returns appropriate error message if file_path doesn't exist

Test plan

  • Unit tests added for all scenarios:
    • file_path provides tags when tags not specified
    • tags parameter takes precedence over file_path
    • file_path without tags publishes without tags
    • file_path not found returns error
    • file_path ignored for new article creation
  • All 645 unit tests pass
  • Type checking (mypy) passes
  • Lint (ruff) passes
  • Manual verification completed with real note.com publishing

Closes #258

🤖 Generated with Claude Code

drillan and others added 4 commits February 1, 2026 21:35
Add file_path parameter to note_publish_article tool to extract tags
from Markdown frontmatter when publishing existing drafts. This allows
users to preserve tags from the original Markdown file during publish.

- When article_id is specified with file_path (and no tags), tags are
  extracted from the Markdown file's YAML frontmatter
- Explicit tags parameter takes precedence over file_path
- file_path is ignored for new article creation (title/body mode)
- Returns appropriate error message if file_path doesn't exist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add file_path to expected properties in note_publish_article schema test.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ValueError handling when parsing Markdown file for tags extraction.
This prevents unhandled exceptions when the file has no title.

Also add test case for invalid Markdown file scenario.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@drillan drillan merged commit 528914f into main Feb 1, 2026
2 checks passed
@drillan drillan deleted the feat/258-add-file-path-to-publish-article branch February 1, 2026 12:43
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.

publish_article が既存の下書きのタグを保持しない

1 participant