createSubCategory
Creates a new subcategory under a parent top category to classify members. Supports sub-sub nesting via master_id. Writes live data.
Instructions
Create a service - Create a new SUB-level member category under an existing Top Category. Writes live data.
A Sub Category is level 2 of the 3-tier member classification. It MUST have a parent Top Category (via profession_id). It may optionally sit under another Sub Category (for sub-sub-category nesting, via master_id). Backed by BD's list_services table.
Use when: explicitly adding a sub-category BEFORE assigning members to it. If creating/updating a user who needs a sub-category that doesn't exist yet, on createUser just include the name in services - BD auto-creates it. On updateUser, pass create_new_categories=1 to allow inline creation. For sub-sub nesting pass master_id=<parent service_id>; otherwise set master_id=0 for direct-under-Top.
Required: name, profession_id.
Pre-check before create: BD does NOT enforce uniqueness on filename (URL slug) or name - but uniqueness IS scoped per-parent (two sub-cats with the same filename under different profession_id is fine; same filename under the SAME profession_id is not). Do a server-side filter-find: listSubCategories property=filename property_value=<proposed> property_operator==, then filter results by the intended profession_id. Zero rows under that parent = slug free; >=1 row = taken (URL collision - wrong sub-cat page resolves). Do NOT paginate unfiltered lists - filtered lookup is one tiny response. If taken: reuse via updateSubCategory, 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. "Sushi")profession_id- the parent Top Category's ID (fromlistTopCategoriesorcreateTopCategory)master_id- for SUB-SUB-CATEGORY nesting, pass the parent Sub Category's ID; default 0 means "directly under the Top Category"filename- URL-slug form;desc,keywords,sort_order,lead_price,image- all optional
See also: updateSubCategory (modify), listSubCategories (list), createTopCategory (create parent).
Writes live data: changes are immediately visible on the public site.
Returns: { status: "success", message: {...createdRecord} } including service_id. Use that to assign members via updateUser.services (CSV) or createMemberSubCategoryLink.
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 | ||
| profession_id | Yes | Parent category ID | |
| desc | No | Short internal taxonomy-row label. **Even if the user says "description" - this is NOT an SEO description.** Not a meta-tag surface, not Google-ranking copy, not the H1/intro on the public category search page. Most BD themes don't render this field. For ANY SEO task on a category or sub-category - "write a description that ranks," "improve SEO," "add meta tags," "write intro copy" - create a WebPage with `seo_type=profile_search_results` and the matching slug instead (see `createWebPage`). Short internal blurb only here. | |
| filename | No | URL slug. Must be unique across web pages, top categories, sub categories, plan public URLs, and member profile slugs (wrapper auto-rejects collisions; pick a different slug or rename the conflict first). | |
| 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. | |
| sort_order | No | ||
| lead_price | No | ||
| master_id | No |