@easy-cms/plugin-mcp 1.28.0 → 1.30.0
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 +17 -5
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var INFO = {
|
|
|
12
12
|
name: "@easy-cms/plugin-mcp",
|
|
13
13
|
// The plugin API it is written for (`PLUGIN_API_VERSION` of @easy-cms/core).
|
|
14
14
|
apiVersion: 1,
|
|
15
|
-
...true ? { version: "1.
|
|
15
|
+
...true ? { version: "1.30.0" } : {}
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// src/tools.ts
|
|
@@ -62,8 +62,10 @@ function fieldSchema(field) {
|
|
|
62
62
|
}
|
|
63
63
|
case "json":
|
|
64
64
|
return { ...label2 ? { description: label2 } : {} };
|
|
65
|
-
case "richText":
|
|
66
|
-
|
|
65
|
+
case "richText": {
|
|
66
|
+
const blocks = field.blocks?.length ? ` Between paragraphs it may hold blocks: { "type": "block", "attrs": { "blockType", "id", "fields" } }, blockType one of ${field.blocks.map((b) => `"${b.slug}" (fields: ${b.fields.map((f) => f.name).join(", ")})`).join("; ")}.` : "";
|
|
67
|
+
return { description: hint(`${RICH_TEXT_HINT}${blocks}`) };
|
|
68
|
+
}
|
|
67
69
|
case "upload": {
|
|
68
70
|
const types = field.mimeTypes ? ` (${field.mimeTypes.join(", ")})` : "";
|
|
69
71
|
const id2 = { type: ["integer", "string"] };
|
|
@@ -76,8 +78,18 @@ function fieldSchema(field) {
|
|
|
76
78
|
} : { ...id2, description: hint(`id of a media document${types} (see upload_media)`) };
|
|
77
79
|
}
|
|
78
80
|
case "relationship": {
|
|
79
|
-
const id2 = { type: ["integer", "string"] }
|
|
80
|
-
|
|
81
|
+
const id2 = typeof field.to === "string" ? { type: ["integer", "string"] } : {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: {
|
|
84
|
+
relationTo: { type: "string", enum: [...field.to] },
|
|
85
|
+
value: { type: ["integer", "string"] }
|
|
86
|
+
},
|
|
87
|
+
required: ["relationTo", "value"],
|
|
88
|
+
additionalProperties: false
|
|
89
|
+
};
|
|
90
|
+
const about = hint(
|
|
91
|
+
typeof field.to === "string" ? `id of a document in "${field.to}"` : `a document in one of ${field.to.map((t) => `"${t}"`).join(", ")}: its collection and id`
|
|
92
|
+
);
|
|
81
93
|
return field.hasMany ? {
|
|
82
94
|
type: "array",
|
|
83
95
|
items: id2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easy-cms/plugin-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "MCP server for Easy CMS: let AI assistants read and write content with API keys (experimental)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"@modelcontextprotocol/sdk": "^1.32.1"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@easy-cms/core": "^1.
|
|
22
|
+
"@easy-cms/core": "^1.30.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@easy-cms/core": "^1.
|
|
26
|
-
"@easy-cms/db-sqlite": "^1.
|
|
25
|
+
"@easy-cms/core": "^1.30.0",
|
|
26
|
+
"@easy-cms/db-sqlite": "^1.30.0"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=22.12"
|