@easy-cms/plugin-mcp 0.22.2 → 0.24.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.
Files changed (2) hide show
  1. package/dist/index.js +16 -6
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -60,16 +60,26 @@ function fieldSchema(field) {
60
60
  case "richText":
61
61
  return { description: hint(RICH_TEXT_HINT) };
62
62
  case "upload": {
63
- const id2 = {
64
- type: ["integer", "string"],
65
- description: hint("id of a media document (see upload_media)")
66
- };
67
- return id2;
63
+ const types = field.mimeTypes ? ` (${field.mimeTypes.join(", ")})` : "";
64
+ const id2 = { type: ["integer", "string"] };
65
+ return field.hasMany ? {
66
+ type: "array",
67
+ items: id2,
68
+ description: hint(`ids of media documents${types}, in order (see upload_media)`),
69
+ ...field.minRows !== void 0 ? { minItems: field.minRows } : {},
70
+ ...field.maxRows !== void 0 ? { maxItems: field.maxRows } : {}
71
+ } : { ...id2, description: hint(`id of a media document${types} (see upload_media)`) };
68
72
  }
69
73
  case "relationship": {
70
74
  const id2 = { type: ["integer", "string"] };
71
75
  const about = hint(`id of a document in "${field.to}"`);
72
- return field.hasMany ? { type: "array", items: id2, description: about } : { ...id2, description: about };
76
+ return field.hasMany ? {
77
+ type: "array",
78
+ items: id2,
79
+ description: about,
80
+ ...field.minRows !== void 0 ? { minItems: field.minRows } : {},
81
+ ...field.maxRows !== void 0 ? { maxItems: field.maxRows } : {}
82
+ } : { ...id2, description: about };
73
83
  }
74
84
  case "group":
75
85
  return { ...objectSchema(field.fields, false), ...label2 ? { description: label2 } : {} };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-cms/plugin-mcp",
3
- "version": "0.22.2",
3
+ "version": "0.24.0",
4
4
  "description": "MCP server for Easy CMS: let AI assistants read and write content with API keys",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,11 +19,11 @@
19
19
  "@modelcontextprotocol/sdk": "^1.30.1"
20
20
  },
21
21
  "peerDependencies": {
22
- "@easy-cms/core": "^0.22.2"
22
+ "@easy-cms/core": "^0.24.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@easy-cms/core": "^0.22.2",
26
- "@easy-cms/db-sqlite": "^0.22.2"
25
+ "@easy-cms/core": "^0.24.0",
26
+ "@easy-cms/db-sqlite": "^0.24.0"
27
27
  },
28
28
  "engines": {
29
29
  "node": ">=22.12"