4.9 KiB
4.9 KiB
HomAroma MCP Guide for LLMs
This guide explains how to use the HomAroma MCP tools safely and consistently.
Core Rules
- Prefer the dedicated block tools over the generic
add_page_section/update_page_sectiontools when available. - Use
update_page_translationswhen you need to set several languages for a page title in one call. - Treat localized fields and plain strings differently.
- Read back the page after edits when you need confirmation.
Finding a Page
- Use
get_dynamic_page_detailwith the page slug when you already know the slug. - Use
list_dynamic_pages_metadatawhen you need to search all pages quickly. - The dynamic page detail response includes the page
id, which is thepageIdyou use for section tools.
Create Page Response Contract
Use create_page_with_section only when the slug does not exist. It atomically
creates a new page and its first section; it does not update an existing page.
If it returns PAGE_SLUG_EXISTS, use the returned pageId with
add_page_section.
To add another block to an existing page:
- Call
get_dynamic_page_detailwith the slug. - Call
get_page_block_schemafor the desired block type. - Call
add_page_sectionwith the returned pageid. - Call
reorder_page_sectionsif the new block must move relative to existing blocks. - Read the page back with
get_dynamic_page_detail.
create_dynamic_page now returns a structured response that is easy for LLMs to parse:
successoperationpageIdslugtitleisPublisheddiagnosticpage
Use diagnostic as the human-readable explanation, not as the only signal of success.
Section Tool Mapping
update_hero_articleupdate_rich_textupdate_scent_notes_breakdownupdate_quote_calloutupdate_product_carouselupdate_accordionupdate_contact_infoupdate_contact_form
These tools return a normalized response with:
successtoolsectionTypesectionIdupdatedFieldsappliedPayloadnotessection
Payload Shape Cheat Sheet
Localized string
Use this when a field can be translated:
{ "th": "ข้อความภาษาไทย", "en": "English text" }
Plain string
Use one string only for URLs, slugs, IDs, and booleans/numbers as appropriate.
Block-Specific Rules
HERO_ARTICLE
- Localized:
title,subtitle,author,category - Plain string:
publishDate,date,imageUrl,backgroundImageUrl,overlayColor - The image is passed as a URL string in
imageUrl
RICH_TEXT
titleis optional and localizedcontentis required and localized- HTML is allowed in
content
ARTICLE_MEDIA
bodyis required, localized plain text; do not send HTMLheading,imageAlt, andimageCaptionare localizedimageUrlis a plain URL or website-relative media pathimageAltis required wheneverimageUrlis presentimagePositionacceptsleft,right, ortopwidthacceptsnarrow,standard, orwidebackgroundacceptsdefaultormuted
SCENT_NOTES_BREAKDOWN
titleanddescriptionare localized- Each note item may be a plain string or a localized string object
heartNotesandmiddleNotesare mirrored by the backend
QUOTE_CALLOUT
quoteis required and localizedauthorandroleare optional localized fields
PRODUCT_CAROUSEL
titleanddescriptionare localizedcollectionId,limit,showPrice,showAddToCart, andproductsare plain values- If
productsis omitted, the backend can auto-populate products on read-back
ACCORDION
titleis optional and localizedcategoriesis required- Each category needs:
- localized
name - optional
icon - at least one question
- localized
- Each question needs localized
qanda
CONTACT_INFO
titleis optional and localizedaddressandhoursare localizedemailandlineare plain strings
CONTACT_FORM
titleandsubtitleare localized- There are no extra fields
Recommended Flow
- Determine whether the page already exists.
- For a new page, use
create_page_with_sectionfor the page and first block. - For an existing page, get its id and use
add_page_section. - Create or update the page title translations.
- Update existing sections using the dedicated block tool when possible.
- Read back the page with
get_dynamic_page_detail. - If a section has auto-populated fields, trust the read-back result over the raw update payload.
What to Expect
PRODUCT_CAROUSELmay return products even when you did not send them.SCENT_NOTES_BREAKDOWNmay show mirrored note groups in the response.create_dynamic_pageshould now return a clear success/error contract.
Safe Usage Tips
- Do not guess the field shape from the UI alone.
- If a field is a URL, send a URL string.
- If a field is translated, send a localized object.
- If you are unsure, inspect an existing page with
get_dynamic_page_detailfirst.