createTopCategory
Creates a top-level member category for directory classification. Requires a name and URL-friendly filename.
Instructions
Create a category - Create a new TOP-level member category. Writes live data.
A Top Category is the highest level of the 3-tier member classification (e.g., "Restaurants"). It populates the profession_id field on user records. Backed by BD's list_professions table.
Use when: explicitly building out the site's taxonomy BEFORE members exist. If you're creating members and want categories to be auto-created by name, skip this and pass profession_name directly to createUser - BD auto-creates missing top-level categories on member-create.
Required: name, filename.
Pre-check before create: BD does NOT enforce uniqueness on filename. Two top categories with the same slug -> which one resolves at /filename is undefined. Do a server-side filter-find: listTopCategories property=filename property_value=<proposed> property_operator==. Zero rows = slug free; >=1 row = taken. Do NOT paginate unfiltered lists - filtered lookup is one tiny response. If taken: reuse via updateTopCategory, OR ask the user, OR pick an alternate filename and re-check. Wrapper safety net: on a missed pre-check, the wrapper auto-suffixes filename on collision (-1...-20) and surfaces the suffix in the response. Pre-checking still preferred — auto-suffix surprises the caller in URL-sensitive workflows.
Parameter guidance:
name- human-readable (e.g. "Restaurants", "Dentists")filename- URL-slug form (e.g. "restaurants") used in public member profile URLsdesc,keywords,icon,sort_order,lead_price,image- all optional
See also: listTopCategories (list all), getTopCategory (by ID), createSubCategory (add a sub-category under this top).
Writes live data: changes are immediately visible on the public site.
Returns: { status: "success", message: {...createdRecord} } including the new profession_id. Use that value to populate users_data.profession_id on member records.
Common workflow - full 3-tier setup ("create Restaurants -> Sushi -> assign Alice"):
createTopCategorywithname="Restaurants",filename="restaurants"-> returnsprofession_id(e.g. 42)createSubCategorywithname="Sushi",profession_id=42,filename="sushi"-> returnsservice_id(e.g. 17)Assign Alice:
updateUserwithuser_id=<Alice>,profession_id=42,services="17"(simple), ORcreateMemberSubCategoryLinkwithuser_id=<Alice>,service_id=17,avg_price=...,specialty=1(with per-link metadata)
How a member gets classified on their public profile:
users_data.profession_id-> points at a single Top Category (the member's primary classification; shown in URL slug)users_data.services-> CSV of Sub Category IDs the member is tagged with (multiple allowed; simpler than the join table)rel_servicesrows (Member ↔ Sub Category links) -> used when you need per-link metadata likeavg_price,specialty,num_completed. Optional; most sites use just the CSV field.
Sub-sub-categories: createSubCategory with master_id=<parent service_id> creates a Sub Category nested under another Sub Category (a "sub-sub"). master_id=0 (default) means the Sub Category sits directly under a Top Category (the profession_id).
There is NO createProfession or createService tool in this MCP — those are BD's internal table names. Use createTopCategory / createSubCategory instead (BD's table-name → tool-name mapping is documented in Rule: Table to endpoint).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Top-level category name (e.g. "Restaurants", "Dentists"). | |
| filename | Yes | URL-slug form of the name (e.g. "restaurants"). Used in public profile URL paths. | |
| desc | No | Short internal taxonomy-row label. **Even if the user says "description" - this is NOT an SEO description.** Most BD themes don't render this field. For SEO copy on the Top-Category public search page (H1, intro, meta tags), create a WebPage with `seo_type=profile_search_results` + matching slug (see `createWebPage`). Short internal blurb only here. | |
| keywords | No | Fuzzy-search synonyms for on-site category matching - NOT SEO meta-keywords. Comma-separated single words (no spaces): synonyms, abbreviations, slang, common misspellings. Example for `Doctor`: `doc,physician,md,medic,gp,specialist`. ~5-10 max. Skip SEO phrases like `doctor near me` - those aren't fuzzy matchers. Optional. | |
| icon | No | Icon identifier (e.g. a Font Awesome class or image filename). | |
| sort_order | No | Display order among top-level categories. Lower = earlier. | |
| lead_price | No | Per-lead price charged for leads matching this category (decimal). | |
| image | No | Image filename for the category icon/banner. |