# Preline MCP - Tools Reference Full parameter specs and placement rules for all 6 MCP tools. --- ## Tool 1: `components_list` Browse available component sections and their component IDs. **Input:** - `section` (optional string) - pass the inferred section slug to get only that section. Omit to get all sections. **When to pass section:** whenever the component type is known (e.g. `components_list({ section: "buttons" })`). Omitting section loads 300k+ characters - avoid unless you genuinely don't know the section. **Returns:** JSON with section IDs, component IDs, titles, descriptions, and optional `relative` metadata. --- ## Tool 2: `single_component` Get HTML/CSS/JS for one Preline component. **Input:** - `section` (required) - exact section slug from `components_list`. Never guess. - `component` (required) - exact component ID from `components_list`. Never guess. - `isUtilityBased` (optional, default: `false`) - convert design tokens to Tailwind utility classes - `theme` (optional, default: `"default"`) - theme for utility conversion - `parameters` (optional) - template-specific overrides **Available themes:** | Slug | Color | |---|---| | `default` | Blue | | `harvest` | Amber | | `retro` | Fuchsia | | `moon` | Grayscale | | `ocean` | Cyan | | `bubblegum` | Pink | | `cashmere` | Mauve | | `autumn` | Amber/Orange | | `olive` | Green | **Examples:** ``` single_component({ section: "accordion", component: "accordion-basic-usage-example" }) single_component({ section: "alerts", component: "alerts-solid-color-variants", isUtilityBased: true }) single_component({ section: "datatables", component: "datatables-basic-usage-example" }) ``` **Response sections:** - `=== COMPONENT HTML ===` - main markup - `` - `` and ``, ``, ``), any non-HTML syntax 4. The **first structural closing tag** reached (``, ``, ``, ``, ``, ``, ``) is the **anchor** 5. Insert ALL ` ``` ### Init (``) ```html ``` If `` already contains `