@elementor/elementor-v3-mcp 4.1.0-837 → 4.1.0-beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +121 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +121 -82
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/elementor-mcp-server.ts +4 -54
- package/src/mcp-description-resource.ts +70 -0
- package/src/tools/ai-tool.ts +9 -0
- package/src/tools/dynamic-tool.ts +9 -0
- package/src/tools/page-tool.ts +7 -7
- package/src/tools/routes-tool.ts +9 -0
- package/src/tools/styling-tool.ts +13 -22
- package/src/tools/ui-tool.ts +9 -0
package/src/tools/page-tool.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from '@elementor/schema';
|
|
2
2
|
import { type McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
|
|
4
|
+
import { V3_DESCRIPTION_URI } from '../mcp-description-resource';
|
|
4
5
|
import { RESOURCE_URI_PAGE_SETTINGS } from '../resources';
|
|
5
6
|
import type { ElementorContainer, McpToolResult, ToolParams } from '../types';
|
|
6
7
|
import { encodeToolJson, get$e, getElementor } from '../utils';
|
|
@@ -10,12 +11,7 @@ export function addPageTool( server: McpServer ): void {
|
|
|
10
11
|
server.registerTool(
|
|
11
12
|
'page',
|
|
12
13
|
{
|
|
13
|
-
description: `Manage page and document operations
|
|
14
|
-
- Undo or redo changes (history-undo, history-redo, history-undo-all) - Use these when user asks to undo, revert, or redo recent changes
|
|
15
|
-
- Save page changes (save-draft, save-publish, save-update, save-discard)
|
|
16
|
-
- Get or update page settings like page title, description, keywords, styling (get-settings, update-settings)
|
|
17
|
-
- Open or preview pages (open, preview)
|
|
18
|
-
This tool handles document-level operations and change history.`,
|
|
14
|
+
description: `Manage page and document operations: history, save, settings, and open/preview.`,
|
|
19
15
|
inputSchema: {
|
|
20
16
|
action: z
|
|
21
17
|
.enum( [
|
|
@@ -46,7 +42,11 @@ export function addPageTool( server: McpServer ): void {
|
|
|
46
42
|
title: 'Manage Page',
|
|
47
43
|
},
|
|
48
44
|
_meta: {
|
|
49
|
-
'angie
|
|
45
|
+
'angie/requiredResources': [
|
|
46
|
+
{
|
|
47
|
+
uri: V3_DESCRIPTION_URI,
|
|
48
|
+
whenToUse: 'Read to understand Elementor capabilities and limitations before using this tool.',
|
|
49
|
+
},
|
|
50
50
|
{
|
|
51
51
|
uri: RESOURCE_URI_PAGE_SETTINGS,
|
|
52
52
|
whenToUse:
|
package/src/tools/routes-tool.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from '@elementor/schema';
|
|
2
2
|
import { type McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
|
|
4
|
+
import { V3_DESCRIPTION_URI } from '../mcp-description-resource';
|
|
4
5
|
import type { McpToolResult, ToolParams } from '../types';
|
|
5
6
|
import { get$e } from '../utils';
|
|
6
7
|
|
|
@@ -41,6 +42,14 @@ export function addRoutesTool( server: McpServer ): void {
|
|
|
41
42
|
annotations: {
|
|
42
43
|
title: 'Manage Routes',
|
|
43
44
|
},
|
|
45
|
+
_meta: {
|
|
46
|
+
'angie/requiredResources': [
|
|
47
|
+
{
|
|
48
|
+
uri: V3_DESCRIPTION_URI,
|
|
49
|
+
whenToUse: 'Read to understand Elementor capabilities and limitations before using this tool.',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
44
53
|
},
|
|
45
54
|
async ( params: ToolParams ) => {
|
|
46
55
|
switch ( params.action ) {
|
|
@@ -2,6 +2,7 @@ import { z } from '@elementor/schema';
|
|
|
2
2
|
import { type McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { SamplingMessageSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
|
|
5
|
+
import { V3_DESCRIPTION_URI } from '../mcp-description-resource';
|
|
5
6
|
import type { McpToolResult } from '../types';
|
|
6
7
|
import { getElementor } from '../utils';
|
|
7
8
|
|
|
@@ -9,28 +10,10 @@ export function addStylingTool( server: McpServer ): void {
|
|
|
9
10
|
server.registerTool(
|
|
10
11
|
'styling',
|
|
11
12
|
{
|
|
12
|
-
description: `
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
- Complex animations with custom keyframes or CSS transitions
|
|
17
|
-
- Styling that requires media queries or complex CSS rules
|
|
18
|
-
- Click-triggered effects or other non-motion triggers
|
|
19
|
-
- Custom hover effects that don't involve motion (color changes, opacity, etc.)
|
|
20
|
-
|
|
21
|
-
**When NOT to use this tool:**
|
|
22
|
-
- Basic styling achievable through Elementor settings (colors, typography, spacing, borders, simple hover effects) -> use the elementor__elements with "update-settings" action.
|
|
23
|
-
|
|
24
|
-
**Do NOT use this tool if the user mentions motion effects with supported triggers:**
|
|
25
|
-
- "on hover" with motion (movement, rotation, scaling) → use motion-effects tool
|
|
26
|
-
- "on scroll" with motion effects → use motion-effects tool
|
|
27
|
-
- "mouse move" / "follow mouse" → use motion-effects tool
|
|
28
|
-
- "entrance" / "fade in" / "slide in" animations → use motion-effects tool
|
|
29
|
-
|
|
30
|
-
**Actions available:**
|
|
31
|
-
- **custom-css**: Generate and apply AI-powered custom CSS to elements
|
|
32
|
-
|
|
33
|
-
This tool generates CSS code using AI, provides preview functionality, and handles user approval workflow for applying custom styles.`,
|
|
13
|
+
description: `Apply custom CSS to legacy/V3 elements.
|
|
14
|
+
- Do NOT use for V4 elements — V4 has its own MCP and tools.
|
|
15
|
+
- Do NOT use for animations or motion — use the interactions tools.
|
|
16
|
+
- Do NOT use for basic styling — V3 elements support basic styling via the V3 settings tool.`,
|
|
34
17
|
inputSchema: {
|
|
35
18
|
action: z
|
|
36
19
|
.enum( [ 'custom-css' ] )
|
|
@@ -51,6 +34,14 @@ This tool generates CSS code using AI, provides preview functionality, and handl
|
|
|
51
34
|
annotations: {
|
|
52
35
|
title: 'Apply Custom Styling',
|
|
53
36
|
},
|
|
37
|
+
_meta: {
|
|
38
|
+
'angie/requiredResources': [
|
|
39
|
+
{
|
|
40
|
+
uri: V3_DESCRIPTION_URI,
|
|
41
|
+
whenToUse: 'Read to understand Elementor capabilities and limitations before using this tool.',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
54
45
|
},
|
|
55
46
|
async ( params ) => {
|
|
56
47
|
switch ( params.action ) {
|
package/src/tools/ui-tool.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from '@elementor/schema';
|
|
2
2
|
import { type McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
|
|
4
|
+
import { V3_DESCRIPTION_URI } from '../mcp-description-resource';
|
|
4
5
|
import type { McpToolResult, ToolParams } from '../types';
|
|
5
6
|
import { get$e, getElementor } from '../utils';
|
|
6
7
|
|
|
@@ -36,6 +37,14 @@ export function addUiTool( server: McpServer ): void {
|
|
|
36
37
|
annotations: {
|
|
37
38
|
title: 'Manage UI',
|
|
38
39
|
},
|
|
40
|
+
_meta: {
|
|
41
|
+
'angie/requiredResources': [
|
|
42
|
+
{
|
|
43
|
+
uri: V3_DESCRIPTION_URI,
|
|
44
|
+
whenToUse: 'Read to understand Elementor capabilities and limitations before using this tool.',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
39
48
|
},
|
|
40
49
|
async ( params: ToolParams ) => {
|
|
41
50
|
switch ( params.action ) {
|