@jahia/agentic 0.1.1 → 0.3.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 (174) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +28 -0
  3. package/dist/claude/.claude/rules/jahia.md +3 -1
  4. package/dist/claude/.claude/skills/jahia/SKILL.md +18 -10
  5. package/dist/claude/.claude/skills/jahia-content/SKILL.md +102 -84
  6. package/dist/claude/.claude/skills/jahia-content-create-content/SKILL.md +255 -280
  7. package/dist/claude/.claude/skills/jahia-content-explore-structure/SKILL.md +187 -96
  8. package/dist/claude/.claude/skills/jahia-content-media-upload/SKILL.md +197 -0
  9. package/dist/claude/.claude/skills/jahia-content-move-content/SKILL.md +160 -165
  10. package/dist/claude/.claude/skills/jahia-content-organize/SKILL.md +209 -0
  11. package/dist/claude/.claude/skills/jahia-content-publish/SKILL.md +181 -0
  12. package/dist/claude/.claude/skills/jahia-content-query-content/SKILL.md +122 -92
  13. package/dist/claude/.claude/skills/jahia-content-translate-content/SKILL.md +154 -225
  14. package/dist/claude/.claude/skills/jahia-dev-build-component/SKILL.md +7 -22
  15. package/dist/claude/.claude/skills/jahia-dev-create-view/SKILL.md +58 -0
  16. package/dist/claude/.claude/skills/jahia-dev-cypress/SKILL.md +150 -330
  17. package/dist/claude/.claude/skills/jahia-dev-java/SKILL.md +7 -2
  18. package/dist/claude/.claude/skills/jahia-dev-query-content/SKILL.md +93 -296
  19. package/dist/claude/.claude/skills/jahia-java-concurrency/SKILL.md +308 -0
  20. package/dist/claude/.claude/skills/jahia-java-jcr/SKILL.md +153 -0
  21. package/dist/claude/.claude/skills/jahia-java-osgi/SKILL.md +134 -0
  22. package/dist/claude/.claude/skills/jahia-java-persistence/SKILL.md +177 -0
  23. package/dist/claude/.claude/skills/jahia-java-security/SKILL.md +84 -0
  24. package/dist/claude/.claude/skills/jahia-jcr-sql2/SKILL.md +258 -0
  25. package/dist/claude/.claude/skills/jahia-review-java/SKILL.md +131 -0
  26. package/dist/claude/.claude/skills/jahia-review-java/references/code-review-output.md +121 -0
  27. package/dist/claude/CLAUDE.md +4 -8
  28. package/dist/codex/.agents/skills/jahia/SKILL.md +18 -10
  29. package/dist/codex/.agents/skills/jahia-content/SKILL.md +102 -84
  30. package/dist/codex/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  31. package/dist/codex/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  32. package/dist/codex/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  33. package/dist/codex/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  34. package/dist/codex/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  35. package/dist/codex/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  36. package/dist/codex/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  37. package/dist/codex/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  38. package/dist/codex/.agents/skills/jahia-dev-build-component/SKILL.md +7 -22
  39. package/dist/codex/.agents/skills/jahia-dev-create-view/SKILL.md +58 -0
  40. package/dist/codex/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  41. package/dist/codex/.agents/skills/jahia-dev-java/SKILL.md +7 -2
  42. package/dist/codex/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  43. package/dist/codex/.agents/skills/jahia-java-concurrency/SKILL.md +308 -0
  44. package/dist/codex/.agents/skills/jahia-java-jcr/SKILL.md +153 -0
  45. package/dist/codex/.agents/skills/jahia-java-osgi/SKILL.md +134 -0
  46. package/dist/codex/.agents/skills/jahia-java-persistence/SKILL.md +177 -0
  47. package/dist/codex/.agents/skills/jahia-java-security/SKILL.md +84 -0
  48. package/dist/codex/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  49. package/dist/codex/.agents/skills/jahia-review-java/SKILL.md +131 -0
  50. package/dist/codex/.agents/skills/jahia-review-java/references/code-review-output.md +121 -0
  51. package/dist/codex/AGENTS.md +5 -5
  52. package/dist/copilot/.agents/skills/jahia/SKILL.md +18 -10
  53. package/dist/copilot/.agents/skills/jahia-content/SKILL.md +102 -84
  54. package/dist/copilot/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  55. package/dist/copilot/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  56. package/dist/copilot/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  57. package/dist/copilot/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  58. package/dist/copilot/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  59. package/dist/copilot/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  60. package/dist/copilot/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  61. package/dist/copilot/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  62. package/dist/copilot/.agents/skills/jahia-dev-build-component/SKILL.md +7 -22
  63. package/dist/copilot/.agents/skills/jahia-dev-create-view/SKILL.md +58 -0
  64. package/dist/copilot/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  65. package/dist/copilot/.agents/skills/jahia-dev-java/SKILL.md +7 -2
  66. package/dist/copilot/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  67. package/dist/copilot/.agents/skills/jahia-java-concurrency/SKILL.md +308 -0
  68. package/dist/copilot/.agents/skills/jahia-java-jcr/SKILL.md +153 -0
  69. package/dist/copilot/.agents/skills/jahia-java-osgi/SKILL.md +134 -0
  70. package/dist/copilot/.agents/skills/jahia-java-persistence/SKILL.md +177 -0
  71. package/dist/copilot/.agents/skills/jahia-java-security/SKILL.md +84 -0
  72. package/dist/copilot/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  73. package/dist/copilot/.agents/skills/jahia-review-java/SKILL.md +131 -0
  74. package/dist/copilot/.agents/skills/jahia-review-java/references/code-review-output.md +121 -0
  75. package/dist/copilot/AGENTS.md +5 -5
  76. package/dist/cursor/.agents/skills/jahia/SKILL.md +18 -10
  77. package/dist/cursor/.agents/skills/jahia-content/SKILL.md +102 -84
  78. package/dist/cursor/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  79. package/dist/cursor/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  80. package/dist/cursor/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  81. package/dist/cursor/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  82. package/dist/cursor/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  83. package/dist/cursor/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  84. package/dist/cursor/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  85. package/dist/cursor/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  86. package/dist/cursor/.agents/skills/jahia-dev-build-component/SKILL.md +7 -22
  87. package/dist/cursor/.agents/skills/jahia-dev-create-view/SKILL.md +58 -0
  88. package/dist/cursor/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  89. package/dist/cursor/.agents/skills/jahia-dev-java/SKILL.md +7 -2
  90. package/dist/cursor/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  91. package/dist/cursor/.agents/skills/jahia-java-concurrency/SKILL.md +308 -0
  92. package/dist/cursor/.agents/skills/jahia-java-jcr/SKILL.md +153 -0
  93. package/dist/cursor/.agents/skills/jahia-java-osgi/SKILL.md +134 -0
  94. package/dist/cursor/.agents/skills/jahia-java-persistence/SKILL.md +177 -0
  95. package/dist/cursor/.agents/skills/jahia-java-security/SKILL.md +84 -0
  96. package/dist/cursor/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  97. package/dist/cursor/.agents/skills/jahia-review-java/SKILL.md +131 -0
  98. package/dist/cursor/.agents/skills/jahia-review-java/references/code-review-output.md +121 -0
  99. package/dist/cursor/.cursor/rules/jahia.mdc +3 -1
  100. package/dist/gemini/.agents/skills/jahia/SKILL.md +18 -10
  101. package/dist/gemini/.agents/skills/jahia-content/SKILL.md +102 -84
  102. package/dist/gemini/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  103. package/dist/gemini/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  104. package/dist/gemini/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  105. package/dist/gemini/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  106. package/dist/gemini/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  107. package/dist/gemini/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  108. package/dist/gemini/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  109. package/dist/gemini/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  110. package/dist/gemini/.agents/skills/jahia-dev-build-component/SKILL.md +7 -22
  111. package/dist/gemini/.agents/skills/jahia-dev-create-view/SKILL.md +58 -0
  112. package/dist/gemini/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  113. package/dist/gemini/.agents/skills/jahia-dev-java/SKILL.md +7 -2
  114. package/dist/gemini/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  115. package/dist/gemini/.agents/skills/jahia-java-concurrency/SKILL.md +308 -0
  116. package/dist/gemini/.agents/skills/jahia-java-jcr/SKILL.md +153 -0
  117. package/dist/gemini/.agents/skills/jahia-java-osgi/SKILL.md +134 -0
  118. package/dist/gemini/.agents/skills/jahia-java-persistence/SKILL.md +177 -0
  119. package/dist/gemini/.agents/skills/jahia-java-security/SKILL.md +84 -0
  120. package/dist/gemini/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  121. package/dist/gemini/.agents/skills/jahia-review-java/SKILL.md +131 -0
  122. package/dist/gemini/.agents/skills/jahia-review-java/references/code-review-output.md +121 -0
  123. package/dist/gemini/AGENTS.md +5 -5
  124. package/dist/gemini/GEMINI.md +2 -2
  125. package/dist/opencode/.agents/skills/jahia/SKILL.md +18 -10
  126. package/dist/opencode/.agents/skills/jahia-content/SKILL.md +102 -84
  127. package/dist/opencode/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  128. package/dist/opencode/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  129. package/dist/opencode/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  130. package/dist/opencode/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  131. package/dist/opencode/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  132. package/dist/opencode/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  133. package/dist/opencode/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  134. package/dist/opencode/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  135. package/dist/opencode/.agents/skills/jahia-dev-build-component/SKILL.md +7 -22
  136. package/dist/opencode/.agents/skills/jahia-dev-create-view/SKILL.md +58 -0
  137. package/dist/opencode/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  138. package/dist/opencode/.agents/skills/jahia-dev-java/SKILL.md +7 -2
  139. package/dist/opencode/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  140. package/dist/opencode/.agents/skills/jahia-java-concurrency/SKILL.md +308 -0
  141. package/dist/opencode/.agents/skills/jahia-java-jcr/SKILL.md +153 -0
  142. package/dist/opencode/.agents/skills/jahia-java-osgi/SKILL.md +134 -0
  143. package/dist/opencode/.agents/skills/jahia-java-persistence/SKILL.md +177 -0
  144. package/dist/opencode/.agents/skills/jahia-java-security/SKILL.md +84 -0
  145. package/dist/opencode/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  146. package/dist/opencode/.agents/skills/jahia-review-java/SKILL.md +131 -0
  147. package/dist/opencode/.agents/skills/jahia-review-java/references/code-review-output.md +121 -0
  148. package/dist/opencode/AGENTS.md +5 -5
  149. package/dist/windsurf/.windsurf/rules/jahia.md +3 -1
  150. package/dist/windsurf/.windsurf/skills/jahia/SKILL.md +18 -10
  151. package/dist/windsurf/.windsurf/skills/jahia-content/SKILL.md +102 -84
  152. package/dist/windsurf/.windsurf/skills/jahia-content-create-content/SKILL.md +255 -280
  153. package/dist/windsurf/.windsurf/skills/jahia-content-explore-structure/SKILL.md +187 -96
  154. package/dist/windsurf/.windsurf/skills/jahia-content-media-upload/SKILL.md +197 -0
  155. package/dist/windsurf/.windsurf/skills/jahia-content-move-content/SKILL.md +160 -165
  156. package/dist/windsurf/.windsurf/skills/jahia-content-organize/SKILL.md +209 -0
  157. package/dist/windsurf/.windsurf/skills/jahia-content-publish/SKILL.md +181 -0
  158. package/dist/windsurf/.windsurf/skills/jahia-content-query-content/SKILL.md +122 -92
  159. package/dist/windsurf/.windsurf/skills/jahia-content-translate-content/SKILL.md +154 -225
  160. package/dist/windsurf/.windsurf/skills/jahia-dev-build-component/SKILL.md +7 -22
  161. package/dist/windsurf/.windsurf/skills/jahia-dev-create-view/SKILL.md +58 -0
  162. package/dist/windsurf/.windsurf/skills/jahia-dev-cypress/SKILL.md +150 -330
  163. package/dist/windsurf/.windsurf/skills/jahia-dev-java/SKILL.md +7 -2
  164. package/dist/windsurf/.windsurf/skills/jahia-dev-query-content/SKILL.md +93 -296
  165. package/dist/windsurf/.windsurf/skills/jahia-java-concurrency/SKILL.md +308 -0
  166. package/dist/windsurf/.windsurf/skills/jahia-java-jcr/SKILL.md +153 -0
  167. package/dist/windsurf/.windsurf/skills/jahia-java-osgi/SKILL.md +134 -0
  168. package/dist/windsurf/.windsurf/skills/jahia-java-persistence/SKILL.md +177 -0
  169. package/dist/windsurf/.windsurf/skills/jahia-java-security/SKILL.md +84 -0
  170. package/dist/windsurf/.windsurf/skills/jahia-jcr-sql2/SKILL.md +258 -0
  171. package/dist/windsurf/.windsurf/skills/jahia-review-java/SKILL.md +131 -0
  172. package/dist/windsurf/.windsurf/skills/jahia-review-java/references/code-review-output.md +121 -0
  173. package/dist/windsurf/AGENTS.md +5 -5
  174. package/package.json +7 -3
@@ -1,164 +1,255 @@
1
1
  ---
2
2
  name: jahia-content-explore-structure
3
- user-invocable: false
4
- description: Efficiently maps an unknown Jahia website's content structure before creating or editing content. Discovers available content types, their properties (i18n vs non-i18n), valid enum values, mixin requirements, and image assets — in the minimum number of API calls. Works on any Jahia instance including fresh installs with no reference site.
3
+ description: Efficiently maps an unknown Jahia website's sites, template sets, pages, areas, content trees, and type definitions using MCP tools before authoring or restructuring content.
5
4
  ---
6
5
 
7
6
  # Skill: jahia-content-explore-structure
8
7
 
9
- Use this skill **before** creating content on an unfamiliar Jahia site. It produces a reusable property map so that `/jahia-content-create-content` can work without trial-and-error mutations.
8
+ Use this skill before creating or editing content on an unfamiliar Jahia instance. It produces a reliable map of the CMS so that `/jahia-content-create-content` and `/jahia-content-organize` can work without guesswork.
10
9
 
11
- **No reference site required.** All content type definitions, property names, i18n flags, and enum constraints are retrieved directly from the GraphQL API via the `nodeTypeByName` and `nodeTypes` queries.
10
+ > **Never call Jahia's GraphQL API directly.** Use only MCP tools. If a capability is missing, report it do not work around with curl/GraphQL.
12
11
 
13
12
  ---
14
13
 
15
14
  ## Prerequisites
16
15
 
17
- - Jahia running at `http://localhost:8080`
18
- - Credentials: `root` / `root1234`
19
- - Always include `-H "Origin: http://localhost:8080"` — omitting it causes `Permission denied`
16
+ - MCP server `jahia` connected with a valid API token
17
+ - Know the target `siteKey`, or start with `site.list`
20
18
 
21
19
  ---
22
20
 
23
- ## Step 1 — Batch site exploration (ONE call)
21
+ ## Discovery workflow
24
22
 
25
- Use GraphQL aliases to retrieve everything you need in a **single HTTP request**: site metadata, page structure, file assets, and available content types.
23
+ ### Level 1 What sites exist?
26
24
 
27
- First, find the site key:
28
- ```bash
29
- curl -s -u root:root1234 -H "Content-Type: application/json" -H "Origin: http://localhost:8080" \
30
- -X POST http://localhost:8080/modules/graphql \
31
- -d '{"query":"{ jcr { nodeByPath(path: \"/sites\") { children { nodes { name } } } } }"}'
32
25
  ```
26
+ tool: site.list
27
+ ```
28
+
29
+ Returns all sites with `siteKey`, `title`, `languages`, and `defaultLanguage`.
30
+
31
+ ### Level 2 — What template sets are installed for site creation?
33
32
 
34
- Then run the full batch query (replace `SITE_KEY` and `TEMPLATE_MODULE`):
35
- ```bash
36
- curl -s -u root:root1234 \
37
- -H "Content-Type: application/json" -H "Origin: http://localhost:8080" \
38
- -X POST http://localhost:8080/modules/graphql \
39
- -d '{"query":"{ jcr { site: nodeByPath(path: \"/sites/SITE_KEY\") { properties(names: [\"j:templatesSet\",\"j:defaultLanguage\"]) { name value } } home: nodeByPath(path: \"/sites/SITE_KEY/home\") { children { nodes { name primaryNodeType { name } children { nodes { name primaryNodeType { name } } } } } } files: nodeByPath(path: \"/sites/SITE_KEY/files\") { children { nodes { name uuid } } } contentTypes: nodeTypes(filter: {siteKey: \"SITE_KEY\", includeMixins: false, includeAbstract: false}) { nodes { name systemId } } } }"}'
33
+ ```
34
+ tool: site.templateSets
35
+ args: {}
40
36
  ```
41
37
 
42
- From the response:
43
- - `site.properties` → `j:templatesSet` (the template module name) and `j:defaultLanguage`
44
- - `home.children` → page area structure; look for area nodes and check their children to see which content types are in use
45
- - `files.children` → existing file folders and UUIDs
46
- - `contentTypes.nodes` → all deployed types; filter by `systemId` matching `j:templatesSet` to find the site's own types
38
+ Use this between `site.list` and `site.get` when you need to understand what template sets are available for creating a new site. This is especially useful on fresh instances where a user may ask for a site that does not exist yet.
47
39
 
48
- ---
40
+ ### Level 3 — Site details
41
+
42
+ ```
43
+ tool: site.get
44
+ args: { "siteKey": "SITE_KEY" }
45
+ ```
46
+
47
+ Returns detailed metadata such as languages, server names, homepage path, template set, and raw JCR properties.
48
+
49
+ ### Level 4 — What pages exist?
50
+
51
+ ```
52
+ tool: page.list
53
+ args: { "siteKey": "SITE_KEY" }
54
+ ```
55
+
56
+ Returns paginated pages with path, title, template, and last modified date.
49
57
 
50
- ## Step 2 — Get ALL type definitions for the template module (ONE call)
58
+ Useful filters:
59
+ - `templateName`
60
+ - `titleContains`
61
+ - `createdAfter`
62
+ - `modifiedAfter`
63
+ - `sortBy`: `lastModified`, `created`, `title`, `path`
51
64
 
52
- Once you know `j:templatesSet` (e.g. `mymodule`) from Step 1, fetch **every type with all its properties** in a single call:
65
+ ### Level 5 Page structure and content areas
53
66
 
54
- ```bash
55
- curl -s -u root:root1234 \
56
- -H "Content-Type: application/json" -H "Origin: http://localhost:8080" \
57
- -X POST http://localhost:8080/modules/graphql \
58
- -d '{
59
- "query": "{ jcr { nodeTypes(filter: {modules: [\"TEMPLATE_MODULE\"], includeMixins: false, includeAbstract: false}) { nodes { name mixin supertypes { name } properties { name requiredType internationalized mandatory multiple constraints } nodes { name mandatory requiredPrimaryType { name } } } } } }"
60
- }'
61
67
  ```
68
+ tool: page.structure
69
+ args: { "path": "/sites/SITE_KEY/home/about" }
70
+ ```
71
+
72
+ Returns:
73
+ - area paths
74
+ - allowed node types per area
75
+ - current children with type, title, and kind classification
62
76
 
63
- > ✅ **This is the only type-definition call you need.** The `properties` array already includes **all inherited properties from supertypes and mixins** — the Jahia GraphQL API resolves inheritance automatically. Do **NOT** query supertypes separately, do **NOT** call `nodeTypeByName` for individual types, do **NOT** query mixin definitions.
77
+ This is the authoring contract for a page.
64
78
 
65
- If you also need properties from standard Jahia types (e.g. `jnt:bigText`, `jnt:text`), add them with `nodeTypesByNames`:
79
+ ### Level 6 Content tree navigation
66
80
 
67
- ```bash
68
- curl -s -u root:root1234 \
69
- -H "Content-Type: application/json" -H "Origin: http://localhost:8080" \
70
- -X POST http://localhost:8080/modules/graphql \
71
- -d '{"query":"{ jcr { nodeTypesByNames(names: [\"jnt:bigText\", \"jnt:text\"]) { name properties { name requiredType internationalized mandatory constraints } } } }"}'
81
+ ```
82
+ tool: content.list
83
+ args: {
84
+ "parentPath": "/sites/SITE_KEY/home/about/main",
85
+ "limit": 50
86
+ }
72
87
  ```
73
88
 
74
- ---
89
+ Returns direct children with path, type, kind, title, and child count.
75
90
 
76
- ## Step 3 — Identify image assets
91
+ Optional filters:
92
+ - `childNodeType`
93
+ - `projectProperties`
77
94
 
78
- File assets are already returned by the Step 1 batch query under `files.children`. No additional call needed unless you need UUIDs of files inside sub-folders:
95
+ ### Level 7 Read a specific node
79
96
 
80
- ```bash
81
- curl -s -u root:root1234 \
82
- -H "Content-Type: application/json" -H "Origin: http://localhost:8080" \
83
- -X POST http://localhost:8080/modules/graphql \
84
- -d '{"query":"{ jcr { nodeByPath(path: \"/sites/SITE_KEY/files/SUBFOLDER\") { children { nodes { name uuid } } } } }"}'
97
+ ```
98
+ tool: content.get
99
+ args: { "path": "/sites/SITE_KEY/home/about/main/intro-text" }
85
100
  ```
86
101
 
87
- > `image` properties have `requiredType: WEAKREFERENCE`. Set them with `type: WEAKREFERENCE` and the file node UUID. The file must have `jmix:image` mixin always include `mixins: [\"jmix:image\"]` when uploading (see `/jahia-content-create-content`).
102
+ Returns all readable properties, mixins, and metadata. You can also pass `uuid` instead of `path`.
88
103
 
89
- ---
104
+ ### Level 8 — Search across content
105
+
106
+ ```
107
+ tool: content.search
108
+ args: {
109
+ "siteKey": "SITE_KEY",
110
+ "nodeType": "jnt:bigText",
111
+ "locale": "en",
112
+ "fullText": "welcome",
113
+ "limit": 10
114
+ }
115
+ ```
116
+
117
+ Required parameters:
118
+ - `siteKey`
119
+ - `nodeType`
120
+
121
+ Optional parameters:
122
+ - `locale`
123
+ - `fullText`
124
+ - `fullTextField`
125
+ - `basePath`
126
+ - `properties`
127
+ - `projectProperties`
128
+ - `sortBy`
129
+ - `order`
130
+ - `offset`
131
+ - `limit`
132
+
133
+ Property filters combine with AND:
134
+
135
+ ```json
136
+ "properties": [
137
+ { "name": "jcr:createdBy", "op": "eq", "value": "editor1" },
138
+ { "name": "jcr:created", "op": "gt", "value": "2026-06-01T00:00:00.000Z" }
139
+ ]
140
+ ```
90
141
 
91
- ## Step 4 Build the property map
142
+ Operators: `eq`, `like`, `gt`, `gte`, `lt`, `lte`, `isNull`, `isNotNull`
92
143
 
93
- After Step 2, summarise the data before creating content:
144
+ ### Level 9 Type discovery
94
145
 
146
+ All types available on the site:
147
+
148
+ ```
149
+ tool: site.types
150
+ args: { "siteKey": "SITE_KEY" }
95
151
  ```
96
- Content type: NAMESPACE:typeName
97
- Supertypes: [from API response — no need to query separately]
98
- Required mixins (must be in addNode mixins[]): jmix:renderable, jmix:internalLink, etc.
99
152
 
100
- Mandatory non-i18n properties (set in addNode, no language needed):
101
- image WEAKREF UUID of jmix:image file
153
+ Full definition of one type:
102
154
 
103
- i18n properties (set with language: "en" in mutation):
104
- jcr:title STRING from mix:title
105
- body STRING rich HTML text
155
+ ```
156
+ tool: content.type
157
+ args: { "name": "mymodule:heroSection" }
158
+ ```
106
159
 
107
- Optional non-i18n:
108
- [name] STRING value1 | value2 (from constraints array)
160
+ Allowed types in one specific area:
109
161
 
110
- Mixin properties (set AFTER addNode in a separate mutation):
111
- j:view STRING (from jmix:renderable)
112
- j:linknode WEAKREF i18n (from jmix:internalLink)
113
- j:url STRING i18n (from jmix:externalLink — set with language: "en")
162
+ ```
163
+ tool: content.list_definitions
164
+ args: {
165
+ "siteKey": "SITE_KEY",
166
+ "nodePath": "/sites/SITE_KEY/home/my-page/main"
167
+ }
114
168
  ```
115
169
 
116
170
  ---
117
171
 
118
- ## Critical gotchas
172
+ ## Exploration patterns
173
+
174
+ ### Show me everything about this instance
175
+
176
+ 1. `site.list`
177
+ 2. `site.templateSets`
178
+ 3. `site.get` for the relevant site
179
+ 4. `page.list`
180
+ 5. `page.structure` on a representative page
181
+ 6. `site.types`
182
+
183
+ ### What content is on this page?
119
184
 
120
- ### 1. `j:view` cannot be set in `addNode` — set it after
185
+ 1. `page.structure`
186
+ 2. `content.get` for any interesting child nodes
187
+ 3. `page.preview` if you need rendered output
121
188
 
122
- ```graphql
123
- # Step 1: create node with mixin declared
124
- addNode(... mixins: ["jmix:renderable"] ...)
189
+ ### Find all articles mentioning a phrase
125
190
 
126
- # Step 2: set j:view in a separate mutation
127
- mutateNode(...) { mutateProperty(name: "j:view") { setValue(value: "cover") } }
191
+ ```
192
+ tool: content.search
193
+ args: {
194
+ "siteKey": "SITE_KEY",
195
+ "nodeType": "jnt:page",
196
+ "locale": "en",
197
+ "fullText": ""annual report"",
198
+ "sortBy": "_score",
199
+ "order": "desc"
200
+ }
128
201
  ```
129
202
 
130
- ### 2. `j:url` (from `jmix:externalLink`) requires `language: "en"` — it is an i18n property
203
+ ### What custom types does this site use?
131
204
 
132
- ```graphql
133
- addNode(
134
- mixins: ["jmix:externalLink"]
135
- properties: [
136
- {name: "j:url", type: STRING, value: "https://example.com", language: "en"}
137
- ]
138
- )
205
+ ```
206
+ tool: site.types
207
+ args: { "siteKey": "SITE_KEY", "includeSubTypes": true }
139
208
  ```
140
209
 
141
- ### 3. GraphQL `properties()` without `language:` hides i18n property values at query time
210
+ Then inspect any interesting type:
142
211
 
143
- When **reading** existing nodes: use `properties(language: "en")`. When **writing** i18n properties: add `language: "en"` to the `setValue` call.
212
+ ```
213
+ tool: content.type
214
+ args: { "name": "luxe:blogPost", "includeSubTypes": false }
215
+ ```
144
216
 
145
217
  ---
146
218
 
147
- ## Next step Create content with the property map
219
+ ## Build a property map before creating content
148
220
 
149
- Once you have the property map from Step 4, hand it off to **`/jahia-content-create-content`**:
221
+ Summarize each target type before authoring:
150
222
 
151
- - Use the mandatory properties list to populate `addNode` / `addChild` mutations correctly the first time
152
- - Use the i18n flags to know which properties need `language: "en"`
153
- - Use the enum constraints to pass only valid values
154
- - Use nested `addChild` calls to create an entire content tree in one mutation (see the `⚡ Minimum-call workflow` section in `/jahia-content-create-content`)
223
+ ```
224
+ Content type: mymodule:heroSection
225
+ Properties:
226
+ jcr:title STRING i18n mandatory
227
+ subtitle STRING i18n optional
228
+ image WEAKREF - optional → UUID of a file node
229
+ backgroundColor STRING - optional → choicelist: light|dark
230
+
231
+ Allowed in area: pagecontent
232
+ ```
155
233
 
156
- > Skipping this skill and guessing property names leads to `ConstraintViolationException` and `Couldn't find definition for property` errors. Always explore first.
234
+ That property map is what `/jahia-content-create-content` needs to avoid validation errors.
157
235
 
158
236
  ---
159
237
 
160
- ## References
238
+ ## Key principles
239
+
240
+ | Principle | Detail |
241
+ |-----------|--------|
242
+ | Explore before acting | Discover structure before creating, moving, or deleting content |
243
+ | Use `page.structure` for pages | It reveals areas, allowed types, and constraints |
244
+ | Use `content.list_definitions` for areas | It shows exactly what is droppable there and what properties are required |
245
+ | Use `site.templateSets` when the site may not exist yet | It tells you what template sets can be used with `site.create` |
246
+ | Navigate top-down | `site.list` → `site.get` / `site.templateSets` → `page.list` → `page.structure` → `content.list` → `content.get` |
247
+
248
+ ---
249
+
250
+ ## Related skills
251
+
252
+ - `/jahia-content-create-content` — create sites, pages, and content after exploring
253
+ - `/jahia-content-organize` — move, copy, rename, reorder, or delete after understanding structure
254
+ - `/jahia-content-query-content` — inspect and search content once you know where to look
161
255
 
162
- - GraphQL API playground: `http://localhost:8080/modules/graphql`
163
- - GraphQL schema introspection for node type fields: `{ __type(name: "JCRNodeType") { fields { name } } }`
164
- - GraphQL schema introspection for property definition fields: `{ __type(name: "JCRPropertyDefinition") { fields { name } } }`
@@ -0,0 +1,197 @@
1
+ ---
2
+ name: jahia-content-media-upload
3
+ description: Uploads images, documents, and other files to Jahia via MCP tools. Use when asked to ingest media, organize uploads in site folders, or reference files from content.
4
+ ---
5
+
6
+ # Skill: jahia-content-media-upload
7
+
8
+ Uploads media into Jahia using MCP tools via the `jahia` MCP server.
9
+ Uploaded files land under `/sites/<siteKey>/files/` and can then be referenced from content.
10
+
11
+ > **Never call Jahia's GraphQL API directly.** Use only MCP tools. If a capability is missing, report it — do not work around with curl/GraphQL.
12
+
13
+ ---
14
+
15
+ ## Upload methods
16
+
17
+ ### Method 1 — URL ingestion
18
+
19
+ If the file already exists at an HTTP or HTTPS URL:
20
+
21
+ ```
22
+ tool: media.upload.url
23
+ args: {
24
+ "siteKey": "SITE_KEY",
25
+ "sourceUrl": "https://example.com/images/hero.jpg",
26
+ "fileName": "hero.jpg"
27
+ }
28
+ ```
29
+
30
+ Optional parameters:
31
+ - `folder`
32
+ - `mimeType`
33
+
34
+ Returns the file path, UUID, mime type, and size in bytes.
35
+
36
+ ### Method 2 — Two-phase binary upload
37
+
38
+ Use this when the file is local or not publicly reachable.
39
+
40
+ Create the upload ticket:
41
+
42
+ ```
43
+ tool: media.upload.create
44
+ args: {
45
+ "siteKey": "SITE_KEY",
46
+ "fileName": "report.pdf",
47
+ "sizeBytes": 2048576,
48
+ "folder": "documents"
49
+ }
50
+ ```
51
+
52
+ This returns a `token` and `uploadUrl`.
53
+
54
+ Upload the raw bytes to `uploadUrl`, then finalize:
55
+
56
+ ```
57
+ tool: media.upload.finalize
58
+ args: { "token": "UPLOAD_TOKEN" }
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Organize uploads in folders
64
+
65
+ ```
66
+ tool: media.upload.url
67
+ args: {
68
+ "siteKey": "SITE_KEY",
69
+ "sourceUrl": "https://example.com/team-photo.jpg",
70
+ "fileName": "team-photo.jpg",
71
+ "folder": "images/team"
72
+ }
73
+ ```
74
+
75
+ Folders are created automatically under `/sites/<siteKey>/files`.
76
+
77
+ ---
78
+
79
+ ## Reference uploaded media from content
80
+
81
+ After upload, use the returned UUID or path in the content type's reference property:
82
+
83
+ ```
84
+ tool: content.create
85
+ args: {
86
+ "parentPath": "/sites/SITE_KEY/home/about/main",
87
+ "nodeType": "jdnt:imageBlock",
88
+ "locale": "en",
89
+ "properties": {
90
+ "j:node": "UPLOADED_FILE_UUID",
91
+ "jcr:title": "Team Photo"
92
+ }
93
+ }
94
+ ```
95
+
96
+ Common reference property names:
97
+ - `j:node`
98
+ - `image`
99
+
100
+ Use `content.list_definitions` or `content.type` to confirm the correct property name for the target type.
101
+
102
+ ---
103
+
104
+ ## Browse existing media
105
+
106
+ Media files are standard JCR nodes:
107
+
108
+ ```
109
+ tool: content.list
110
+ args: {
111
+ "parentPath": "/sites/SITE_KEY/files",
112
+ "childNodeType": "jnt:file"
113
+ }
114
+ ```
115
+
116
+ Or search for them:
117
+
118
+ ```
119
+ tool: content.search
120
+ args: {
121
+ "siteKey": "SITE_KEY",
122
+ "nodeType": "jnt:file",
123
+ "fullText": "hero"
124
+ }
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Common pattern — upload and publish an image for a page
130
+
131
+ ```
132
+ # 1. Upload
133
+ tool: media.upload.url
134
+ args: {
135
+ "siteKey": "SITE_KEY",
136
+ "sourceUrl": "https://cdn.example.com/banner.jpg",
137
+ "fileName": "banner.jpg",
138
+ "folder": "images/banners"
139
+ }
140
+
141
+ # 2. Reference it from content
142
+ tool: content.create
143
+ args: {
144
+ "parentPath": "/sites/SITE_KEY/home/landing/main",
145
+ "nodeType": "jdnt:imageBlock",
146
+ "locale": "en",
147
+ "properties": {
148
+ "j:node": "UPLOADED_FILE_UUID",
149
+ "jcr:title": "Hero Banner"
150
+ }
151
+ }
152
+
153
+ # 3. Publish both the media file and the page
154
+ tool: publication.publish
155
+ args: {
156
+ "path": "/sites/SITE_KEY/files/images/banners/banner.jpg",
157
+ "languages": ["en"]
158
+ }
159
+
160
+ tool: publication.publish
161
+ args: {
162
+ "path": "/sites/SITE_KEY/home/landing",
163
+ "languages": ["en"]
164
+ }
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Key rules
170
+
171
+ | Rule | Detail |
172
+ |------|--------|
173
+ | Files land in EDIT first | Uploads are not automatically live |
174
+ | Publish uploaded files when needed | Use `publication.publish` if public rendering depends on them |
175
+ | Max size depends on the upload method | Respect tool limits and server configuration |
176
+ | Folder paths are relative | Do not start `folder` with a leading slash |
177
+ | File names are plain file names | No path separators in `fileName` |
178
+
179
+ ---
180
+
181
+ ## Common errors
182
+
183
+ | Error | Cause | Fix |
184
+ |-------|-------|-----|
185
+ | `TICKET_NOT_FOUND` | Invalid or expired upload token | Create a new ticket with `media.upload.create` |
186
+ | `FILE_TOO_LARGE` | Payload exceeds the allowed size | Reduce file size or use the correct upload flow |
187
+ | `SOURCE_UNREACHABLE` | Jahia cannot fetch the source URL | Verify the remote URL from the Jahia server |
188
+ | `NODE_EXISTS` | A file with the same name already exists | Use a different `fileName` |
189
+
190
+ ---
191
+
192
+ ## Related skills
193
+
194
+ - `/jahia-content-create-content` — reference uploaded media from newly created content
195
+ - `/jahia-content-publish` — publish uploaded files and the pages that use them
196
+ - `/jahia-content-organize` — reorganize content after media-backed pages are created
197
+