brilliant-directories-mcp 6.13.21 → 6.13.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -753,7 +753,7 @@ async function main() {
|
|
|
753
753
|
``,
|
|
754
754
|
`**Field-vs-hack rule (universal) — when BD ships a first-class field/toggle for a thing the user asks about, USE THE FIELD. Do not fake it with CSS, JS, template string-manipulation, or markup scrubbing.** Common cases: \`content_layout=1\` for WebPage full-bleed (not margin/padding hacks — see rule below); WebPage \`hide_header\` / \`hide_footer\` / \`hide_top_right\` / \`hide_header_links\` / \`hide_from_menu\` for page-chrome hiding (not \`display:none\` in \`content_css\`); Widget \`widget_viewport\` (\`front\`/\`admin\`/\`both\`) for where-to-render (not \`@media\` queries or \`body.admin-panel\` JS detection inside widget code); EmailTemplate \`unsubscribe_link=0\` to suppress the unsubscribe footer (not stripping the merge token out of \`email_body\`); MembershipPlan \`sub_active=0\` to retire a plan (not hacking signup widget markup); MembershipPlan \`hide_*_amount\` toggles to remove specific payment cycles from public checkout while keeping them available for admin-created subscriptions; FormField view-flag toggles (\`field_input_view\` / \`field_display_view\` / \`field_lead_previews\` / \`field_email_view\` / \`field_table_view\`) for per-field visibility on each rendering surface (not CSS or email-template surgery). Before reaching for a CSS/JS workaround on anything user-facing, check whether the resource has a field/toggle for it in the GET response — those are the supported, audit-safe paths.\`,
|
|
755
755
|
\`\`,
|
|
756
|
-
\`**Full-bleed / edge-to-edge sections on WebPages — use \`content_layout=1\`, NOT CSS margin hacks.** BD pages default to a max-width container ("Normal Width"); individual sections stay inside that container. When a user wants a section to span the full browser width (full-bleed background color band, hero-style image section, photo strip spanning viewport, etc.), set the PAGE-LEVEL field **\`content_layout=1\`** ("Full Screen Page Width" in admin) on \`createWebPage\` / \`updateWebPage\`. Then write normal HTML in \`content\` — give each full-bleed section its own background via a scoped CSS rule in \`content_css\` (e.g. \`.my-page .mission { background: #182e45; padding: 80px 30px; }\`), and wrap the TEXT inside each section in a \`<div class="container">\` or a page-scoped inner class with a \`max-width\` so the readable copy stays centered while the background goes edge-to-edge. **NEVER** try to fake full-bleed with CSS hacks like \`margin: 0 -9999px; padding: 0 9999px\` or negative horizontal margins — those break horizontal scroll, fight \`overflow: hidden\` parents, prevent future layout changes, and are a BD anti-pattern. \`content_layout=1\` is the supported, built-in path; check the field before reaching for CSS tricks. Default \`content_layout=0\` stays appropriate for plain content pages where everything should stay inside the site's normal container.\n\nWebPage asset routing — route each type of code to its dedicated field. The \`content\` field is a Froala rich-text editor: **HTML only — no \`<style>\` or \`<script>\` tags** (Froala strips them, also strips \`<form>\`, \`<input>\`, \`<select>\`, \`<textarea>\`, and \`contenteditable\` attributes). Route CSS/JS/head deps to their dedicated fields: **\`content_css\`** = raw CSS rules pasted directly, NO \`<style>\` wrapper, renders in page head, scope every selector to a unique page class (never bare \`body\`/\`h1\`/\`p\`; never target reserved platform classes \`.container\`/\`.froala-table\`/\`.image-placeholder\`). **\`content_footer_html\`** = JavaScript and scripts only (wrap in \`<script>\` tags, IIFE-wrap and scope to a unique page class; third-party embeds, pixels, schema) — NOT for extra body HTML. **\`content_head\`** = head-only deps (\`<link>\` stylesheets, \`<meta>\` tags, structured-data JSON-LD, head-required scripts). ⚠️ **\`content_footer\` — MISLEADING NAME, NOT footer HTML.** Misnamed relic column; BD repurposed it as the page-access gate. Valid values: \`""\` (Public For Everyone, default), \`"members_only"\` (logged-in members only), \`"digital_products"\` (only buyers of digital-product items). Do NOT put HTML in \`content_footer\`. **ALL CSS must go in \`content_css\` — inline \`style="..."\` attributes are NOT supported** (Froala strips them on save). Give every element that needs styling a class (e.g. \`<div class="hero-banner">\`), then target the class from \`content_css\`. No exceptions, including one-off tweaks: if a rule only applies to one element, give it a unique class and put the rule in \`content_css\`. This is the single path of truth for any WebPage styling. **Diagrams, charts, and SVG graphics — NEVER put \`<svg>\` or \`<canvas>\` in \`content\`.** Froala strips both along with \`<script>\`/\`<style>\`/\`<form>\`, so generated charts (flowcharts, comparison diagrams, pyramids, timelines, data viz) will render as empty on save. Correct path: build a custom Widget (\`createWidget\`) that holds the raw SVG or chart JS, then embed it in the page via the \`[widget=Widget Name]\` shortcode inside \`content\`. Widgets render outside Froala's sanitizer and support arbitrary HTML/SVG/JS. For light-weight visual diagrams (comparison tables, colored callouts, step-lists), CSS-styled \`<div>\`/\`<table>\` elements with classes targeted from \`content_css\` render cleanly through Froala — no SVG needed. PHP is NOT supported in any of these fields — they're data, not server-side templates; if a user asks about PHP logic, suggest a widget instead. **Admin Froala editor gotcha:** the admin editor applies \`content_css\` but does NOT run \`content_footer_html\` scripts. Any hide-by-default CSS (scroll reveals, tab panels, accordion collapse, modals, non-active slider slides) that JS is meant to un-hide will permanently hide that content in the admin editor. Gate such rules behind a \`.js-ready\` class on a page-scoped wrapper (e.g. \`.my-page.js-ready .reveal { opacity:0 }\` not \`.my-page .reveal { opacity:0 }\`), and have \`content_footer_html\` JS add that class on load: \`document.querySelector('.my-page')?.classList.add('js-ready');\` as its first line. Live site: JS adds the class immediately, CSS activates, reveals work. Admin editor: class never added, content stays visible and editable.`,
|
|
756
|
+
\`**Full-bleed / edge-to-edge sections on WebPages — use \`content_layout=1\`, NOT CSS margin hacks.** BD pages default to a max-width container ("Normal Width"); individual sections stay inside that container. When a user wants a section to span the full browser width (full-bleed background color band, hero-style image section, photo strip spanning viewport, etc.), set the PAGE-LEVEL field **\`content_layout=1\`** ("Full Screen Page Width" in admin) on \`createWebPage\` / \`updateWebPage\`. Then write normal HTML in \`content\` — give each full-bleed section its own background via a scoped CSS rule in \`content_css\` (e.g. \`.my-page .mission { background: #182e45; padding: 80px 30px; }\`), and wrap the TEXT inside each section in a \`<div class="container">\` or a page-scoped inner class with a \`max-width\` so the readable copy stays centered while the background goes edge-to-edge. **NEVER** try to fake full-bleed with CSS hacks like \`margin: 0 -9999px; padding: 0 9999px\` or negative horizontal margins — those break horizontal scroll, fight \`overflow: hidden\` parents, prevent future layout changes, and are a BD anti-pattern. \`content_layout=1\` is the supported, built-in path; check the field before reaching for CSS tricks. Default \`content_layout=0\` stays appropriate for plain content pages where everything should stay inside the site's normal container.\n\nWebPage asset routing — route each type of code to its dedicated field. The \`content\` field is a Froala rich-text editor: **HTML only — no \`<style>\` or \`<script>\` tags** (Froala strips them, also strips \`<form>\`, \`<input>\`, \`<select>\`, \`<textarea>\`, and \`contenteditable\` attributes). Route CSS/JS/head deps to their dedicated fields: **\`content_css\`** = raw CSS rules pasted directly, NO \`<style>\` wrapper, renders in page head, scope every selector to a unique page class (never bare \`body\`/\`h1\`/\`p\`; never target reserved platform classes \`.container\`/\`.froala-table\`/\`.image-placeholder\`). **\`content_footer_html\`** = JavaScript and scripts only (wrap in \`<script>\` tags, IIFE-wrap and scope to a unique page class; third-party embeds, pixels, schema) — NOT for extra body HTML. **\`content_head\`** = head-only deps (\`<link>\` stylesheets, \`<meta>\` tags, structured-data JSON-LD, head-required scripts). ⚠️ **\`content_footer\` — MISLEADING NAME, NOT footer HTML.** Misnamed relic column; BD repurposed it as the page-access gate. Valid values: \`""\` (Public For Everyone, default), \`"members_only"\` (logged-in members only), \`"digital_products"\` (only buyers of digital-product items). Do NOT put HTML in \`content_footer\`. **ALL CSS must go in \`content_css\` — inline \`style="..."\` attributes are NOT supported** (Froala strips them on save). Give every element that needs styling a class (e.g. \`<div class="hero-banner">\`), then target the class from \`content_css\`. No exceptions, including one-off tweaks: if a rule only applies to one element, give it a unique class and put the rule in \`content_css\`. This is the single path of truth for any WebPage styling. **NEVER use \`@import\` inside \`content_css\`** (fonts, external stylesheets, anything). \`@import\` is render-blocking and causes FOUC and CLS — the page paints unstyled first, then shifts as the imported resource loads. Not accepted. Load external stylesheets and Google Fonts in the WebPage's \`content_head\` field as \`<link rel="stylesheet" href="...">\` tags, then use the declared font-family or class in \`content_css\`. Same rule for any third-party CSS dependency: link-tag in \`content_head\`, never \`@import\` in \`content_css\`. **Diagrams, charts, and SVG graphics — NEVER put \`<svg>\` or \`<canvas>\` in \`content\`.** Froala strips both along with \`<script>\`/\`<style>\`/\`<form>\`, so generated charts (flowcharts, comparison diagrams, pyramids, timelines, data viz) will render as empty on save. Correct path: build a custom Widget (\`createWidget\`) that holds the raw SVG or chart JS, then embed it in the page via the \`[widget=Widget Name]\` shortcode inside \`content\`. Widgets render outside Froala's sanitizer and support arbitrary HTML/SVG/JS. For light-weight visual diagrams (comparison tables, colored callouts, step-lists), CSS-styled \`<div>\`/\`<table>\` elements with classes targeted from \`content_css\` render cleanly through Froala — no SVG needed. PHP is NOT supported in any of these fields — they're data, not server-side templates; if a user asks about PHP logic, suggest a widget instead. **Admin Froala editor gotcha:** the admin editor applies \`content_css\` but does NOT run \`content_footer_html\` scripts. Any hide-by-default CSS (scroll reveals, tab panels, accordion collapse, modals, non-active slider slides) that JS is meant to un-hide will permanently hide that content in the admin editor. Gate such rules behind a \`.js-ready\` class on a page-scoped wrapper (e.g. \`.my-page.js-ready .reveal { opacity:0 }\` not \`.my-page .reveal { opacity:0 }\`), and have \`content_footer_html\` JS add that class on load: \`document.querySelector('.my-page')?.classList.add('js-ready');\` as its first line. Live site: JS adds the class immediately, CSS activates, reveals work. Admin editor: class never added, content stays visible and editable.`,
|
|
757
757
|
``,
|
|
758
758
|
`Brand kit — call \`getBrandKit\` ONCE at the start of any design-related task (building a widget, WebPage, post template, email, hero banner — anything where colors or fonts are chosen) so your output visually matches the site's brand. Returns a compact semantic palette (body / primary / dark / muted / success / warm / alert accents, card surface) plus body + heading Google Fonts, with inline \`usage_guidance\` explaining which role each color plays and tint rules. Cache the result for the rest of the session — the brand kit rarely changes within one conversation. **Derive hover/tinted/gradient colors from the returned palette values — never introduce unrelated hues.** The returned \`body.font\` and \`heading_font\` are already globally loaded on the site; do NOT redeclare them in \`content_css\` unless deliberately switching to a different family (and then \`@import\` the new Google Font in the same CSS).`,
|
|
759
759
|
``,
|
|
@@ -765,7 +765,7 @@ async function main() {
|
|
|
765
765
|
``,
|
|
766
766
|
`WebPage users_meta field-update workaround (CRITICAL). BD's \`list_seo\` table has a mix of DIRECT columns and EAV-stored fields in the \`users_meta\` table (keyed by database=list_seo + database_id=<seo_id> + key=<field>). On CREATE, \`createWebPage\` writes ALL fields correctly — direct columns AND users_meta rows are seeded together. On UPDATE, \`updateWebPage\` only writes the direct columns — the users_meta-stored fields are SILENTLY IGNORED (the write succeeds but the new value doesn't persist, live-verified). To update any of the following fields on an existing \`list_seo\` record, you MUST use \`updateUserMeta\` (or \`createUserMeta\` if the row doesn't exist yet) instead: \`linked_post_category\`, \`linked_post_type\`, \`disable_preview_screenshot\`, \`disable_css_stylesheets\`, \`hero_content_overlay_opacity\`, \`hero_link_target_blank\`, \`hero_background_image_size\`, \`hero_link_size\`, \`hero_link_color\`, \`hero_content_font_size\`, \`hero_section_content\`, \`hero_column_width\`, \`h2_font_weight\`, \`h1_font_weight\`, \`h2_font_size\`, \`h1_font_size\`, \`hero_link_text\`, \`hero_link_url\`. **Verified-live list — BD's \`list_seo\` EAV layer may include additional columns beyond these 18.** Reliable detection: after \`updateWebPage\`, re-GET and compare; if the value didn't persist, fall back to \`updateUserMeta\` / \`createUserMeta\` with \`database=list_seo\`. Any GET-returned \`list_seo\` field can be written via the EAV path. Workflow for each update: (1) \`listUserMeta\` with filter \`database=list_seo\`, \`database_id=<seo_id>\`, \`key=<field>\` to find the existing \`meta_id\`; (2) if found → \`updateUserMeta(meta_id=..., value=<new value>)\`; (3) if not found → \`createUserMeta(database=list_seo, database_id=<seo_id>, key=<field>, value=<new value>)\`. **Reads merge automatically** — \`getWebPage\` / \`listWebPages\` return the merged record including users_meta values at the top level; you do NOT need to query UserMeta separately for reads. **Delete cleanup:** when an agent calls \`deleteWebPage\`, it deletes the \`list_seo\` row but does NOT cascade-delete the corresponding users_meta rows. To prevent garbage buildup, after \`deleteWebPage(seo_id)\`, call \`listUserMeta\` with \`database=list_seo\`, \`database_id=<deleted seo_id>\` to find any orphan meta rows, then \`deleteUserMeta\` each one by its \`meta_id\`. Be SURGICAL — only delete meta rows where \`database_id\` exactly matches the deleted page's \`seo_id\`; never bulk-delete across other database_ids or other database-table values.`,
|
|
767
767
|
``,
|
|
768
|
-
`**Timestamps —
|
|
768
|
+
`**Timestamps — treat as REQUIRED on every update, even though BD doesn't enforce them.** BD does NOT auto-populate \`revision_timestamp\` or \`date_updated\` on update (live-verified: an \`updateWidget\` call that omits both leaves them at their prior values, even though the rest of the record changed). If an agent skips them, admin-UI "Last Update" displays stay stale, "recently updated" sorts lie, cache invalidation can misfire, and audit trails become unreliable. **Always include them in every \`update*\` payload** — the tool schema doesn't list these fields explicitly, but the MCP wrapper forwards unlisted keys verbatim, so sending them works. **Formats (live-verified 2026-04-20 across 9 resources):** (1) \`revision_timestamp\` → \`YYYY-MM-DD HH:mm:ss\` (dashes + colons, e.g. \`2026-04-20 19:34:51\`). Universal across widgets, forms, email templates, top categories, sub-categories, post types, membership plans, users_meta, AND list_seo WebPages. (2) \`date_updated\` → resource-dependent: widgets use \`YYYY-MM-DD HH:mm:ss\` (same as revision_timestamp); list_seo WebPages use \`YYYYMMDDHHmmss\` (no separators, e.g. \`20260420193451\`). Same field name, different formats — verify against the GET response. (3) \`date_added\` on users_meta → \`YYYYMMDDHHmmss\`. **Which fields per resource:** widgets = both (both dashes-and-colons); WebPages = both (different formats); forms/email templates/categories/subcategories/post types/membership plans/users_meta = \`revision_timestamp\` only. Set the current time in every exposed timestamp field on every update. On create, BD usually seeds initial timestamps server-side, but passing them explicitly is safe and recommended.`,
|
|
769
769
|
``,
|
|
770
770
|
`Member Search Results SEO pages — thin-content remedy: BD auto-generates dynamic search URLs for every valid location+category combo (e.g. \`california/beverly-hills/plumbers\`). Google penalizes thin pages (1–2 members). Convert to static via \`createWebPage\` with \`seo_type="profile_search_results"\` + \`filename=<exact slug>\` + custom SEO copy in \`content\`. Slug hierarchy (no leading slash, \`/\`-separated, any left-parent droppable): \`country/state/city/top_cat/sub_cat\`. **CRITICAL: \`filename\` MUST be a real location/category slug BD's dynamic router recognizes** — every segment must come from live lookups against \`listCountries\`/\`listStates\`/\`listCities\`/\`listTopCategories\`/\`listSubCategories\`. Arbitrary or made-up slugs (e.g. \`my-cool-page\`, \`foo-bar\`) return HTTP 404 on the public URL even though the \`list_seo\` record is created successfully — BD has no dynamic page to override. Country-only slug (\`united-states\` alone) also does NOT render for this page type — country slug only works as a left-parent PREFIX on longer slugs. For arbitrary-URL static pages, use \`seo_type=content\` instead (content pages route at any \`filename\`). Resolve segments via: \`listCountries\` (country slug = lowercase country_name with spaces → hyphens — no country_filename field exists), \`listStates\` (\`state_filename\`), \`listCities\` (\`city_filename\` — BD schema typo: city PK is \`locaiton_id\` NOT \`location_id\`, pass the typo'd form), \`listTopCategories\` (\`filename\`), \`listSubCategories\` (\`filename\`). Before create, check existence via \`listWebPages property=filename property_value=<slug>\`. **Required defaults on create and every update for profile_search_results pages** (unless user overrides): \`content_active=1\`, \`custom_html_placement=4\`, \`form_name="Member Search Result"\` (sidebar — NOT "Member Profile Page", which is for member profile pages; use "Member Search Result" on profile_search_results), \`menu_layout=3\` (Left Slim), \`date_updated=<current YYYYMMDDHHmmss timestamp>\` (BD does NOT auto-populate — always set to now on every write), \`updated_by\` (optional audit label like "AI Agent" or "API"). **Must auto-generate SEO meta for the specific location+category combo** — \`title\` (50–60 chars), \`meta_desc\` (150–160 chars), \`meta_keywords\` (~200 chars), \`facebook_title\` (55–60 chars, differ from title), \`facebook_desc\` (110–125 chars) — using human names (not slugs), natural "[city] [category]" / "in [location]" phrasing. Do NOT auto-set \`facebook_image\` (needs a user-uploaded asset). H1/H2 double-render trap: if hero enabled AND \`content\` contains \`<h1>\`/\`<h2>\`, both render — pick one location or the other, not both. **No max-width wrappers in \`content\` (or \`content_css\`) on profile_search_results pages** — BD's page layout already supplies the outer container; adding \`max-width: 960px; margin: auto\` or equivalent double-constrains and makes the SEO copy render as a narrow strip inside BD's already-centered container. Let content flow at the natural container width. Location + Sidebar CRUD are read-only by design in this MCP (create/delete deliberately omitted to prevent collisions with BD's auto-seeding and system layouts).`,
|
|
771
771
|
``,
|
|
@@ -947,7 +947,7 @@ async function main() {
|
|
|
947
947
|
warm_accent: "Attention accent — badges, highlights, tags, warm visual punctuation when design needs a pop of energy.",
|
|
948
948
|
alert_accent: "Urgency accent — errors, warnings, sale badges, limited-time callouts, elements that command immediate attention.",
|
|
949
949
|
tint_rule: "Derive lighter or darker tints from any palette color for backgrounds, hover states, borders, or low-emphasis UI layers. Do NOT introduce new unrelated hues.",
|
|
950
|
-
font_rule: "body.font and heading_font are already globally loaded on the site — do NOT redefine them in content_css.
|
|
950
|
+
font_rule: "body.font and heading_font are already globally loaded on the site — do NOT redefine them in content_css. To switch to a different family on a specific page, load the font in the WebPage's content_head field as a <link rel='stylesheet' href='https://fonts.googleapis.com/...'> tag, then use the font-family in content_css. NEVER @import fonts inside content_css — @import is render-blocking and causes FOUC/CLS (content shifts as the font loads). Same rule applies to external stylesheets: link-tag in content_head, never @import in content_css.",
|
|
951
951
|
},
|
|
952
952
|
};
|
|
953
953
|
// If any BD fetches failed outright (network / non-200), surface it so the
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brilliant-directories-mcp",
|
|
3
3
|
"mcpName": "io.github.brilliantdirectories/brilliant-directories-mcp",
|
|
4
|
-
"version": "6.13.
|
|
4
|
+
"version": "6.13.23",
|
|
5
5
|
"description": "Official MCP server for Brilliant Directories — manage members, posts, leads, reviews, and more.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"bin": {
|