Repository navigation
Guide AI clients to create HTML content by default - #20
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
🟡 Changes recommended
The update descriptions omit that rawType must be omitted when raw is absent, which can cause clients to receive INVALID_ARGUMENT for metadata-only updates in both PostTools and SinglePageTools.
1 open issue
What changed in this PR
Updates MCP tool metadata to guide AI clients toward HTML content compatible with Halo’s built-in rich text editor, addressing #19 without changing runtime behavior.
Changes:
- Adds shared guidance recommending HTML and explaining when Markdown is appropriate.
- Updates post and single-page create/update schemas with editor compatibility guidance and revised
rawTypedescriptions.
| File | Description |
|---|---|
src/main/java/run/halo/mcpserver/tools/ToolSupport.java |
Defines shared content-format guidance. |
src/main/java/run/halo/mcpserver/tools/SinglePageTools.java |
Updates single-page tool field descriptions. |
src/main/java/run/halo/mcpserver/tools/PostTools.java |
Updates post tool field descriptions. |
Review effort: Balanced

Problem
The default
rawTypeis alreadyhtml, but thehalo_create_post,halo_update_post,halo_create_single_page, andhalo_update_single_pagetool schemas describedrawTypeas "such as html or markdown" and did not explain editor compatibility. AI clients therefore often created Markdown content, which Halo's built-in rich text editor cannot preview or edit unless a Markdown editor plugin is installed.See #19.
Changes
RAW_TYPE_DESCRIPTIONinToolSupportexplaining thathtmlis the default and is compatible with Halo's built-in rich text editor.rawandrawTypefield descriptions for post and single page create/update tools to recommend HTML body fragments, and to use Markdown only when the user explicitly requests it or confirms a Markdown editor plugin is installed.rawTypeis only valid whenrawis provided, and tell clients to reuse the existingrawTypewhen updating content.DEFAULT_RAW_TYPEacross tool groups so the description stays in sync with the actual default.No runtime behavior changes; only tool metadata is updated.
Testing
./gradlew spotlessApply testCloses #19