feat(mcp): enhance instructions with post content format rules#351
Conversation
Added critical rules for post content format and HTML requirements.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
marble-mcp | da8ed1f | Commit Preview URL Branch Preview URL |
Jun 03 2026, 10:28 AM |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughUpdated server instructions in MCP to require HTML-only content for post mutations, clarified auth and destructive-action workflows, distinguished read vs write tool behavior, tightened allowed attributes and inline styles, standardized media/embed formats, and turned disallowed markup into an explicit checklist. ChangesMCP Post Handling Guidance Clarification
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the Marble MCP server’s agent-facing instructions to prevent agents from round-tripping Markdown into post mutation tools by clearly separating read-format convenience (Markdown) from write-format requirements (clean semantic HTML).
Changes:
- Added a “Critical post content format rule” clarifying that
create_post/update_postmust always receive clean HTML incontent, even if read tools returned Markdown. - Added a safer read/edit/write workflow and concrete “bad Markdown write” vs “good HTML write” examples.
- Reorganized and clarified HTML sanitization guidance (allowed tags/URLs/attributes/styles and disallowed markup).
| - **a**: href, target | ||
| - **img**: safe sanitizer defaults such as **src**, **alt** | ||
| - **img**: src, alt | ||
| - **iframe**: src, allowfullscreen, style, width, height | ||
| - **figure**: src, alt, data-width, caption, data-align, data-type | ||
| - **video**: src, controls, preload, muted, loop, playsinline |
|
@copilot can you fix the formatting issue related to the form? |
Description
This PR updates the MCP server instructions for Marble post workflows to make the post content format rules clearer and safer for agents.
The main change is clarifying that read tools may return post content as Markdown for convenience, but mutating post tools such as
create_postandupdate_postmust always receive clean HTML in thecontentfield.It also adds explicit examples of invalid Markdown write content and valid HTML write content, plus a safer read/edit/write workflow for agents.
Motivation and Context
The previous instructions could be confusing for agents because post content may be read as Markdown, while post creation and updates require HTML.
This read/write mismatch can cause agents to mistakenly round-trip Markdown back into
create_postorupdate_post, resulting in malformed post content or overwritten editor output.This change makes the expected behavior explicit:
How to Test
get_posts,search_posts, andget_postare described as read tools where Markdown may be returned for convenience.create_postandupdate_postare described as write tools that require clean HTML in thecontentfield.update_post.Screenshots (if applicable)
N/A
Video Demo (if applicable)
N/A
Types of Changes
Summary by CodeRabbit