-
Notifications
You must be signed in to change notification settings - Fork 353
Open
Description
Bug Description
The notion-update-page tool improperly escapes user mentions (<mention-user> tags) when updating page content. User mentions that exist in the original content are converted to escaped strings like \\{\\{user://...\\}\\} instead of preserving the proper <mention-user url="{{user://...}}"/> format.
Steps to Reproduce
- Create or identify a Notion page with action items containing user mentions (e.g.,
<mention-user url="{{user://1f9d872b-594c-81cc-8948-0002e98318dd}}"/>) - Use the
notion-fetchtool to read the page - confirms mentions display correctly as<mention-user>tags - Use the
notion-update-pagetool withreplace_content_rangecommand to update a section containing user mentions - Fetch the page again with
notion-fetchto observe the result
Expected Behavior
User mentions should be preserved in their original format (<mention-user url="{{user://...}}"/>) and display correctly as user mentions in the Notion UI.
Actual Behavior
After updating, user mentions are escaped and appear as:
\\{\\{user://1f9d872b-594c-81cc-8948-0002e98318dd\\}\\}in the fetched content- Plain text in the Notion UI instead of clickable user mentions
Investigation & Additional Context
- The issue occurs even when the new content string includes properly formatted
<mention-user>tags - Multiple consecutive updates compound the escaping (e.g.,
{{{{https://...}}}}) - The
notion-fetchtool correctly reads and displays<mention-user>tags from original content - Only
notion-update-pagecauses the escaping - suggests the issue is in how the update tool processes or serializes the content before sending to the Notion API - This makes it impossible to programmatically update pages with action items or task lists that have user assignments without breaking the user mentions
Example
Original content (from notion-fetch):
- [ ] <mention-user url="{{user://1f9d872b-594c-81cc-8948-0002e98318dd}}"/> We need a story for table-body-skeleton
After using notion-update-page (from subsequent notion-fetch):
- [ ] \\{\\{user://1f9d872b-594c-81cc-8948-0002e98318dd\\}\\} We need a story for table-body-skeleton
Environment
- MCP Server: notion-mcp-server (official)
- Client: Claude Code
- Notion API version: Latest
Metadata
Metadata
Assignees
Labels
No labels