Skip to main content
Glama
Stellify-Software-Ltd

Stellify MCP Server

Official

html_to_elements

Converts HTML to Stellify elements by attaching to routes for SSR pages or returning UUIDs for standalone Vue components. Auto-wires click handlers with optional file UUID.

Instructions

Convert HTML to Stellify elements.

IMPORTANT - Choose the right approach:

For SSR/Blade Pages (WordPress imports, static content, layouts):

  • MUST pass 'page' (route UUID) - elements attach to the route for server-side rendering

  • This is the most common use case

For Vue Components (client-side interactivity):

  • Omit 'page' - elements are standalone, referenced by file's template array

  • Returns UUIDs to use in save_file's template array

Where elements go:

  • Pass 'page' (route UUID): Elements attached to the route for SSR rendering

  • Pass 'selection' (element UUID): Elements attached as children of existing element

  • Omit both: Elements are standalone (Vue components only) - use returned UUIDs in save_file's template array

⚠️ CRITICAL: Multiple Root Elements Limitation When HTML contains multiple root-level elements (e.g., , , ), only the FIRST root element gets attached to the route. Other elements become orphaned!

WRONG: html_to_elements(page: routeUUID, elements: "<header>...</header><main>...</main><footer>...</footer>") → Only attaches to route. and are orphaned!

CORRECT: Make separate calls for each root element:

  1. html_to_elements(page: routeUUID, elements: "<header>...</header>")

  2. html_to_elements(page: routeUUID, elements: "<main>...</main>")

  3. html_to_elements(page: routeUUID, elements: "<footer>...</footer>")

OR wrap all elements in a single container div.

@click auto-wiring: Pass 'file' UUID to auto-resolve @click="methodName" handlers. Methods must exist in the file first.

Blade Syntax Handling: For SSR/Blade pages, do NOT pass raw Blade expressions in text or attributes. The HTML parser stores them literally which causes rendering issues. Instead:

  1. For static HTML: Pass clean HTML without Blade syntax, then use update_element to add dynamic behavior

  2. For loop content: After creating elements, use update_element with:

    • textField, hrefField, srcField for simple field access (outputs {{ $item->field }})

    • hrefExpression, srcExpression, altExpression for paths with prefixes or complex expressions

    • statements array with statement UUIDs for text content with Blade code

  3. For conditionals: Use s-directive elements as siblings (see update_element docs)

IMPORTANT - Links with path prefixes: hrefField outputs ONLY the field value with no prefix. There is NO hrefPrefix attribute. For links like /post/my-slug, use hrefExpression: "/post/{{ $item->slug }}" instead.

Loop variable: Inside @foreach loops created with s-directive, the default loop variable is $item. Use textField: "title" to output {{ $item->title }}.

Prefer SVG icons over emoji (encoding issues).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementsYesHTML string to convert
pageNoRoute UUID to attach elements to. REQUIRED for SSR/Blade pages (WordPress imports, static content, layouts). Only omit for Vue component templates.
selectionNoParent element UUID to attach to (alternative to page). Use when adding children to existing elements.
fileNoVue component file UUID. Pass this to auto-wire @click handlers to method UUIDs.
testNoIf true, returns structure without creating elements
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses critical behaviors: only first root element attaches, Blade syntax issues, @click auto-wiring setup, hrefField limitations, loop variable defaults, and test mode behavior. Given no annotations, the description fully carries the burden of transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Though lengthy, the description is well-structured with headings, bold warnings, and bullet points. It front-loads the main purpose and critical information. Some redundancy exists, but it remains readable and informative for the complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers multiple use cases and provides necessary details for correct usage despite no output schema. Mentions return of UUIDs for Vue components and structure in test mode. Lacks exact return format but sufficient for an agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with basic descriptions, but the description adds significant context for each parameter (e.g., page required for SSR, selection for parent-child, file for auto-wiring, test for dry run). Goes beyond schema with examples and edge cases.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Convert HTML to Stellify elements', which is a specific verb+resource. It distinguishes from sibling tools like create_element by detailing conversion from HTML and explaining different contexts (SSR vs Vue).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use each approach (SSR/Blade vs Vue components), when to pass page, selection, or omit, and warns against common mistakes like multiple root elements and Blade syntax handling. Includes alternatives for links and directives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Stellify-Software-Ltd/stellify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server