@smomin/mcp-aem-development
v0.9.5
Published
Model Context Protocol server for AEM development tools with Core Components-first approach
Maintainers
Readme
AEM Development MCP Server
A modern Model Context Protocol (MCP) server for AEM development tools with Core Components-first approach, built with the official MCP SDK.
Overview
This MCP server provides comprehensive resources and tools for AEM development, focusing on maximizing the use of AEM Core Components before creating custom components. It follows the latest best practices and coding standards with HTL Engine integration.
Features
🚀 MCP SDK Integration
- Modern Architecture: Built on the official Model Context Protocol SDK
- Reliable Communication: Standard MCP protocol implementation
- Stdio Transport: Efficient stdio-based communication for IDE integration
🎯 Core Components-First Approach
- 32 Core Components: Complete documentation for all AEM Core Components v3 including page authoring, navigation, form, container, and foundation components
- Best Practices: Built-in AEM development guidelines and standards
- Resource-Based Documentation: Access component details via URI-based resources
🛠️ Development Tools
- Web Crawling: Extracts content from websites for AEM analysis
- AEM Project Generation: Generates complete AEM projects using Docker and Maven archetype
- Content Generation: Generates AEM content nodes based on Core Components or custom definitions
- Component Code Generator: Fetches real AEM Core Components code from GitHub (HTL, dialogs, models) with proxy analysis and HTL Engine validation
- Component Generator: Generates complete AEM components with Java Sling Models and content XML
- Dialog Generator: Generates AEM authoring dialogs (cq:dialog) and edit configurations (cq:editConfig)
- HTL Template Validator: Validates HTL templates for syntax, security, accessibility, and best practices
📚 Resources
- 36 Total Resources: Complete documentation for all AEM Core Components v3 and development guidelines
- 32 Core Components: Full suite of AEM Core Components with detailed documentation
- 3 Foundation Components: Page, Asset, and Folder structure documentation
- 14 Page Authoring Components: Title, Text, Image, Button, Teaser, List, Download, PDF Viewer, Embed, Sharing, Progress Bar, Separator, Content Fragment, Content Fragment List
- 5 Navigation Components: Navigation, Breadcrumb, Language Navigation, Search, Table of Contents
- 4 Container Components: Container, Carousel, Tabs, Accordion
- 5 Form Components: Form Container, Form Text, Form Options, Form Hidden, Form Button
- 1 Advanced Component: Experience Fragment
- 4 Documentation Resources: AEM development best practices, Core Components overview, Documentation Lookup, and HTL Specification
- HTL Specification: Complete HTML Template Language v1.4 specification with syntax, semantics, and best practices
- Documentation Lookup: Direct access to official AEM Core WCM Components documentation from Adobe's GitHub repository
- Component Resources: Detailed documentation with usage examples, properties, and best practices
Quick Start
The fastest way to get started is with npx (no installation required):
npx mcp-aem-developmentThis will download and run the latest version automatically!
Installation
Prerequisites
- Node.js 20.0.0 or higher
- npm 10.0.0 or higher
- Docker (required for AEM project generation tool)
Option 1: Run with npx (Recommended)
Run directly without installation:
npx mcp-aem-developmentOr from a local directory:
npx /path/to/mcp-aem-developmentBenefits of npx:
- ✅ No global installation required
- ✅ Always runs the latest version
- ✅ No need to manage package updates
- ✅ Perfect for CI/CD pipelines
- ✅ Easy to share with team members
Option 2: Install Locally
# Clone the repository
git clone https://github.com/engineering-team-aem/mcp-aem-development.git
cd mcp-aem-development
# Install dependencies
npm install
# Start the server (stdio mode)
npm startOption 3: Install Globally
# Install globally
npm install -g mcp-aem-development
# Run from anywhere
mcp-aem-developmentEntry Point
The server starts from index.js, which:
- Imports the
AEMDevelopmentServerclass fromsrc/server.js - Creates a new server instance
- Runs the server with stdio transport
- Handles uncaught exceptions and unhandled rejections
- Provides graceful error handling and logging
Usage
Starting the Server
npm startWhen the server starts successfully, you'll see:
AEM Development MCP Server v0.9.5 running on stdio
Available tools: crawl_website, generate_aem_project, generate_content, fetch_core_component_code, generate_component, generate_dialog, validate_htl_syntax, analyze_htl_template, validate_analyze_htl_template
Available resources: 36Development Mode
Start with file watching for automatic restarts on code changes:
npm run devAvailable Scripts
npm start- Start the MCP server (stdio mode)npm run dev- Start in development mode with file watching (--watch)npm test- Run tests using Node.js test runnernpm run test:watch- Run tests in watch mode with automatic re-runsnpm run lint- Run ESLint on source filesnpm run format- Format code with Prettiernpm run build- Displays message (no build step required)
MCP Client Configuration
Claude Desktop
Option 1: Using npx (Recommended)
{
"mcpServers": {
"aem-development": {
"command": "npx",
"args": ["-y", "mcp-aem-development"]
}
}
}Option 2: Using npx with local path
{
"mcpServers": {
"aem-development": {
"command": "npx",
"args": ["-y", "/path/to/mcp-aem-development"]
}
}
}Option 3: Using node directly
{
"mcpServers": {
"aem-development": {
"command": "node",
"args": ["/path/to/mcp-aem-development/index.js"]
}
}
}Option 4: Using globally installed package
{
"mcpServers": {
"aem-development": {
"command": "mcp-aem-development"
}
}
}Other MCP Clients
The server communicates via stdio following the MCP specification.
Using with Other Agent Applications (MCP Clients)
This MCP server can be used by any MCP-compliant agent framework (desktop apps, IDEs, orchestrators). It exposes tools and resources over stdio via the official MCP protocol.
Capability Discovery
- Start the server from your client using the same commands shown above (npx, local path, or global binary).
- Use your client SDK to list tools and resources per MCP spec:
- Tools: crawl_website, generate_aem_project, generate_content, fetch_core_component_code, generate_component, generate_dialog, validate_htl_syntax, analyze_htl_template, validate_analyze_htl_template
- Resources: aem:// URIs for Core Components, best practices, HTL specification, documentation lookup
Invoking Tools (generic JSON examples)
{ "toolName": "crawl_website", "arguments": { "url": "https://example.com", "extractContent": true, "extractCSS": true, "extractJS": true } }{ "toolName": "generate_content", "arguments": { "componentType": "title", "properties": { "text": "Welcome", "type": "h1" }, "nodeName": "hero_title", "outputFormat": "xml" } }{ "toolName": "fetch_core_component_code", "arguments": { "componentType": "teaser", "version": "v2", "includeHTL": true, "includeDialog": true, "includeModel": true, "analyzeProxyRequirements": true, "outputFormat": "detailed" } }Each tool returns a content array for human-readable summaries and structured fields for programmatic use (for example, generatedFiles, componentData, validation). Use the structured fields to drive logic in your agent.
Reading Resources
- Read documentation and component references using resource URIs like
aem://components/title,aem://best-practices, andaem://htl-specificationvia your client SDK's resource API.
Error Handling and Contracts
- Check
isErroron every tool response. If true, display or logcontent[0].text. - Follow the contracts in "Tool Output Specifications & LLM Integration Guidelines" to validate required fields, data types, and naming conventions (JCR names, resource types, absolute URLs, etc.).
Side Effects and Security
crawl_websiteperforms outbound network requests.generate_aem_projectcan create files on disk via Docker/Maven whenoutputFolderis provided. Prompt for an absolute path and inform the user about file creation.- Generation tools (
generate_content,generate_component,generate_dialog) return content in-memory; saving to disk is the client's responsibility. - Sanitize user inputs (paths, node names, properties) and enforce patterns described in this README.
Timeouts and Retries (client guidance)
- Web crawling: expect 1-30s depending on network; implement retries with backoff on transient failures.
- Project generation: 30-300s (Docker + Maven). Run as background/async jobs in your agent.
- Content and dialog generation: typically under 100ms.
Minimal Client Flow (pseudocode)
// 1) Start stdio transport with: npx -y mcp-aem-development (or local path/global binary)
// 2) Discover tools/resources using your MCP client SDK
// 3) Call tools with validated arguments and parse structured outputs
// 4) Optionally write generated XML/Java files to user-selected locations
// 5) Read aem:// resources to guide reasoning and UIFor a working client stub, see the SDK example in "IDE Integration & Library Documentation".
IDE Integration & Library Documentation
🔧 MCP Client Libraries
Model Context Protocol SDK
- Package:
@modelcontextprotocol/sdk - Version: ^1.4.0
- Documentation: MCP SDK Documentation
- GitHub: MCP TypeScript SDK
- Specification: MCP Specification
- Use Cases: MCP server implementation, client-server communication, tool and resource management
HTTP Client Library
- Package:
axios - Version: ^1.7.9
- Documentation: Axios Documentation
- GitHub: Axios Repository
- Features: HTTP client, request/response interceptors, automatic JSON parsing
- Use Cases: Web crawling, API communication, HTTP requests
HTML Parsing Library
- Package:
cheerio - Version: ^1.0.0
- Documentation: Cheerio Documentation
- GitHub: Cheerio Repository
- Features: Server-side jQuery implementation, HTML parsing, DOM manipulation
- Use Cases: HTML content extraction, CSS class parsing, DOM analysis
HTL Engine Library
- Package:
@adobe/htlengine - Version: 6.4.35
- Documentation: HTL Engine Documentation
- GitHub: HTL Engine Repository
- Features: HTL template compilation, validation, and execution, Use-API integration
- Use Cases: HTL template validation, custom template generation, HTL syntax checking
🛠️ Development Dependencies
TypeScript Support
- Package:
@types/node - Version: ^22.10.0
- Documentation: Node.js TypeScript Definitions
- Use Cases: TypeScript development, Node.js type definitions
Code Quality
- Package:
eslint - Version: ^9.17.0
- Documentation: ESLint Documentation
- Configuration:
eslint.config.js - Use Cases: Code linting, code quality enforcement
Code Formatting
- Package:
prettier - Version: ^3.4.2
- Documentation: Prettier Documentation
- Use Cases: Code formatting, consistent code style
🔌 IDE Integration Examples
VS Code with MCP Extension
Using npx (Recommended):
{
"mcp.servers": {
"aem-development": {
"command": "npx",
"args": ["-y", "mcp-aem-development"],
"env": {
"NODE_ENV": "development"
}
}
}
}Using local installation:
{
"mcp.servers": {
"aem-development": {
"command": "node",
"args": ["/path/to/mcp-aem-development/index.js"],
"env": {
"NODE_ENV": "development"
}
}
}
}Cursor IDE Configuration
Using npx (Recommended):
{
"mcpServers": {
"aem-development": {
"command": "npx",
"args": ["-y", "mcp-aem-development"]
}
}
}Using local installation:
{
"mcpServers": {
"aem-development": {
"command": "node",
"args": ["/path/to/mcp-aem-development/index.js"],
"cwd": "/path/to/mcp-aem-development"
}
}
}Custom MCP Client Implementation
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
const transport = new StdioClientTransport({
command: 'node',
args: ['/path/to/mcp-aem-development/index.js']
});
const client = new Client({
name: 'aem-development-client',
version: '1.0.0'
}, {
capabilities: {}
});
await client.connect(transport);📚 Additional Resources
AEM Documentation
- AEM Core Components: Adobe Experience League
- AEM Development: AEM Developer Documentation
- AEM Cloud Service: AEM as a Cloud Service
MCP Ecosystem
- MCP Specification: Model Context Protocol
- MCP Examples: MCP Examples Repository
- MCP Community: MCP Discord
Available Tools
🚀 Component Code Generator
fetch_core_component_code
Fetches real AEM Core Component code directly from Adobe's GitHub repository with comprehensive proxy component analysis.
Input Parameters:
componentType(required, string): Component type (e.g., "title", "image", "teaser", "carousel")- Available types:
title,text,image,button,teaser,list,navigation,breadcrumb,languagenavigation,search,tableofcontents,container,carousel,tabs,accordion,contentfragment,contentfragmentlist,experiencefragment,embed,download,separator,progressbar,pdfviewer,sharing,page,form-container,form-text,form-options,form-hidden,form-button
- Available types:
version(optional, string): Component version - "latest" or specific version like "v3" (default: "latest")includeHTL(optional, boolean): Include HTL template (default: true)includeDialog(optional, boolean): Include authoring dialog (cq:dialog) (default: true)includeModel(optional, boolean): Include Sling Model interface (default: true)includeClientLibs(optional, boolean): Include client libraries (CSS/JS) (default: false)analyzeProxyRequirements(optional, boolean): Analyze proxy component requirements and modifications needed (default: true)outputFormat(optional, string): "detailed" or "summary" (default: "detailed")
Returns Structured Output:
{
content: [{ type: 'text', text: '...' }],
isError: false,
componentData: {
componentType: string,
version: string,
htl: {
fileName: string,
content: string,
available: boolean,
source: 'core-component' | 'custom-template',
note?: string
},
childTemplates: {
available: boolean,
templates: [{
fileName: string,
content: string,
available: boolean,
path: string
}],
count: number,
message: string
},
dialog: string | null, // XML content
model: string | null, // Java interface content
proxyAnalysis: {
canUseAsIs: boolean,
requiresProxy: boolean,
modifications: string[],
recommendations: string[],
proxySetup: {
componentPath: string,
superType: string,
requiredFiles: string[],
sampleContentXml: string
},
htl: { usesDataSly: boolean, usesSlingModels: boolean, requiresModification: boolean, notes: string },
dialog: { hasCqDialog: boolean, requiresModification: boolean, notes: string, extendDialog: string },
model: { hasSlingModel: boolean, requiresModification: boolean, notes: string, delegationPattern: string },
clientLibs: { hasCss: boolean, hasJs: boolean, requiresModification: boolean, notes: string },
overallRecommendation: string
}
}
}⚠️ Important for LLMs: Structured Output Mapping
When using this tool, AI assistants MUST map their analysis and recommendations to the following structured properties:
- componentData.htl - Map HTL template analysis to:
fileName,content,available,source,usesDataSly,usesSlingModels - componentData.childTemplates - Map partial templates to:
templatesarray withfileName,content,available,path - componentData.dialog - Store dialog XML content as string
- componentData.model - Store Sling Model Java interface as string
- componentData.proxyAnalysis - Map recommendations to:
canUseAsIs,requiresProxy,recommendations,proxySetup,overallRecommendation
Use Cases:
- Get real component implementation from Adobe
- Understand component structure and best practices
- Determine if component can be used as-is or needs customization
- Generate proxy component definitions
- Learn HTL patterns and Sling Model usage
Example:
{
"componentType": "teaser",
"version": "v2",
"includeHTL": true,
"includeDialog": true,
"includeModel": true,
"analyzeProxyRequirements": true,
"outputFormat": "detailed"
}Available Components:
- Page Authoring (14): title, text, image, button, teaser, list, download, pdfviewer, embed, sharing, progressbar, separator, contentfragment, contentfragmentlist
- Navigation (5): navigation, breadcrumb, languagenavigation, search, tableofcontents
- Container (4): container, carousel, tabs, accordion
- Form (5): form-container, form-text, form-options, form-hidden, form-button
- Advanced (1): experiencefragment
- Foundation (1): page
For detailed component usage examples, use the fetch_core_component_code tool with your desired component type or refer to the official Adobe documentation at https://github.com/adobe/aem-core-wcm-components.
🏗️ Component Generator
generate_component
Generates complete AEM components with Java Sling Models and content XML. For HTL templates, use the fetch_core_component_code tool to fetch real templates from Adobe's GitHub repository.
Input Parameters:
componentName(required, string): Component name (e.g., "hero-banner", "product-card")componentTitle(required, string): Human-readable component titleresourceType(required, string): Sling resource type (e.g., "myproject/components/hero-banner")componentGroup(optional, string): Component group for AEM (default: "Custom")packageName(optional, string): Java package name (default: "com.mycompany.components")aemVersion(optional, string): AEM version (default: "cloud")properties(optional, array): Array of component properties. Each property object should have:name(required, string): Property nametype(optional, string): Property type - "string", "text", "number", "boolean", "array", "list", "title", "image", "link", "custom" (default: "string")defaultValue(optional, string): Default valuelabel(optional, string): Display label (default: capitalized property name)description(optional, string): Property descriptionrequired(optional, boolean): Is required field (default: false)
features(optional, object): Component features configuration:hasTitle(boolean): Include title fieldhasText(boolean): Include text/rich text fieldhasImage(boolean): Include image fieldhasLink(boolean): Include link fieldhasList(boolean): Include list fieldhasChildren(boolean): Support child componentshasCustomContent(boolean): Include custom content areacustomContent(string): Custom content templatetitleLevel(string): Default heading level (1-6)
templateConfig(optional, object): Template customization optionsoutputFormat(optional, string): Output format - "all", "java", "xml" (default: "all")outputPath(optional, string): Output directory path (files are saved when outputFormat="all")includeComments(optional, boolean): Include comments in generated code (default: true)
Returns Structured Output:
{
content: [{ type: 'text', text: '...' }],
isError: false,
componentData: {
componentName: string,
componentTitle: string,
resourceType: string,
generatedFiles: {
java: string, // Java Sling Model code
xml: string // Component .content.xml
},
metadata: {
aemVersion: string,
packageName: string,
componentGroup: string,
properties: array,
features: object,
outputFormat: string
}
}
}Use Cases:
- Generate complete AEM component structure
- Create Java Sling Models with proper annotations
- Generate component content XML with properties
- Set up component development scaffolding
Example:
{
"componentName": "hero-banner",
"componentTitle": "Hero Banner",
"resourceType": "myproject/components/hero-banner",
"packageName": "com.mycompany.components",
"properties": [
{
"name": "title",
"type": "string",
"defaultValue": "Welcome",
"label": "Title",
"description": "Hero banner title",
"required": true
},
{
"name": "image",
"type": "image",
"defaultValue": "",
"label": "Background Image",
"description": "Hero background image",
"required": false
}
],
"features": {
"hasTitle": true,
"hasImage": true,
"hasLink": true
},
"outputFormat": "all"
}🎨 Dialog Generator
generate_dialog
Generates AEM authoring dialogs (cq:dialog) and edit configurations (cq:editConfig) for component authoring. Creates production-ready dialog XML with dynamic, configurable fields and tabs.
Input Parameters:
componentName(required, string): Component name (e.g., "hero-banner", "product-card")componentTitle(required, string): Human-readable component titleresourceType(required, string): Sling resource type (e.g., "myproject/components/hero-banner")properties(optional, array): Array of dialog properties. Each property object should have:name(required, string): Property nametype(required, string): Field type - "text", "textarea", "select", "checkbox", "radio", "number", "date", "path", "richtext", "image", "multifield"label(optional, string): Field label (default: capitalized property name)defaultValue(optional, string): Default valuerequired(optional, boolean): Is required field (default: false)description(optional, string): Field description/help textoptions(optional, array): Options for select/radio fields. Each option should havetext(string) andvalue(string)validation(optional, object): Validation rules
tabs(optional, array): Array of dialog tabs. Each tab object should have:name(required, string): Tab nametitle(optional, string): Tab title (default: capitalized tab name)properties(optional, array): Array of property names to include in this tab
clientLibs(optional, string): Client libraries array as JSON string (default: "[]")editConfig(optional, object): Edit configuration options:actions(string): Edit actions (default: "text:Edit,edit,delete")hasInlineEditing(boolean): Enable inline editingeditorType(string): Inline editor type (default: "plaintext")hasTextEditor(boolean): Enable text inline editinghasImageEditor(boolean): Enable image inline editinghasLinkEditor(boolean): Enable link inline editinghasDropTargets(boolean): Enable drop targetsdropTargets(array): Drop target configurations. Each drop target should havename,accept,groups,propertyNamehasFormParameters(boolean): Include form parametersformParameters(array): Form parameters. Each parameter should havenameandvalue
outputFormat(optional, string): Output format - "dialog", "editConfig", "both" (default: "dialog")outputPath(optional, string): Output directory path (files are saved when outputFormat="both")includeComments(optional, boolean): Include comments in generated code (default: true)
Returns Structured Output:
{
content: [{ type: 'text', text: '...' }],
isError: false,
dialogData: {
componentName: string,
componentTitle: string,
resourceType: string,
generatedFiles: {
dialog: string, // cq:dialog.xml content
editConfig: string // cq:editConfig.xml content (if requested)
},
metadata: {
clientLibs: string,
properties: array,
tabs: array,
editConfig: object,
outputFormat: string
}
}
}Use Cases:
- Generate authoring dialogs for custom components
- Create edit configurations for inline editing
- Set up drop targets for component composition
- Configure dialog tabs and field validation
Example:
{
"componentName": "hero-banner",
"componentTitle": "Hero Banner",
"resourceType": "myproject/components/hero-banner",
"properties": [
{
"name": "title",
"type": "text",
"label": "Title",
"defaultValue": "Welcome",
"required": true,
"description": "Enter the hero banner title"
},
{
"name": "backgroundImage",
"type": "image",
"label": "Background Image",
"required": false,
"description": "Select background image"
}
],
"tabs": [
{
"name": "content",
"title": "Content",
"properties": ["title", "backgroundImage"]
}
],
"editConfig": {
"hasInlineEditing": true,
"hasDropTargets": true,
"dropTargets": [
{
"name": "image",
"accept": "image/*",
"groups": "media",
"propertyName": "backgroundImage"
}
]
},
"outputFormat": "both"
}✅ HTL Syntax Validator
validate_htl_syntax
Validates HTL syntax and attempts compilation to ensure templates can run inside the HTL engine. Returns syntax and compiler diagnostics without running best-practice analysis.
Input Parameters:
templateContent(required, string): HTL template content to validatetemplateName(optional, string): Name of the template for error reporting (default: "template")
Returns Structured Output:
{
content: [{
type: 'text',
text: '# HTL Syntax & Compilation Results\n\n...'
}],
isError: false,
validation: {
valid: boolean,
errors: string[],
warnings: string[],
templateName: string,
message: string
},
compilation: {
success: boolean,
errors: string[],
warnings: string[],
templateName: string,
message: string
}
}✅ HTL Best-Practice Analyzer
analyze_htl_template
Runs a comprehensive static analysis pass that checks for security, performance, accessibility, semantic, and general best-practice issues. Does not validate syntax or compilation—use alongside validate_htl_syntax for full coverage.
Input Parameters:
templateContent(required, string): HTL template content to analyzetemplateName(optional, string): Name of the template for reporting (default: "template")
Returns Structured Output:
{
content: [{
type: 'text',
text: '# HTL Best-Practice Analysis Results\n\n...'
}],
isError: false,
analysis: {
valid: boolean,
templateName: string,
issues: Array<{ type, message, line, severity, fix? }>,
securityChecks: Array<{ type, message, line, severity, fix }>,
performanceChecks: Array<{ type, message, line, severity, fix }>,
accessibilityChecks: Array<{ type, message, line, severity, fix }>,
semanticChecks: Array<{ type, message, line, severity, fix }>,
recommendations: string[],
bestPractices: Array<{ message, line?, severity?, fix? }>,
message: string
}
}✅ HTL Validator & Analyzer
validate_analyze_htl_template
Runs HTL syntax validation, compilation, and best-practice analysis in a single call. Provides comprehensive diagnostics and recommendations for AI-generated templates.
Recommendations: Enable strict HTL mode for AEM Maven compatibility
- The validator uses a JS HTL engine that can be more permissive than the AEM/Maven compiler. To avoid build-time failures, enforce a strict set of rules that match AEM’s HTL grammar:
- Disallow string concatenation inside HTL expressions (e.g.,
${'h' + level}) - Disallow the Elvis operator (
?:) inside HTL expressions - Prefer ternary (
condition ? a : b) ordata-sly-testbranches, or compute values in Sling Models
- Disallow string concatenation inside HTL expressions (e.g.,
- Until a formal
strictflag is supported by the tool, AI agents should post-validate templates and automatically rewrite non-portable expressions to strict-safe forms before saving. - When available, call the tool with
strict: true(or equivalent) to get actionable errors aligned with the AEM compiler.
Input Parameters:
templateContent(required, string): HTL template content to validate and analyzetemplateName(optional, string): Name of the template for error reporting (default: "template")
Returns Structured Output:
{
content: [{
type: 'text',
text: '# HTL Template Validation Results\n\n' +
'**Template**: templateName\n\n' +
'## Syntax & Compilation\n' +
'- **Status**: validation.valid ? "✅ **Pass**" : "❌ **Fail**"\n' +
'- **Errors**: validation.errors.length\n' +
'- **Warnings**: validation.warnings.length\n\n' +
'### Errors\n' +
'validation.errors list\n\n' +
'### Warnings\n' +
'validation.warnings list\n\n' +
'- **Compilation Status**: compilation.success ? "✅ **Pass**" : "❌ **Fail**"\n' +
'- **Compilation Message**: compilation.message\n\n' +
'### Compilation Errors\n' +
'compilation.errors list\n\n' +
'### Compilation Warnings\n' +
'compilation.warnings list\n\n' +
'## Best-Practice Analysis\n' +
'- **Status**: analysis.valid ? "✅ **Pass**" : "❌ **Fail**"\n' +
'- **Issues Found**: analysis.issues.length\n' +
'- **Security Checks**: analysis.securityChecks.length\n' +
'- **Performance Checks**: analysis.performanceChecks.length\n' +
'- **Accessibility Checks**: analysis.accessibilityChecks.length\n' +
'- **Semantic Checks**: analysis.semanticChecks.length\n\n' +
'## Recommendations\n' +
'analysis.recommendations list\n\n' +
'## Summary\n' +
'Combined syntax/analysis summary message'
}],
isError: false,
validation: {
valid: boolean, // Syntax validation result
errors: string[], // Array of error messages
warnings: string[], // Array of warning messages
templateName: string,
message: string
},
compilation: {
success: boolean, // Compilation result
errors: string[], // Array of compilation errors
warnings: string[], // Array of compilation warnings
templateName: string,
message: string
},
analysis: {
valid: boolean, // Overall analysis result
templateName: string,
issues: Array<{ // Array of issues found
type: 'error' | 'warning' | 'info',
message: string,
line: number,
severity: 'high' | 'medium' | 'low',
fix?: string
}>,
securityChecks: Array<{ // Security-related checks
type: 'error' | 'warning',
message: string,
line: number,
severity: 'high' | 'medium' | 'low',
fix: string
}>,
performanceChecks: Array<{ // Performance-related checks
type: 'info' | 'warning',
message: string,
line: number,
severity: 'medium' | 'low',
fix: string
}>,
accessibilityChecks: Array<{ // Accessibility-related checks
type: 'error' | 'warning',
message: string,
line: number,
severity: 'high' | 'medium',
fix: string
}>,
semanticChecks: Array<{ // Semantic HTML checks
type: 'error' | 'warning' | 'info',
message: string,
line: number,
severity: 'high' | 'medium' | 'low',
fix: string
}>,
recommendations: string[], // General recommendations
message: string
}
}Use Cases:
- Validate HTL templates before deployment
- Check for security vulnerabilities
- Ensure accessibility compliance
- Verify performance best practices
- Get recommendations for improvements
Example:
{
"templateContent": "<div data-sly-use.model=\"com.mycompany.components.HeroBannerModel\">\n <h1 data-sly-text=\"${model.title}\"></h1>\n <img data-sly-resource=\"${model.image}\" alt=\"${model.altText}\" />\n</div>",
"templateName": "hero-banner-template"
}🌐 Web Crawling & Analysis
crawl_website
Crawls websites and extracts HTML content, CSS classes/links, and JavaScript files. Returns structured JSON.
Input Parameters:
url(required, string): URL to crawl (e.g., "https://example.com")extractContent(optional, boolean): Extract HTML content from body tag (default: true)extractCSS(optional, boolean): Extract CSS classes and external CSS links (default: true)extractJS(optional, boolean): Extract JavaScript files and inline code (default: true)
Returns Structured Output:
{
content: [{
type: 'text',
text: JSON.stringify(result, null, 2) // Full result object as formatted JSON
}],
isError: false
}
// Where result object contains:
{
url: string, // Final URL after redirects
status: 'success' | 'error',
statusCode: number, // HTTP status code
timestamp: string, // ISO 8601 timestamp
title: string, // Page title
body_html: string, // HTML content from <body> tag
css: {
links: string[], // External CSS file URLs (absolute)
embedded_styles: string[], // <style> tag contents
inline_styles: { // Inline style attributes by element selector
[selector: string]: string // Key format: tagName#id.className, value: style string
}
},
javascript: {
files: string[], // External JS file URLs (absolute)
inline: string[], // Inline <script> tag contents
event_handlers: { // Event handlers by type
onclick: string[],
onload: string[],
onchange: string[],
onsubmit: string[],
onmouseover: string[],
onmouseout: string[]
},
modules: string[] // ES6 module scripts
},
metadata: { // Page metadata
viewport?: string,
description?: string,
keywords?: string,
author?: string,
'og:title'?: string,
'og:description'?: string,
'og:url'?: string,
'og:image'?: string,
'twitter:card'?: string,
'twitter:title'?: string,
canonical?: string
},
structure: {
headings: Array<{ // All headings (h1-h6)
level: number, // 1-6
text: string
}>,
links: Array<{ // All <a> tags
href: string, // Absolute URL
text: string
}>,
images: Array<{ // All <img> tags
src: string, // Absolute URL
alt: string
}>,
forms: Array<{ // All <form> tags
action: string,
method: string // GET/POST
}>,
header: { // <header> section
html: string, // Full HTML content
logo?: string // Logo image URL if found
},
navigation: { // <nav> section
html: string
},
footer: { // <footer> section
html: string
}
}
}⚠️ Important for LLMs: Structured Output Mapping
When using this tool, AI assistants MUST map extracted content to the following structured properties:
- css - Map all CSS data to:
links(external stylesheets),embedded_styles( tags),inline_styles(element-level styles) - javascript - Map all JS data to:
files(external scripts),inline(inline scripts),event_handlers(DOM event handlers),modules(ES6 modules) - metadata - Map page metadata to:
viewport,description,keywords,author, Open Graph tags, Twitter Card tags,canonicalURL - structure - Map semantic HTML to:
headings,links,images,forms,header,navigation,footer - structure.headings - Each heading MUST have:
level(1-6),text - structure.links - Each link MUST have:
href(absolute URL),text - structure.images - Each image MUST have:
src(absolute URL),alt - structure.forms - Each form MUST have:
action,method(GET/POST)
Use Cases:
- Analyze existing websites for AEM migration
- Extract component patterns from HTML
- Identify CSS classes and JavaScript dependencies
- Generate AEM content from web pages
Example:
{
"url": "https://example.com",
"extractContent": true,
"extractCSS": true,
"extractJS": true
}🏗️ AEM Project Generation
generate_aem_project
Generates complete AEM project structure using official Adobe AEM Maven Archetype via Docker.
Input Parameters:
outputFolder(required, string): Path to output folder where AEM project will be generatedappTitle(required, string): Human-readable application title (e.g., "My AEM Site")appId(required, string): Application ID used for project name (e.g., "my-aem-site")groupId(required, string): Maven groupId in reverse domain notation (e.g., "com.mycompany")artifactId(optional, string): Maven artifactId (default: same as appId)aemVersion(optional, string): AEM version - "cloud" or "6.5" (default: "cloud")archetypeVersion(optional, string): AEM archetype version (default: "54" for cloud, "39" for 6.5)archetypeGroupId(optional, string): Maven archetype groupId (default: "com.adobe.aem")archetypeArtifactId(optional, string): Maven archetype artifactId (default: "aem-project-archetype")
Returns Structured Output:
{
content: [{
type: 'text',
text: 'AEM project "appId" has been successfully generated in outputPath!\n\n' +
'Project Details:\n' +
'- App Title: appTitle\n' +
'- App ID: appId\n' +
'- Group ID: groupId\n' +
'- Artifact ID: artifactId\n' +
'- AEM Version: aemVersion\n' +
'- Archetype Version: archetypeVersion\n' +
'- Output Path: projectPath\n\n' +
'Docker Command Output:\nstdout\n\n' +
'You can now navigate to the project directory and start development.'
}],
isError: false
}Note: The tool creates the complete AEM project structure on disk at the specified outputFolder. The project includes:
- Complete AEM project structure with all modules (ui.apps, ui.content, core, it.tests, etc.)
- Maven configuration files (pom.xml)
- Sample components and templates
- Docker setup for local development
Use Cases:
- Initialize new AEM projects
- Create project templates for teams
- Set up development environments
- Generate AEM Cloud Service projects
Example:
{
"outputFolder": "/path/to/projects",
"appTitle": "My AEM Website",
"appId": "my-aem-website",
"groupId": "com.mycompany",
"aemVersion": "cloud"
}📝 Content Generation
generate_content
Generates AEM content including complete page .content.xml with nested components, or individual component content. Supports both Core Components and custom definitions. Use generatePage=true for complete page structure with all components.
Input Parameters:
componentDefinition(optional, object): Component definition object for custom componentscomponentType(optional, string): Type of AEM Core Component to generate- Available types:
page,asset,folder,title,text,image,button,teaser,list,download,pdfviewer,embed,sharing,progressbar,separator,contentfragment,contentfragmentlist,container,carousel,tabs,accordion,navigation,breadcrumb,languagenavigation,search,tableofcontents,form-container,form-text,form-options,form-hidden,form-button,experiencefragment
- Available types:
properties(optional, object): Custom properties to override or add to component definition (default: {})customResourceType(optional, string): Custom sling resource type to use instead of defaultnodeName(optional, string): Name for generated node (default: "component" for custom, component type name for Core Components)parentPath(optional, string): Parent path for content (default: "/content")outputFormat(optional, string): Output format - "xml" or "json" (default: "xml")useTemplate(optional, boolean): Use XML template for generation (default: false)templateName(optional, string): Name of the XML template to usecustomTemplate(optional, string): Custom XML template stringgeneratePage(optional, boolean): Generate complete page .content.xml with nested components (default: false)pageTitle(optional, string): Title for page generation (required if generatePage=true)pageDescription(optional, string): Description for page generationpageResourceType(optional, string): Resource type for page (default: "core/wcm/components/page/v3/page")templatePath(optional, string): Template path for page (e.g., "/conf/myproject/settings/wcm/templates/page-template")language(optional, string): Page language code (default: "en")pageProperties(optional, object): Additional page-level properties (default: {})components(optional, array): Array of component definitions to include in the page. Each component should have:nodeName(string),componentTypeorresourceType(string),properties(object), and optionalchildren(array) for nested components (default: [])
Returns Structured Output:
{
content: [{
type: 'text',
text: 'AEM content has been successfully generated!\n\n' +
'Component Details:\n' +
'- Resource Type: resourceType\n' +
'- Output Format: outputFormat\n' +
'- Properties: propertyCount custom properties\n\n' +
'Generated Content:\n```outputFormat\n' + generatedContent + '\n```\n\n' +
'You can use this content in your AEM project.'
}],
isError: false,
generatedContent: string, // XML or JSON string
metadata: {
resourceType: string,
outputFormat: 'xml' | 'json',
propertyCount: number,
componentDefinition: object
}
}Component Structure for Pages:
// Component definition for pages
{
nodeName: string, // Component node name
componentType: string, // Core Component type (e.g., 'title', 'image')
resourceType?: string, // Optional: Custom resource type
properties: object, // Component properties
children?: [{ // Optional: Nested components (for containers)
nodeName: string,
componentType: string,
resourceType?: string,
properties: object,
children?: [...]
}]
}⚠️ Important for LLMs: Structured Output Mapping
When using this tool, AI assistants MUST map generated content to the following structured properties:
For Single Components:
- resourceType - Map to Core Component resource type (e.g.,
core/wcm/components/title/v3/title) - properties - Map all component properties (e.g.,
text,type,fileReference, etc.) - nodeName - Map to JCR node name (alphanumeric with underscores)
- generatedContent - XML or JSON representation of component node
- resourceType - Map to Core Component resource type (e.g.,
For Complete Pages:
- pageTitle - REQUIRED: Map to
jcr:titleproperty - pageDescription - Optional: Map to
jcr:descriptionproperty - pageResourceType - Map to page component resource type
- templatePath - Map to
cq:templateproperty - language - Map to
jcr:languageproperty - components - Array of component definitions with structure above
- components[].nodeName - Each component MUST have unique node name
- components[].componentType - Each component MUST have valid Core Component type
- components[].properties - Each component MUST have properties object
- components[].children - Recursive structure for nested components in containers
- pageTitle - REQUIRED: Map to
Property Name Conversion:
- Use underscores for JCR namespaces in JSON:
jcr_title→ converts tojcr:titlein XML - Use underscores for CQ namespaces:
cq_template→ converts tocq:templatein XML - Use underscores for Sling namespaces:
sling_resourceType→ converts tosling:resourceTypein XML
- Use underscores for JCR namespaces in JSON:
Use Cases:
- Generate AEM content nodes for Core Components
- Create custom component content structures
- Convert HTML to AEM content format
- Generate content for testing and development
- Generate complete page .content.xml with nested components
Example - Single Component:
{
"componentType": "title",
"properties": {
"text": "Welcome to Our Website",
"type": "h1"
},
"nodeName": "hero_title",
"outputFormat": "xml"
}Example - Complete Page:
{
"generatePage": true,
"pageTitle": "Home Page",
"pageDescription": "Welcome to our website",
"pageResourceType": "core/wcm/components/page/v3/page",
"templatePath": "/conf/myproject/settings/wcm/templates/page-template",
"language": "en",
"components": [
{
"nodeName": "hero_title",
"componentType": "title",
"properties": {
"text": "Welcome to Our Website",
"type": "h1"
}
},
{
"nodeName": "hero_image",
"componentType": "image",
"properties": {
"fileReference": "/content/dam/myproject/hero.jpg",
"alt": "Hero Image"
}
}
],
"outputFormat": "xml"
}Available Resources
🧩 AEM Core Components (36 Total Resources)
All 32 AEM Core Components plus 4 comprehensive documentation resources are available through URI-based access.
Foundation Components (3)
aem://components/page
Page Component - Foundation for all AEM pages
- Resource Type:
core/wcm/components/page/v3/page - Features: Responsive layout, template inheritance, SEO optimization, accessibility compliance
- Use Cases: Page structure, template foundation, responsive design
- Properties:
pageTitle,jcr:title,sling:resourceType
aem://components/asset
DAM Asset Component - Digital Asset Management structure
- Node Type:
dam:Asset - Features: Metadata storage, renditions support, Dublin Core compliance, version control
- Use Cases: Digital asset storage, asset management, media repository
- Properties:
dc:title,dc:description,dc:format,dam:assetState,dam:mimeType
aem://components/folder
Folder Component - Basic folder structure for content organization
- Node Type:
sling:Folder - Features: Hierarchical content organization, simple folder structure
- Use Cases: Content organization, DAM folders, site structure
- Properties:
jcr:primaryType,jcr:title
Page Authoring Components (14)
These components provide comprehensive content authoring capabilities for creating rich, engaging page content.
aem://components/title
Title Component - Semantic headings with configurable levels
- Resource Type:
core/wcm/components/title/v3/title - Features: Semantic HTML headings (h1-h6), configurable heading level, rich text support
- Use Cases: Page titles, section headings, semantic markup
- Properties:
type(h1-h6),text,linkURL,linkTarget
aem://components/text
Text Component - Rich text editing with WYSIWYG functionality
- Resource Type:
core/wcm/components/text/v2/text - Features: Rich text editor (RTE), HTML content support, XSS protection
- Use Cases: Content blocks, rich text content, formatted text
- Properties:
text,textIsRich,rtePlugins
aem://components/image
Image Component - Responsive images with lazy loading
- Resource Type:
core/wcm/components/image/v3/image - Features: Responsive images, lazy loading, image optimization, accessibility support
- Use Cases: Hero images, content images, responsive media
- Properties:
fileReference,alt,title,lazy,isDecorative
aem://components/button
Button Component - Call-to-action buttons with various styles
- Resource Type:
core/wcm/components/button/v2/button - Features: Multiple button styles, link and button support, icon integration
- Use Cases: CTA buttons, navigation links, action buttons
- Properties:
text,linkURL,linkTarget,icon,variant
aem://components/teaser
Teaser Component - Promotional content blocks with image and CTA
- Resource Type:
core/wcm/components/teaser/v2/teaser - Features: Image and text combination, call-to-action support, link integration
- Use Cases: Product cards, promotional blocks, content teasers
- Properties:
jcr_title,jcr_description,actionsEnabled,titleType,linkURL
aem://components/list
List Component - Content lists with various display options
- Resource Type:
core/wcm/components/list/v4/list - Features: Multiple list types, content filtering, pagination support
- Use Cases: Article lists, product catalogs, content listings
- Properties:
listFrom(children, fixed, search),orderBy,maxItems,showDescription
aem://components/download
Download Component - File download functionality
- Resource Type:
core/wcm/components/download/v2/download - Features: File download from DAM, asset metadata display, file size and type display
- Use Cases: Document downloads, file access, asset distribution
- Properties:
fileReference,displayFilename,displaySize,displayFormat,titleType
aem://components/pdfviewer
PDF Viewer Component - Inline PDF viewing
- Resource Type:
core/wcm/components/pdfviewer/v1/pdfviewer - Features: Inline PDF viewing, configurable display options, download option
- Use Cases: Document display, PDF preview, inline documentation
- Properties:
fileReference,type,defaultViewMode,showDownloadPDF,showPrintPDF
aem://components/embed
Embed Component - External content embedding
- Resource Type:
core/wcm/components/embed/v2/embed - Features: External content embedding, oEmbed support, HTML embedding
- Use Cases: Video embedding, social media content, third-party widgets
- Properties:
type(url, html, embeddable),url,html,embeddable
aem://components/sharing
Social Sharing Component - Social media sharing
- Resource Type:
core/wcm/components/sharing/v1/sharing - Features: Social media integration, configurable platforms, privacy-conscious
- Use Cases: Social sharing, content distribution, viral marketing
- Properties:
facebook,twitter,pinterest,linkedin
aem://components/progressbar
Progress Bar Component - Progress indicators
- Resource Type:
core/wcm/components/progressbar/v1/progressbar - Features: Visual progress display, configurable completion percentage, ARIA support
- Use Cases: Loading indicators, progress tracking, completion status
- Properties:
completedPercentage,type(determinate, indeterminate),accessibilityLabel
aem://components/separator
Separator Component - Visual content separation
- Resource Type:
core/wcm/components/separator/v1/separator - Features: Visual content divider, customizable styling
- Use Cases: Content separation, visual breaks, layout organization
- Properties:
id
aem://components/contentfragment
Content Fragment Component - Structured content display
- Resource Type:
core/wcm/components/contentfragment/v1/contentfragment - Features: Structured content display, element selection, variation support
- Use Cases: Headless content, structured data display, content fragments
- Properties:
fragmentPath,variationName,displayMode,elementNames
aem://components/contentfragmentlist
Content Fragment List Component - Lists of structured content
- Resource Type:
core/wcm/components/contentfragmentlist/v2/contentfragmentlist - Features: Content Fragment lists, filtering and sorting, pagination support
- Use Cases: Content listings, filtered fragments, content collections
- Properties:
parentPath,modelPath,maxItems,orderBy,sortOrder
Navigation Components (5)
These components provide comprehensive navigation and wayfinding capabilities for site visitors.
aem://components/navigation
Navigation Component - Site navigation menus with hierarchical structure
- Resource Type:
core/wcm/components/navigation/v2/navigation - Features: Hierarchical navigation, multi-level support, accessibility compliance
- Use Cases: Main navigation, site menus, hierarchical links
- Properties:
navigationRoot,structureDepth,collectAllPages,skipNavigationRoot
aem://components/breadcrumb
Breadcrumb Component - Navigation breadcrumbs for user orientation
- Resource Type:
core/wcm/components/breadcrumb/v3/breadcrumb - Features: Automatic breadcrumb generation, configurable start level, SEO optimization
- Use Cases: Page navigation, user orientation, SEO breadcrumbs
- Properties:
startLevel,showHidden,hideCurrent,hideHidden
aem://components/languagenavigation
Language Navigation Component - Multi-language site navigation
- Resource Type:
core/wcm/components/languagenavigation/v2/languagenavigation - Features: Multi-language support, automatic language detection, hreflang SEO
- Use Cases: Language switchers, multi-language sites, localization
- Properties:
navigationRoot,structureDepth,skipNavigationRoot
aem://components/search
Quick Search Component - Site search functionality
- Resource Type:
core/wcm/components/search/v1/search - Features: Full-text search, configurable search paths, results pagination
- Use Cases: Site search, content discovery, search results
- Properties:
searchRoot,resultsSize,searchTermMinimumLength
aem://components/tableofcontents
Table of Contents Component - Page navigation helper
- Resource Type:
core/wcm/components/tableofcontents/v1/tableofcontents - Features: Automatic heading extraction, configurable heading levels, smooth scrolling
- Use Cases: Page navigation, document structure, content index
- Properties:
includeClasses,listType,startLevel,stopLevel
Container Components (4)
These components provide layout and organizational structures for responsive page design.
aem://components/container
Container Component - Responsive layout containers with grid support
- Resource Type:
core/wcm/components/container/v1/container - Features: Responsive grid layout, component nesting, layout policies
- Use Cases: Layout containers, grid systems, component grouping
- Properties:
layout(responsiveGrid, flow),backgroundStyle,margin
aem://components/carousel
Carousel Component - Image and content carousels with navigation
- Resource Type:
core/wcm/components/carousel/v1/carousel - Features: Image and content carousels, navigation controls, autoplay support
- Use Cases: Image galleries, content sliders, promotional carousels
- Properties:
autoplay,delay,autopauseDisabled,accessibilityLabel
aem://components/tabs
Tabs Component - Tabbed content panels with navigation
- Resource Type:
core/wcm/components/tabs/v1/tabs - Features: Tabbed content panels, keyboard navigation, ARIA support
- Use Cases: Content organization, feature tabs, information panels
- Properties:
activeItem,accessibilityLabel,orientation
aem://components/accordion
Accordion Component - Collapsible content sections
- Resource Type:
core/wcm/components/accordion/v1/accordion - Features: Collapsible content sections, single or multiple expansion, ARIA support
- Use Cases: FAQ sections, collapsible content, information disclosure
- Properties:
singleExpansion,accessibilityLabel
Form Components (5)
These components provide complete form functionality for data collection and user interaction.
aem://components/form-container
Form Container Component - Form wrappers with submission handling
- Resource Type:
core/wcm/components/form/container/v2/container - Features: Form wrapper functionality, submission handling, validation support
- Use Cases: Contact forms, user registration, data collection
- Properties:
actionType,method,enctype,redirect
aem://components/form-text
Form Text Field Component - Text input fields
- Resource Type:
core/wcm/components/form/text/v2/text - Features: Text input fields, validation support, multiple input types
- Use Cases: Text inputs, email fields, phone numbers, form fields
- Properties:
name,type(text, email, tel, number, date),jcr:title,required,readOnly,defaultValue,helpMessage
aem://components/form-options
Form Options Field Component - Dropdowns, radio buttons, checkboxes
- Resource Type:
core/wcm/components/form/options/v2/options - Features: Multiple selection types, dynamic option lists, validation support
- Use Cases: Dropdowns, radio groups, checkboxes, multi-select
- Properties:
name,type(select, radio, checkbox, multi-select),jcr:title,required,items
aem://components/form-hidden
Form Hidden Field Component - Hidden form fields
- Resource Type:
core/wcm/components/form/hidden/v2/hidden - Features: Hidden field functionality, default value support
- Use Cases: Form data passing, tracking fields, hidden values
- Properties:
name,value
aem://components/form-button
Form Button Component - Form submission buttons
- Resource Type:
core/wcm/components/form/button/v2/button - Features: Form submission, multiple button types, validation triggering
- Use Cases: Submit buttons, reset buttons, form actions
- Properties:
type(submit, reset, button),title,name
Advanced Components (1)
This component provides sophisticated content reuse capabilities for complex multi-site scenarios.
aem://components/experience-fragment
Experience Fragment Component - Reusable content blocks across sites
- Resource Type:
core/wcm/components/experiencefragment/v1/experiencefragment - Features: Reusable content blocks, multi-site support, content synchronization
- Use Cases: Shared content, multi-site deployments, content reuse
- Properties:
fragmentVariationPath,id,accessibilityLabel
📚 Documentation Resources (4)
These resources provide comprehensive development guidelines and component usage information.
aem://best-practices
AEM Development Best Practices - Comprehensive development guidelines
- Content: Core Components-first approach, development standards, architecture guidelines
- Topics: HTL best practices, Java development, dialog development, CSS/JavaScript standards
- Use Cases: Development guidelines, code reviews, team standards
aem://core-components-overview
Core Components Overview - Complete guide to AEM Core Components v3
- Content: Component benefits, usage guidelines, available components
- Topics: Production readiness, consistent experience, Adobe maintenance
- Use Cases: Component selection, implementation guidance, best practices
aem://documentation-lookup
Documentation Lookup - Access official AEM Core WCM Components documentation from GitHub
- Content: Direct links to Adobe's GitHub repository, component README files, version information
- Topics: Official documentation structure, component directory patterns, GitHub navigation, development workflows
- Repository: https://github.com/adobe/aem-core-wcm-components
- Use Cases:
- Access latest component documentation from Adobe's GitHub
- Review official component README files and specifications
- Understand component directory structure and implementation patterns
- Link to Experience League documentation and Component Library
- Integration with
fetch_core_component_codetool for complete workflows
aem://htl-specification
HTL Specification - HTML Template Language v1.4 specification
- Version: 1.4 (Released: June 18, 2018)
- Content: Complete HTL specification including expression language, block statements, and Use-API
- Topics:
- Expression language syntax and semantics with automatic XSS protection
- Block statements (use, text, attribute, element, test, list, repeat, include, resource, template, call, unwrap, set)
- Context-sensitive display contexts and URI manipulation
- Format options for strings, dates, and numbers
- Java and JavaScript Use-API integration
- Best practices for security, performance, and maintainability
- Repository: https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md
- Use Cases:
- Learn HTL expression language and operators
- Understand block statements and control flow
- Implement secure HTL templates with proper XSS protection
- Master URI manipulation and formatting options
- Integrate business logic with Use-API
- Reference official HTL syntax and grammar
Architecture
🏗️ Modular Design
src/
├── server.js # Main MCP server entry point (v0.9.5)
├── resources.js # Resource definitions and content (36 resources)
├── tools.js # Tool orchestration and management
├── tools/ # Individual tool implementations
│ ├── web-crawler.js # Website crawling with axios + cheerio (v0.9.5)
│ ├── aem-project-generator.js # AEM project generation via Docker + Maven
│ ├── content-generator.js # AEM content generation with optimized templates
│ ├── component-generator.js # Complete AEM component generation (Java + XML)
│ └── dialog-generator.js # AEM dialog and edit config generation
├── templates/ # Template library (organized by type)
│ ├── content/ # XML content templates
│ │ ├── page-template.xml # Complete page with nested components
│ │ ├── content-template.xml # Content node template for nesting
│ │ ├── asset-template.xml # DAM asset template with metadata
│ │ └── folder-template.xml # Folder structure template
│ ├── component/ # Component generation templates
│ │ ├── content-xml.xml # Component .content.xml template
│ │ └── java-model.java # Java Sling Model template
│ └── dialog/ # Dialog generation templates
│ ├── cq-dialog.xml # Authoring dialog template
│ └── cq-editConfig.xml # Edit configuration template
└── utils/ # Utility modules
├── template-loader.js # Template loading and caching system
└── htl-engine-service.js # HTL Engine integration and template validation