@crypto512/jicon-mcp 0.7.1 → 1.0.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/README.md +128 -395
- package/TOOL_LIST.md +810 -120
- package/dist/config/constants.d.ts +1 -0
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +1 -0
- package/dist/config/constants.js.map +1 -1
- package/dist/config/loader.d.ts +1 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +27 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/types.d.ts +8 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -1
- package/dist/confluence/client.d.ts +38 -0
- package/dist/confluence/client.d.ts.map +1 -1
- package/dist/confluence/client.js +117 -0
- package/dist/confluence/client.js.map +1 -1
- package/dist/confluence/tools.d.ts +102 -75
- package/dist/confluence/tools.d.ts.map +1 -1
- package/dist/confluence/tools.js +510 -151
- package/dist/confluence/tools.js.map +1 -1
- package/dist/confluence/types.d.ts +55 -1
- package/dist/confluence/types.d.ts.map +1 -1
- package/dist/index.js +88 -2
- package/dist/index.js.map +1 -1
- package/dist/jira/tools.d.ts +0 -5
- package/dist/jira/tools.d.ts.map +1 -1
- package/dist/jira/tools.js +40 -87
- package/dist/jira/tools.js.map +1 -1
- package/dist/permissions/filter.d.ts +5 -0
- package/dist/permissions/filter.d.ts.map +1 -1
- package/dist/permissions/filter.js +29 -12
- package/dist/permissions/filter.js.map +1 -1
- package/dist/permissions/tool-registry.d.ts +23 -25
- package/dist/permissions/tool-registry.d.ts.map +1 -1
- package/dist/permissions/tool-registry.js +41 -45
- package/dist/permissions/tool-registry.js.map +1 -1
- package/dist/permissions/write-home-validator.d.ts +35 -0
- package/dist/permissions/write-home-validator.d.ts.map +1 -0
- package/dist/permissions/write-home-validator.js +140 -0
- package/dist/permissions/write-home-validator.js.map +1 -0
- package/dist/tempo/tools.d.ts.map +1 -1
- package/dist/tempo/tools.js +43 -44
- package/dist/tempo/tools.js.map +1 -1
- package/dist/utils/buffer-tools.d.ts +119 -1
- package/dist/utils/buffer-tools.d.ts.map +1 -1
- package/dist/utils/buffer-tools.js +610 -3
- package/dist/utils/buffer-tools.js.map +1 -1
- package/dist/utils/content-buffer.d.ts +34 -0
- package/dist/utils/content-buffer.d.ts.map +1 -1
- package/dist/utils/content-buffer.js +79 -0
- package/dist/utils/content-buffer.js.map +1 -1
- package/dist/utils/http-client.d.ts.map +1 -1
- package/dist/utils/http-client.js +4 -4
- package/dist/utils/http-client.js.map +1 -1
- package/dist/utils/jicon-help.d.ts +29 -0
- package/dist/utils/jicon-help.d.ts.map +1 -0
- package/dist/utils/jicon-help.js +873 -0
- package/dist/utils/jicon-help.js.map +1 -0
- package/dist/utils/plantuml/client.d.ts +40 -0
- package/dist/utils/plantuml/client.d.ts.map +1 -0
- package/dist/utils/plantuml/client.js +306 -0
- package/dist/utils/plantuml/client.js.map +1 -0
- package/dist/utils/plantuml/docker-manager.d.ts +35 -0
- package/dist/utils/plantuml/docker-manager.d.ts.map +1 -0
- package/dist/utils/plantuml/docker-manager.js +280 -0
- package/dist/utils/plantuml/docker-manager.js.map +1 -0
- package/dist/utils/plantuml/index.d.ts +11 -0
- package/dist/utils/plantuml/index.d.ts.map +1 -0
- package/dist/utils/plantuml/index.js +16 -0
- package/dist/utils/plantuml/index.js.map +1 -0
- package/dist/utils/plantuml/service.d.ts +46 -0
- package/dist/utils/plantuml/service.d.ts.map +1 -0
- package/dist/utils/plantuml/service.js +96 -0
- package/dist/utils/plantuml/service.js.map +1 -0
- package/dist/utils/plantuml/tools.d.ts +65 -0
- package/dist/utils/plantuml/tools.d.ts.map +1 -0
- package/dist/utils/plantuml/tools.js +272 -0
- package/dist/utils/plantuml/tools.js.map +1 -0
- package/dist/utils/plantuml/types.d.ts +130 -0
- package/dist/utils/plantuml/types.d.ts.map +1 -0
- package/dist/utils/plantuml/types.js +66 -0
- package/dist/utils/plantuml/types.js.map +1 -0
- package/dist/utils/response-formatter.d.ts +14 -0
- package/dist/utils/response-formatter.d.ts.map +1 -1
- package/dist/utils/response-formatter.js +84 -1
- package/dist/utils/response-formatter.js.map +1 -1
- package/dist/utils/url-tools.d.ts +49 -0
- package/dist/utils/url-tools.d.ts.map +1 -0
- package/dist/utils/url-tools.js +141 -0
- package/dist/utils/url-tools.js.map +1 -0
- package/dist/utils/xhtml/confluence-schema.d.ts +55 -0
- package/dist/utils/xhtml/confluence-schema.d.ts.map +1 -0
- package/dist/utils/xhtml/confluence-schema.js +215 -0
- package/dist/utils/xhtml/confluence-schema.js.map +1 -0
- package/dist/utils/xhtml/index.d.ts +17 -0
- package/dist/utils/xhtml/index.d.ts.map +1 -0
- package/dist/utils/xhtml/index.js +21 -0
- package/dist/utils/xhtml/index.js.map +1 -0
- package/dist/utils/xhtml/operations.d.ts +100 -0
- package/dist/utils/xhtml/operations.d.ts.map +1 -0
- package/dist/utils/xhtml/operations.js +596 -0
- package/dist/utils/xhtml/operations.js.map +1 -0
- package/dist/utils/xhtml/parser.d.ts +64 -0
- package/dist/utils/xhtml/parser.d.ts.map +1 -0
- package/dist/utils/xhtml/parser.js +180 -0
- package/dist/utils/xhtml/parser.js.map +1 -0
- package/dist/utils/xhtml/plantuml.d.ts +112 -0
- package/dist/utils/xhtml/plantuml.d.ts.map +1 -0
- package/dist/utils/xhtml/plantuml.js +251 -0
- package/dist/utils/xhtml/plantuml.js.map +1 -0
- package/dist/utils/xhtml/selector.d.ts +35 -0
- package/dist/utils/xhtml/selector.d.ts.map +1 -0
- package/dist/utils/xhtml/selector.js +358 -0
- package/dist/utils/xhtml/selector.js.map +1 -0
- package/dist/utils/xhtml/serializer.d.ts +26 -0
- package/dist/utils/xhtml/serializer.d.ts.map +1 -0
- package/dist/utils/xhtml/serializer.js +170 -0
- package/dist/utils/xhtml/serializer.js.map +1 -0
- package/dist/utils/xhtml/types.d.ts +134 -0
- package/dist/utils/xhtml/types.d.ts.map +1 -0
- package/dist/utils/xhtml/types.js +65 -0
- package/dist/utils/xhtml/types.js.map +1 -0
- package/dist/utils/xhtml/validator.d.ts +67 -0
- package/dist/utils/xhtml/validator.d.ts.map +1 -0
- package/dist/utils/xhtml/validator.js +300 -0
- package/dist/utils/xhtml/validator.js.map +1 -0
- package/package.json +5 -1
package/TOOL_LIST.md
CHANGED
|
@@ -5,43 +5,46 @@ This document provides a comprehensive reference of all available tools in the J
|
|
|
5
5
|
|
|
6
6
|
## Summary
|
|
7
7
|
|
|
8
|
-
**Total Tools**:
|
|
9
|
-
- **Jira Tools**:
|
|
10
|
-
- **Confluence Tools**:
|
|
11
|
-
- **Tempo Tools**:
|
|
12
|
-
- **Buffer Tools**:
|
|
8
|
+
**Total Tools**: 63
|
|
9
|
+
- **Jira Tools**: 18 (13 read + 5 write)
|
|
10
|
+
- **Confluence Tools**: 17 (11 read + 6 write)
|
|
11
|
+
- **Tempo Tools**: 12 (9 read + 3 write)
|
|
12
|
+
- **Buffer Tools**: 9
|
|
13
|
+
- **Workload Tools**: 2
|
|
14
|
+
- **URL Tools**: 1
|
|
15
|
+
- **Jicon Help Tools**: 1
|
|
16
|
+
- **PlantUML Tools**: 3
|
|
13
17
|
|
|
14
18
|
**Note**: Tools that return large content use in-memory buffering with pagination support. See the Buffer Tools section for content retrieval.
|
|
15
19
|
|
|
16
20
|
---
|
|
17
21
|
|
|
18
|
-
## Jira Tools (
|
|
22
|
+
## Jira Tools (18)
|
|
19
23
|
|
|
20
24
|
### 1. jira_search_issues
|
|
21
|
-
**Description**: Search for Jira issues using JQL
|
|
25
|
+
**Description**: Search for Jira issues using JQL. Auto-fetches all results (up to 5000).
|
|
22
26
|
**Use Cases**: Find bugs, filter by status, search by assignee, complex queries
|
|
23
27
|
|
|
24
28
|
| Parameter | Type | Required | Description |
|
|
25
29
|
|-----------|------|----------|-------------|
|
|
26
30
|
| jql | string | ✓ | JQL query string |
|
|
27
|
-
| maxResults | number | ✗ | Maximum results (default: 50) |
|
|
28
31
|
| fields | string[] | ✗ | Specific fields to return |
|
|
29
32
|
|
|
33
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
34
|
+
|
|
30
35
|
---
|
|
31
36
|
|
|
32
37
|
### 2. jira_get_issue
|
|
33
|
-
**Description**: Get detailed information about a specific issue
|
|
38
|
+
**Description**: Get detailed information about a specific issue
|
|
34
39
|
**Use Cases**: View issue details, check status, read description and comments
|
|
35
40
|
|
|
36
41
|
| Parameter | Type | Required | Description |
|
|
37
42
|
|-----------|------|----------|-------------|
|
|
38
43
|
| issueKey | string | ✓ | Issue key (e.g., "PROJ-123") |
|
|
39
44
|
| fields | string[] | ✗ | Specific fields to return |
|
|
40
|
-
| expand | string[] | ✗ | Additional data (e.g., "changelog") |
|
|
41
|
-
| offset | number | ✗ | Character offset to start from (default: 0) |
|
|
42
|
-
| limit | number | ✗ | Maximum characters to return (default: 5000) |
|
|
45
|
+
| expand | string[] | ✗ | Additional data (e.g., "changelog", "renderedFields") |
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
45
48
|
|
|
46
49
|
---
|
|
47
50
|
|
|
@@ -101,15 +104,16 @@ This document provides a comprehensive reference of all available tools in the J
|
|
|
101
104
|
---
|
|
102
105
|
|
|
103
106
|
### 7. jira_get_issue_comments
|
|
104
|
-
**Description**: Retrieve comments from
|
|
107
|
+
**Description**: Retrieve all comments from a Jira issue
|
|
105
108
|
**Use Cases**: Read discussion history, check updates
|
|
106
109
|
|
|
107
110
|
| Parameter | Type | Required | Description |
|
|
108
111
|
|-----------|------|----------|-------------|
|
|
109
112
|
| issueKey | string | ✓ | Issue key |
|
|
110
|
-
| maxResults | number | ✗ | Maximum number of comments |
|
|
111
113
|
| orderBy | string | ✗ | Sort order ("created" or "-created") |
|
|
112
114
|
|
|
115
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
116
|
+
|
|
113
117
|
---
|
|
114
118
|
|
|
115
119
|
### 8. jira_list_projects
|
|
@@ -134,7 +138,19 @@ This document provides a comprehensive reference of all available tools in the J
|
|
|
134
138
|
|
|
135
139
|
---
|
|
136
140
|
|
|
137
|
-
### 10.
|
|
141
|
+
### 10. jira_get_issue_types
|
|
142
|
+
**Description**: Get all available issue types in this Jira instance
|
|
143
|
+
**Use Cases**: Discover type names before filtering by type in JQL, find localized or custom type names
|
|
144
|
+
|
|
145
|
+
| Parameter | Type | Required | Description |
|
|
146
|
+
|-----------|------|----------|-------------|
|
|
147
|
+
| (none) | | | |
|
|
148
|
+
|
|
149
|
+
**Tip**: Use this tool FIRST when you need to filter by issue type but don't know exact names. Issue type names may be localized (e.g., "Épopée" instead of "Epic").
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### 11. jira_get_transitions
|
|
138
154
|
**Description**: Get available workflow transitions for an issue
|
|
139
155
|
**Use Cases**: Check what status changes are possible
|
|
140
156
|
|
|
@@ -144,7 +160,7 @@ This document provides a comprehensive reference of all available tools in the J
|
|
|
144
160
|
|
|
145
161
|
---
|
|
146
162
|
|
|
147
|
-
###
|
|
163
|
+
### 12. jira_link_issues
|
|
148
164
|
**Description**: Create a link between two issues
|
|
149
165
|
**Use Cases**: Mark blockers, relate issues, create dependencies
|
|
150
166
|
|
|
@@ -157,7 +173,7 @@ This document provides a comprehensive reference of all available tools in the J
|
|
|
157
173
|
|
|
158
174
|
---
|
|
159
175
|
|
|
160
|
-
###
|
|
176
|
+
### 13. jira_get_board
|
|
161
177
|
**Description**: Get Agile board information
|
|
162
178
|
**Use Cases**: View board details, get board configuration
|
|
163
179
|
|
|
@@ -167,8 +183,8 @@ This document provides a comprehensive reference of all available tools in the J
|
|
|
167
183
|
|
|
168
184
|
---
|
|
169
185
|
|
|
170
|
-
###
|
|
171
|
-
**Description**: List sprints for
|
|
186
|
+
### 14. jira_get_sprints
|
|
187
|
+
**Description**: List all sprints for a board
|
|
172
188
|
**Use Cases**: View active sprints, check sprint schedules
|
|
173
189
|
|
|
174
190
|
| Parameter | Type | Required | Description |
|
|
@@ -176,20 +192,23 @@ This document provides a comprehensive reference of all available tools in the J
|
|
|
176
192
|
| boardId | number | ✓ | Board ID |
|
|
177
193
|
| state | string | ✗ | Sprint state ("active", "future", "closed") |
|
|
178
194
|
|
|
195
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
196
|
+
|
|
179
197
|
---
|
|
180
198
|
|
|
181
|
-
###
|
|
182
|
-
**Description**: Get all issues in a sprint
|
|
199
|
+
### 15. jira_get_sprint_issues
|
|
200
|
+
**Description**: Get all issues in a specific sprint
|
|
183
201
|
**Use Cases**: View sprint backlog, check sprint progress
|
|
184
202
|
|
|
185
203
|
| Parameter | Type | Required | Description |
|
|
186
204
|
|-----------|------|----------|-------------|
|
|
187
205
|
| sprintId | number | ✓ | Sprint ID |
|
|
188
|
-
|
|
206
|
+
|
|
207
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
189
208
|
|
|
190
209
|
---
|
|
191
210
|
|
|
192
|
-
###
|
|
211
|
+
### 16. jira_get_issue_watchers
|
|
193
212
|
**Description**: Get list of watchers on an issue
|
|
194
213
|
**Use Cases**: See who's following an issue
|
|
195
214
|
|
|
@@ -199,102 +218,112 @@ This document provides a comprehensive reference of all available tools in the J
|
|
|
199
218
|
|
|
200
219
|
---
|
|
201
220
|
|
|
202
|
-
|
|
221
|
+
### 17. jira_get_issue_worklogs
|
|
222
|
+
**Description**: Retrieve all worklogs from a Jira issue
|
|
223
|
+
**Use Cases**: Analyze time logged against an issue, see worklog history
|
|
224
|
+
|
|
225
|
+
| Parameter | Type | Required | Description |
|
|
226
|
+
|-----------|------|----------|-------------|
|
|
227
|
+
| issueKey | string | ✓ | Issue key (e.g., PROJ-123) |
|
|
228
|
+
|
|
229
|
+
**Response includes**: `worklogCount`, `totalTimeSpentSeconds`, `totalTimeSpent`, `worklogs`
|
|
230
|
+
|
|
231
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
### 18. jira_get_total_worklogs
|
|
236
|
+
**Description**: Get total worklogs for an issue and all its children recursively
|
|
237
|
+
**Use Cases**: Get total time spent on an Epic including all stories and sub-tasks
|
|
238
|
+
|
|
239
|
+
| Parameter | Type | Required | Description |
|
|
240
|
+
|-----------|------|----------|-------------|
|
|
241
|
+
| issueKey | string | ✓ | Issue key (e.g., PROJ-123) |
|
|
242
|
+
|
|
243
|
+
**Response includes**: Breakdown by issue and grand total including:
|
|
244
|
+
- The specified issue
|
|
245
|
+
- All sub-tasks
|
|
246
|
+
- All issues in the Epic (if the issue is an Epic)
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Confluence Tools (17)
|
|
203
251
|
|
|
204
252
|
### 1. confluence_search_content
|
|
205
|
-
**Description**: Search Confluence content using CQL
|
|
253
|
+
**Description**: Search Confluence content using CQL. Auto-fetches all results (up to 5000).
|
|
206
254
|
**Use Cases**: Find pages, search by keyword, filter by space
|
|
207
255
|
|
|
208
256
|
| Parameter | Type | Required | Description |
|
|
209
257
|
|-----------|------|----------|-------------|
|
|
210
258
|
| cql | string | ✓ | CQL query string |
|
|
211
|
-
| limit | number | ✗ | Maximum results (default: 25) |
|
|
212
259
|
| expand | string[] | ✗ | Additional data to expand |
|
|
213
260
|
|
|
261
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
262
|
+
|
|
214
263
|
---
|
|
215
264
|
|
|
216
265
|
### 2. confluence_get_page
|
|
217
|
-
**Description**: Get a Confluence page by ID
|
|
218
|
-
**Use Cases**: Read page content,
|
|
266
|
+
**Description**: Get a Confluence page by ID (PREFERRED when you have page ID)
|
|
267
|
+
**Use Cases**: Read page content, prepare for editing
|
|
219
268
|
|
|
220
269
|
| Parameter | Type | Required | Description |
|
|
221
270
|
|-----------|------|----------|-------------|
|
|
222
|
-
| pageId | string | ✓ | Page ID |
|
|
223
|
-
| expand | string[] | ✗ | Additional data (e.g., "body.storage") |
|
|
224
|
-
|
|
225
|
-
|
|
271
|
+
| pageId | string | ✓ | Page ID (accepts string or number) |
|
|
272
|
+
| expand | string[] | ✗ | Additional data (e.g., "body.storage", "version") |
|
|
273
|
+
|
|
274
|
+
**Response includes**: `pageId`, `version`, `bufferId`, `contentSize`, metadata
|
|
226
275
|
|
|
227
|
-
**
|
|
276
|
+
**Usage**: Content is always stored in buffer with `contentType: "xhtml"`. Use `buffer_edit_xhtml` to modify (required for XHTML buffers), then `confluence_draft_create` for user review.
|
|
228
277
|
|
|
229
278
|
---
|
|
230
279
|
|
|
231
280
|
### 3. confluence_get_page_by_title
|
|
232
|
-
**Description**: Get a page by title and space
|
|
281
|
+
**Description**: Get a page by title and space (use ONLY when you don't have page ID)
|
|
233
282
|
**Use Cases**: Find page by name, access documentation
|
|
234
283
|
|
|
235
284
|
| Parameter | Type | Required | Description |
|
|
236
285
|
|-----------|------|----------|-------------|
|
|
237
|
-
| spaceKey | string | ✓ | Space key |
|
|
286
|
+
| spaceKey | string | ✓ | Space key (short code like 'MESH', 'TC'), NOT the full space name |
|
|
238
287
|
| title | string | ✓ | Page title |
|
|
239
288
|
| expand | string[] | ✗ | Additional data to expand |
|
|
240
|
-
| offset | number | ✗ | Character offset to start from (default: 0) |
|
|
241
|
-
| limit | number | ✗ | Maximum characters to return (default: 5000) |
|
|
242
289
|
|
|
243
|
-
**Response includes**: `
|
|
290
|
+
**Response includes**: `pageId`, `version`, `bufferId`, `contentSize`, metadata
|
|
244
291
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
### 4. confluence_create_page
|
|
248
|
-
**Description**: Create a new Confluence page
|
|
249
|
-
**Use Cases**: Add documentation, create meeting notes
|
|
250
|
-
|
|
251
|
-
| Parameter | Type | Required | Description |
|
|
252
|
-
|-----------|------|----------|-------------|
|
|
253
|
-
| spaceKey | string | ✓ | Space key |
|
|
254
|
-
| title | string | ✓ | Page title |
|
|
255
|
-
| content | string | ✓ | Page content (HTML/storage format) |
|
|
256
|
-
| parentId | string | ✗ | Parent page ID |
|
|
257
|
-
| labels | string[] | ✗ | Array of labels |
|
|
292
|
+
**Usage**: Content is always stored in buffer with `contentType: "xhtml"`. Use `buffer_edit_xhtml` to modify (required for XHTML buffers), then `confluence_draft_create` for user review.
|
|
258
293
|
|
|
259
294
|
---
|
|
260
295
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
| Parameter | Type | Required | Description |
|
|
266
|
-
|-----------|------|----------|-------------|
|
|
267
|
-
| pageId | string | ✓ | Page ID |
|
|
268
|
-
| title | string | ✗ | New title |
|
|
269
|
-
| content | string | ✗ | New content |
|
|
270
|
-
| version | number | ✓ | Current version (for locking) |
|
|
271
|
-
| minorEdit | boolean | ✗ | Is this a minor edit |
|
|
296
|
+
> **Note**: All page content changes go through the draft workflow.
|
|
297
|
+
> AI creates/edits drafts; user publishes manually via Confluence UI:
|
|
298
|
+
> - New pages: `confluence_draft_create` → user review → user publishes
|
|
299
|
+
> - Existing pages: `confluence_get_page` → edit → `confluence_draft_create` → user review → user publishes
|
|
272
300
|
|
|
273
301
|
---
|
|
274
302
|
|
|
275
|
-
###
|
|
303
|
+
### 4. confluence_delete_page
|
|
276
304
|
**Description**: Delete a Confluence page
|
|
277
305
|
**Use Cases**: Remove outdated content
|
|
278
306
|
|
|
279
307
|
| Parameter | Type | Required | Description |
|
|
280
308
|
|-----------|------|----------|-------------|
|
|
281
|
-
| pageId | string | ✓ | Page ID |
|
|
309
|
+
| pageId | string | ✓ | Page ID (accepts string or number) |
|
|
282
310
|
|
|
283
311
|
---
|
|
284
312
|
|
|
285
|
-
###
|
|
286
|
-
**Description**: List all accessible spaces
|
|
313
|
+
### 5. confluence_list_spaces
|
|
314
|
+
**Description**: List all accessible Confluence spaces
|
|
287
315
|
**Use Cases**: Discover available spaces, get space keys
|
|
288
316
|
|
|
289
317
|
| Parameter | Type | Required | Description |
|
|
290
318
|
|-----------|------|----------|-------------|
|
|
291
|
-
|
|
|
292
|
-
|
|
319
|
+
| type | string | ✗ | Space type filter ("global" or "personal") |
|
|
320
|
+
|
|
321
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
293
322
|
|
|
294
323
|
---
|
|
295
324
|
|
|
296
|
-
###
|
|
297
|
-
**Description**: Get detailed space
|
|
325
|
+
### 6. confluence_get_space
|
|
326
|
+
**Description**: Get detailed information about a space
|
|
298
327
|
**Use Cases**: View space details, get homepage
|
|
299
328
|
|
|
300
329
|
| Parameter | Type | Required | Description |
|
|
@@ -304,60 +333,152 @@ This document provides a comprehensive reference of all available tools in the J
|
|
|
304
333
|
|
|
305
334
|
---
|
|
306
335
|
|
|
307
|
-
###
|
|
308
|
-
**Description**: Get child pages of a page
|
|
336
|
+
### 7. confluence_get_page_children
|
|
337
|
+
**Description**: Get all child pages of a page
|
|
309
338
|
**Use Cases**: Navigate page hierarchy, list subpages
|
|
310
339
|
|
|
311
340
|
| Parameter | Type | Required | Description |
|
|
312
341
|
|-----------|------|----------|-------------|
|
|
313
|
-
| pageId | string | ✓ | Parent page ID |
|
|
342
|
+
| pageId | string | ✓ | Parent page ID (accepts string or number) |
|
|
314
343
|
| expand | string[] | ✗ | Additional data to expand |
|
|
315
|
-
|
|
344
|
+
|
|
345
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
316
346
|
|
|
317
347
|
---
|
|
318
348
|
|
|
319
|
-
###
|
|
320
|
-
**Description**: Add a comment to a page
|
|
349
|
+
### 8. confluence_add_comment
|
|
350
|
+
**Description**: Add a comment to a Confluence page
|
|
321
351
|
**Use Cases**: Provide feedback, ask questions
|
|
322
352
|
|
|
323
353
|
| Parameter | Type | Required | Description |
|
|
324
354
|
|-----------|------|----------|-------------|
|
|
325
|
-
| pageId | string | ✓ | Page ID |
|
|
326
|
-
| comment | string | ✓ | Comment text (HTML) |
|
|
355
|
+
| pageId | string | ✓ | Page ID (accepts string or number) |
|
|
356
|
+
| comment | string | ✓ | Comment text (HTML format) |
|
|
327
357
|
|
|
328
358
|
---
|
|
329
359
|
|
|
330
|
-
###
|
|
331
|
-
**Description**: Get comments on a page
|
|
360
|
+
### 9. confluence_get_comments
|
|
361
|
+
**Description**: Get all comments on a Confluence page
|
|
332
362
|
**Use Cases**: Read feedback, review discussions
|
|
333
363
|
|
|
334
364
|
| Parameter | Type | Required | Description |
|
|
335
365
|
|-----------|------|----------|-------------|
|
|
336
|
-
| pageId | string | ✓ | Page ID |
|
|
337
|
-
|
|
366
|
+
| pageId | string | ✓ | Page ID (accepts string or number) |
|
|
367
|
+
|
|
368
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
338
369
|
|
|
339
370
|
---
|
|
340
371
|
|
|
341
|
-
###
|
|
342
|
-
**Description**: Upload
|
|
372
|
+
### 10. confluence_upload_attachment
|
|
373
|
+
**Description**: Upload an attachment to a Confluence page
|
|
343
374
|
**Use Cases**: Attach documents, upload images
|
|
344
375
|
|
|
345
376
|
| Parameter | Type | Required | Description |
|
|
346
377
|
|-----------|------|----------|-------------|
|
|
347
|
-
| pageId | string | ✓ | Page ID |
|
|
378
|
+
| pageId | string | ✓ | Page ID (accepts string or number) |
|
|
348
379
|
| filePath | string | ✓ | Local file path |
|
|
349
380
|
| comment | string | ✗ | Attachment comment |
|
|
350
381
|
|
|
351
382
|
---
|
|
352
383
|
|
|
353
|
-
###
|
|
354
|
-
**Description**: List attachments on a page
|
|
384
|
+
### 11. confluence_list_attachments
|
|
385
|
+
**Description**: List all attachments on a Confluence page
|
|
355
386
|
**Use Cases**: View uploaded files, check attachments
|
|
356
387
|
|
|
357
388
|
| Parameter | Type | Required | Description |
|
|
358
389
|
|-----------|------|----------|-------------|
|
|
359
|
-
| pageId | string | ✓ | Page ID |
|
|
360
|
-
|
|
390
|
+
| pageId | string | ✓ | Page ID (accepts string or number) |
|
|
391
|
+
|
|
392
|
+
Large responses are automatically buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
### 12. confluence_get_current_user_space
|
|
397
|
+
**Description**: Get the current user's personal Confluence space
|
|
398
|
+
**Use Cases**: Verify personal space before write operations, check space key for write-home restriction
|
|
399
|
+
|
|
400
|
+
| Parameter | Type | Required | Description |
|
|
401
|
+
|-----------|------|----------|-------------|
|
|
402
|
+
| (none) | | | |
|
|
403
|
+
|
|
404
|
+
**Response includes**: `spaceKey`, `spaceName`, `spaceType`, `homePageId`, `homePageTitle`
|
|
405
|
+
|
|
406
|
+
**Tip**: Use this to find your personal space key when write-home restriction is enabled.
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
### 13. confluence_draft_list
|
|
411
|
+
**Description**: List user's draft pages
|
|
412
|
+
**Use Cases**: View pending drafts, find drafts to continue editing
|
|
413
|
+
|
|
414
|
+
| Parameter | Type | Required | Description |
|
|
415
|
+
|-----------|------|----------|-------------|
|
|
416
|
+
| spaceKey | string | ✗ | Filter by space key |
|
|
417
|
+
| limit | number | ✗ | Maximum results (default: 25) |
|
|
418
|
+
|
|
419
|
+
**Response includes**: `drafts` array with `draftId`, `title`, `spaceKey`, `spaceName`, `created`, `url`
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
### 14. confluence_draft_open
|
|
424
|
+
**Description**: Load existing draft into buffer for editing
|
|
425
|
+
**Use Cases**: Continue editing a draft, prepare draft for publishing
|
|
426
|
+
|
|
427
|
+
| Parameter | Type | Required | Description |
|
|
428
|
+
|-----------|------|----------|-------------|
|
|
429
|
+
| draftId | string | ✓ | Draft page ID |
|
|
430
|
+
|
|
431
|
+
**Response includes**: `draftId`, `bufferId`, `title`, `spaceKey`, `version`, `url`, `contentPreview`
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
### 15. confluence_draft_create
|
|
436
|
+
**Description**: Create a new server-side draft with local buffer
|
|
437
|
+
**Use Cases**: Start new page as draft, iterative content development
|
|
438
|
+
|
|
439
|
+
| Parameter | Type | Required | Description |
|
|
440
|
+
|-----------|------|----------|-------------|
|
|
441
|
+
| spaceKey | string | ✓ | Space key |
|
|
442
|
+
| title | string | ✓ | Draft title |
|
|
443
|
+
| content | string | ✓ | Initial content (storage format) |
|
|
444
|
+
| parentId | string | ✗ | Parent page ID |
|
|
445
|
+
| labels | string[] | ✗ | Array of labels |
|
|
446
|
+
|
|
447
|
+
**Response includes**: `draftId`, `bufferId`, `title`, `spaceKey`, `version`, `url` (clickable to preview)
|
|
448
|
+
|
|
449
|
+
**PlantUML**: Raw @startuml blocks are not supported. Use `buffer_edit_xhtml` with `insert-plantuml` operation.
|
|
450
|
+
|
|
451
|
+
**Workflow**: Create draft → Click URL to preview → Use `buffer_edit_xhtml` to modify (required for XHTML buffers) → Use `confluence_draft_save` to checkpoint
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
### 16. confluence_draft_save
|
|
456
|
+
**Description**: Save buffer content to draft (delete + recreate pattern)
|
|
457
|
+
**Use Cases**: Checkpoint work, persist edits before publishing
|
|
458
|
+
|
|
459
|
+
| Parameter | Type | Required | Description |
|
|
460
|
+
|-----------|------|----------|-------------|
|
|
461
|
+
| draftId | string | ✓ | Existing draft ID (will be deleted) |
|
|
462
|
+
| bufferId | string | ✓ | Buffer ID with content to save |
|
|
463
|
+
| title | string | ✗ | Optional new title |
|
|
464
|
+
|
|
465
|
+
**PlantUML**: Raw @startuml blocks are not supported. Use `buffer_edit_xhtml` with `insert-plantuml` operation.
|
|
466
|
+
|
|
467
|
+
**Note**: Due to Confluence API limitations, drafts cannot be updated. This tool deletes the old draft and creates a new one with updated content.
|
|
468
|
+
|
|
469
|
+
**Response includes**: `previousDraftId`, `newDraftId`, `bufferId`, `title`, `url` (new clickable URL)
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
### 17. confluence_draft_delete
|
|
474
|
+
**Description**: Permanently delete a draft
|
|
475
|
+
**Use Cases**: Clean up abandoned drafts, remove unwanted content
|
|
476
|
+
|
|
477
|
+
| Parameter | Type | Required | Description |
|
|
478
|
+
|-----------|------|----------|-------------|
|
|
479
|
+
| draftId | string | ✓ | Draft ID to delete |
|
|
480
|
+
|
|
481
|
+
**Response includes**: `deleted`, `draftId`, `message`
|
|
361
482
|
|
|
362
483
|
---
|
|
363
484
|
|
|
@@ -421,10 +542,13 @@ AND lastModified >= now("-30d")
|
|
|
421
542
|
|
|
422
543
|
### Workflow 3: Documentation Update
|
|
423
544
|
1. `confluence_search_content` - Find existing page
|
|
424
|
-
2. `confluence_get_page` - Read current content
|
|
425
|
-
3. `
|
|
426
|
-
4. `
|
|
427
|
-
5.
|
|
545
|
+
2. `confluence_get_page` - Read current content (returns bufferId with `contentType: "xhtml"`)
|
|
546
|
+
3. `buffer_edit_xhtml` - Modify content locally (required for XHTML buffers)
|
|
547
|
+
4. `confluence_draft_create` - Create draft for user review
|
|
548
|
+
5. User reviews draft at URL
|
|
549
|
+
6. User publishes via Confluence UI (click "Publish" button)
|
|
550
|
+
7. `confluence_add_comment` - Note changes
|
|
551
|
+
8. `confluence_upload_attachment` - Add supporting files
|
|
428
552
|
|
|
429
553
|
### Workflow 4: Issue Investigation
|
|
430
554
|
1. `jira_get_issue` - Get issue details
|
|
@@ -434,6 +558,14 @@ AND lastModified >= now("-30d")
|
|
|
434
558
|
5. `jira_add_comment` - Document findings
|
|
435
559
|
6. `jira_link_issues` - Link related issues
|
|
436
560
|
|
|
561
|
+
### Workflow 5: Create Page via Draft
|
|
562
|
+
1. `confluence_draft_create` - Create draft + buffer (with `contentType: "xhtml"`), get preview URL
|
|
563
|
+
2. Click URL to preview draft in browser
|
|
564
|
+
3. `buffer_edit_xhtml` - Modify content locally (required for XHTML buffers)
|
|
565
|
+
4. `confluence_draft_save` - Checkpoint changes, get new URL
|
|
566
|
+
5. Repeat steps 2-4 as needed
|
|
567
|
+
6. User publishes via Confluence UI (click "Publish" button)
|
|
568
|
+
|
|
437
569
|
## Tool Selection Guide
|
|
438
570
|
|
|
439
571
|
### When to use Jira tools:
|
|
@@ -452,23 +584,21 @@ AND lastModified >= now("-30d")
|
|
|
452
584
|
|
|
453
585
|
---
|
|
454
586
|
|
|
455
|
-
## Tempo Tools (
|
|
587
|
+
## Tempo Tools (12)
|
|
456
588
|
|
|
457
589
|
### 1. tempo_get_worklogs
|
|
458
|
-
**Description**: Get
|
|
590
|
+
**Description**: Get Tempo worklogs with filters
|
|
459
591
|
**Use Cases**: View time entries, generate reports, review team work
|
|
460
592
|
|
|
461
593
|
| Parameter | Type | Required | Description |
|
|
462
594
|
|-----------|------|----------|-------------|
|
|
463
595
|
| dateFrom | string | ✗ | Start date (YYYY-MM-DD) |
|
|
464
596
|
| dateTo | string | ✗ | End date (YYYY-MM-DD) |
|
|
465
|
-
| projectKey | string | ✗ | Filter by project key |
|
|
466
|
-
| issueKey | string | ✗ | Filter by issue key |
|
|
467
|
-
| workerKey | string | ✗ | Filter by worker username |
|
|
468
|
-
| offset | number | ✗ | Character offset to start from (default: 0) |
|
|
469
|
-
| limit | number | ✗ | Maximum characters to return (default: 5000) |
|
|
597
|
+
| projectKey | string | ✗ | Filter by project key (e.g., PROJ) |
|
|
598
|
+
| issueKey | string | ✗ | Filter by issue key (e.g., PROJ-123) |
|
|
599
|
+
| workerKey | string | ✗ | Filter by worker username (get from tempo_get_user_info). Leave empty for ALL worklogs. |
|
|
470
600
|
|
|
471
|
-
**
|
|
601
|
+
**WARNING**: No workerKey = returns ALL worklogs. Large responses are buffered.
|
|
472
602
|
|
|
473
603
|
---
|
|
474
604
|
|
|
@@ -561,7 +691,7 @@ AND lastModified >= now("-30d")
|
|
|
561
691
|
---
|
|
562
692
|
|
|
563
693
|
### 10. tempo_get_team_worklogs
|
|
564
|
-
**Description**: Get all worklogs for a team
|
|
694
|
+
**Description**: Get all worklogs for a team within a date range
|
|
565
695
|
**Use Cases**: Team capacity reports, sprint reviews
|
|
566
696
|
|
|
567
697
|
| Parameter | Type | Required | Description |
|
|
@@ -569,30 +699,69 @@ AND lastModified >= now("-30d")
|
|
|
569
699
|
| teamId | number | ✓ | Team ID |
|
|
570
700
|
| dateFrom | string | ✓ | Start date (YYYY-MM-DD) |
|
|
571
701
|
| dateTo | string | ✓ | End date (YYYY-MM-DD) |
|
|
572
|
-
| offset | number | ✗ | Character offset to start from (default: 0) |
|
|
573
|
-
| limit | number | ✗ | Maximum characters to return (default: 5000) |
|
|
574
702
|
|
|
575
|
-
|
|
703
|
+
Large responses are buffered - use `buffer_get_chunk` or `buffer_grep` to access.
|
|
576
704
|
|
|
577
705
|
---
|
|
578
706
|
|
|
579
707
|
### 11. tempo_get_user_info
|
|
580
|
-
**Description**: Get current user
|
|
708
|
+
**Description**: Get current user info (workerKey, accountId, displayName)
|
|
581
709
|
**Use Cases**: Get workerKey for filtering worklogs, verify authentication
|
|
582
710
|
|
|
583
711
|
| Parameter | Type | Required | Description |
|
|
584
712
|
|-----------|------|----------|-------------|
|
|
585
713
|
| (none) | | | |
|
|
586
714
|
|
|
715
|
+
**Tip**: Use the `workerKey` value in `tempo_get_worklogs` to filter by user.
|
|
716
|
+
|
|
587
717
|
---
|
|
588
718
|
|
|
589
|
-
|
|
719
|
+
### 12. tempo_get_epic_worklogs
|
|
720
|
+
**Description**: Get all worklogs for an Epic and its child issues in one API call
|
|
721
|
+
**Use Cases**: Epic time tracking, aggregate time reports, sprint cost analysis
|
|
590
722
|
|
|
591
|
-
|
|
723
|
+
| Parameter | Type | Required | Description |
|
|
724
|
+
|-----------|------|----------|-------------|
|
|
725
|
+
| epicKey | string | ✓ | Epic issue key (e.g., PROJ-100) |
|
|
726
|
+
| dateFrom | string | ✗ | Start date filter (YYYY-MM-DD) |
|
|
727
|
+
| dateTo | string | ✗ | End date filter (YYYY-MM-DD) |
|
|
592
728
|
|
|
593
|
-
|
|
729
|
+
**Response includes**: `totalTimeSpent`, `totalWorklogCount`, `issueCount`, breakdown by issue, and full worklog list.
|
|
730
|
+
|
|
731
|
+
More efficient than `jira_get_total_worklogs` for Tempo instances. Large responses are buffered.
|
|
732
|
+
|
|
733
|
+
---
|
|
734
|
+
|
|
735
|
+
## Buffer Tools (9)
|
|
736
|
+
|
|
737
|
+
Buffer tools are used for local content management. All buffer operations are in-memory - write enforcement is on Jira/Confluence/Tempo tools.
|
|
738
|
+
|
|
739
|
+
**XHTML Tools**: `buffer_edit_xhtml` and `buffer_validate_xhtml` provide structure-aware editing and validation for Confluence storage format content. XHTML validation is also automatically applied before any Confluence write operation.
|
|
740
|
+
|
|
741
|
+
### 1. buffer_create
|
|
742
|
+
**Description**: Create a new buffer with initial content
|
|
743
|
+
**Use Cases**: Draft new Confluence pages, prepare content before persisting
|
|
744
|
+
|
|
745
|
+
| Parameter | Type | Required | Description |
|
|
746
|
+
|-----------|------|----------|-------------|
|
|
747
|
+
| content | string | ✓ | Initial content for the buffer |
|
|
748
|
+
| metadata | object | ✗ | Optional metadata to attach to the buffer |
|
|
749
|
+
|
|
750
|
+
**Response includes**: `bufferId`, `totalSize`, `createdAt`, `expiresAt`, `metadata`, `message`
|
|
751
|
+
|
|
752
|
+
**Example workflow for new page**:
|
|
753
|
+
```typescript
|
|
754
|
+
// 1. buffer_create({ content: "<h1>Title</h1><p></p>" }) -> returns bufferId
|
|
755
|
+
// 2. buffer_edit({ bufferId, old_string: "<p></p>", new_string: "<p>Content</p>" })
|
|
756
|
+
// 3. confluence_draft_create({ spaceKey, title, bufferId }) -> user reviews at URL
|
|
757
|
+
// 4. User publishes via Confluence UI (click "Publish" button)
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
---
|
|
761
|
+
|
|
762
|
+
### 2. buffer_get_chunk
|
|
594
763
|
**Description**: Retrieve a chunk of buffered content by buffer ID
|
|
595
|
-
**Use Cases**: Get remaining content from large responses
|
|
764
|
+
**Use Cases**: Get remaining content from large responses, retrieve edited content
|
|
596
765
|
|
|
597
766
|
| Parameter | Type | Required | Description |
|
|
598
767
|
|-----------|------|----------|-------------|
|
|
@@ -602,16 +771,9 @@ Buffer tools are used to retrieve content from buffered responses. When tools li
|
|
|
602
771
|
|
|
603
772
|
**Response includes**: `bufferId`, `content`, `offset`, `limit`, `totalSize`, `hasMore`, `metadata`
|
|
604
773
|
|
|
605
|
-
**Example workflow**:
|
|
606
|
-
```typescript
|
|
607
|
-
// 1. Call confluence_get_page -> returns bufferId, first chunk, hasMore: true
|
|
608
|
-
// 2. Call buffer_get_chunk(bufferId, offset: 5000) -> returns next chunk
|
|
609
|
-
// 3. Repeat until hasMore: false
|
|
610
|
-
```
|
|
611
|
-
|
|
612
774
|
---
|
|
613
775
|
|
|
614
|
-
###
|
|
776
|
+
### 3. buffer_list
|
|
615
777
|
**Description**: List all active buffers with their metadata
|
|
616
778
|
**Use Cases**: View active buffers, check expiration times
|
|
617
779
|
|
|
@@ -623,7 +785,7 @@ Buffer tools are used to retrieve content from buffered responses. When tools li
|
|
|
623
785
|
|
|
624
786
|
---
|
|
625
787
|
|
|
626
|
-
###
|
|
788
|
+
### 4. buffer_clear
|
|
627
789
|
**Description**: Clear a specific buffer or all buffers
|
|
628
790
|
**Use Cases**: Free up memory, clean up after processing
|
|
629
791
|
|
|
@@ -632,3 +794,531 @@ Buffer tools are used to retrieve content from buffered responses. When tools li
|
|
|
632
794
|
| bufferId | string | ✗ | Buffer ID to clear, or omit to clear all buffers |
|
|
633
795
|
|
|
634
796
|
**Response includes**: `message`, `cleared` (count of buffers cleared)
|
|
797
|
+
|
|
798
|
+
---
|
|
799
|
+
|
|
800
|
+
### 5. buffer_grep
|
|
801
|
+
**Description**: Search buffered content for patterns (regex supported)
|
|
802
|
+
**Use Cases**: Find specific content in large responses, locate text for editing
|
|
803
|
+
|
|
804
|
+
| Parameter | Type | Required | Description |
|
|
805
|
+
|-----------|------|----------|-------------|
|
|
806
|
+
| bufferId | string | ✓ | Buffer ID to search |
|
|
807
|
+
| pattern | string | ✓ | Regex pattern to search for |
|
|
808
|
+
| -A | number | ✗ | Lines to show after each match |
|
|
809
|
+
| -B | number | ✗ | Lines to show before each match |
|
|
810
|
+
| -C | number | ✗ | Lines to show before AND after |
|
|
811
|
+
| -i | boolean | ✗ | Case insensitive search |
|
|
812
|
+
| -n | boolean | ✗ | Show line numbers (default: true) |
|
|
813
|
+
| output_mode | string | ✗ | "content" or "count" |
|
|
814
|
+
|
|
815
|
+
**Response includes**: `totalMatches`, `matches` with line numbers and context
|
|
816
|
+
|
|
817
|
+
---
|
|
818
|
+
|
|
819
|
+
### 6. buffer_edit
|
|
820
|
+
**Description**: Exact string replacement in buffered content
|
|
821
|
+
**Use Cases**: Modify Jira/Tempo content, fix text in non-XHTML buffers
|
|
822
|
+
|
|
823
|
+
| Parameter | Type | Required | Description |
|
|
824
|
+
|-----------|------|----------|-------------|
|
|
825
|
+
| bufferId | string | ✓ | Buffer ID to modify |
|
|
826
|
+
| old_string | string | ✓ | Exact text to replace |
|
|
827
|
+
| new_string | string | ✓ | Replacement text |
|
|
828
|
+
| replace_all | boolean | ✗ | Replace all occurrences (default: false) |
|
|
829
|
+
|
|
830
|
+
**⚠️ XHTML Buffers Blocked**: This tool is **blocked** for Confluence content (`contentType: "xhtml"`). Use `buffer_edit_xhtml` instead for XHTML buffers.
|
|
831
|
+
|
|
832
|
+
**Note**: Fails if old_string is not unique (unless replace_all=true). Changes are in-memory only - call update API to persist.
|
|
833
|
+
|
|
834
|
+
**Response includes**: `success`, `replacements`, `oldSize`, `newSize`
|
|
835
|
+
|
|
836
|
+
---
|
|
837
|
+
|
|
838
|
+
### 7. buffer_edit_xhtml
|
|
839
|
+
**Description**: Structure-aware XHTML editing for Confluence storage format
|
|
840
|
+
**Use Cases**: Add table rows, insert PlantUML diagrams, update macros, manipulate page structure
|
|
841
|
+
|
|
842
|
+
| Parameter | Type | Required | Description |
|
|
843
|
+
|-----------|------|----------|-------------|
|
|
844
|
+
| bufferId | string | ✓ | Buffer ID containing XHTML content |
|
|
845
|
+
| operation | string | ✓ | Operation: insert, insert-plantuml, update, update-plantuml, remove, move, wrap |
|
|
846
|
+
| selector | string | ✓ | CSS-like selector for target element(s) |
|
|
847
|
+
| position | string | insert/move | Position: before, after, inside-start, inside-end |
|
|
848
|
+
| content | string | insert/update/wrap | XHTML content for the operation |
|
|
849
|
+
| plantuml | string | plantuml ops | Raw PlantUML code (auto-wrapped and validated) |
|
|
850
|
+
| macroId | string | ✗ | Custom macro ID for PlantUML |
|
|
851
|
+
| attributes | object | update | Attributes to set on element |
|
|
852
|
+
| targetSelector | string | move | Target element for move operation |
|
|
853
|
+
| matchIndex | number | ✗ | Operate on Nth match (0-based) |
|
|
854
|
+
| matchAll | boolean | ✗ | Apply to all matches (default: false) |
|
|
855
|
+
| validate | boolean | ✗ | Validate result (default: true) |
|
|
856
|
+
|
|
857
|
+
**Selector Syntax**:
|
|
858
|
+
- Tag name: `p`, `table`, `h2`
|
|
859
|
+
- Namespaced: `ac:structured-macro`, `ri:page`
|
|
860
|
+
- Attribute: `[ac:name="plantuml"]`, `ac:structured-macro[ac:name="code"]`
|
|
861
|
+
- Descendant: `table tbody tr`
|
|
862
|
+
- Direct child: `ul > li`
|
|
863
|
+
|
|
864
|
+
**Example - Add table row**:
|
|
865
|
+
```typescript
|
|
866
|
+
buffer_edit_xhtml({
|
|
867
|
+
bufferId: "buf_xxx",
|
|
868
|
+
operation: "insert",
|
|
869
|
+
selector: "table tbody tr",
|
|
870
|
+
matchIndex: -1, // Last row
|
|
871
|
+
position: "after",
|
|
872
|
+
content: "<tr><td>New Cell</td></tr>"
|
|
873
|
+
})
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
**Example - Insert PlantUML diagram**:
|
|
877
|
+
```typescript
|
|
878
|
+
buffer_edit_xhtml({
|
|
879
|
+
bufferId: "buf_xxx",
|
|
880
|
+
operation: "insert-plantuml",
|
|
881
|
+
selector: "h2",
|
|
882
|
+
matchIndex: 0,
|
|
883
|
+
position: "after",
|
|
884
|
+
plantuml: "class User { +name: string }"
|
|
885
|
+
})
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
---
|
|
889
|
+
|
|
890
|
+
### 8. buffer_validate_xhtml
|
|
891
|
+
**Description**: Validate buffered content as Confluence storage format (XHTML)
|
|
892
|
+
**Use Cases**: Check content validity before writing, debug validation errors
|
|
893
|
+
|
|
894
|
+
| Parameter | Type | Required | Description |
|
|
895
|
+
|-----------|------|----------|-------------|
|
|
896
|
+
| bufferId | string | ✓ | Buffer ID containing XHTML content |
|
|
897
|
+
|
|
898
|
+
**Validation Checks**:
|
|
899
|
+
- XML well-formedness (balanced tags, proper nesting)
|
|
900
|
+
- Required attributes on Confluence elements (ac:name, ri:space-key, etc.)
|
|
901
|
+
- Valid layout section types (single, two_equal, etc.)
|
|
902
|
+
- Known macro names (warns for unknown macros)
|
|
903
|
+
|
|
904
|
+
**Response includes**: `valid`, `errorCount`, `warningCount`, `errors`, `warnings`
|
|
905
|
+
|
|
906
|
+
**Note**: XHTML validation is automatically applied before Confluence write operations (`confluence_draft_create`, `confluence_draft_save`).
|
|
907
|
+
|
|
908
|
+
---
|
|
909
|
+
|
|
910
|
+
### 9. buffer_save_to_file
|
|
911
|
+
**Description**: Save buffer content to a file within the project directory
|
|
912
|
+
**Use Cases**: Export rendered PlantUML diagrams (PNG/EPS), save edited content locally
|
|
913
|
+
|
|
914
|
+
| Parameter | Type | Required | Description |
|
|
915
|
+
|-----------|------|----------|-------------|
|
|
916
|
+
| bufferId | string | ✓ | Buffer ID containing content to save |
|
|
917
|
+
| outputPath | string | ✓ | Output file path (must be within project directory) |
|
|
918
|
+
| decodeBase64 | boolean | ✗ | Decode base64 content before saving (auto-detected for PNG/EPS) |
|
|
919
|
+
|
|
920
|
+
**Security**: Files can only be saved within the project directory (must contain `.jicon.json`).
|
|
921
|
+
|
|
922
|
+
**Binary Content**: Base64-encoded content (e.g., from `plantuml_render` with PNG/EPS format) is automatically decoded when `decodeBase64` is true or when the output path ends with `.png` or `.eps`.
|
|
923
|
+
|
|
924
|
+
**Response includes**: `success`, `path`, `size`, `message`
|
|
925
|
+
|
|
926
|
+
**Example - Save PlantUML render**:
|
|
927
|
+
```typescript
|
|
928
|
+
// 1. Render diagram to PNG
|
|
929
|
+
const result = plantuml_render({
|
|
930
|
+
code: "@startuml\nA -> B\n@enduml",
|
|
931
|
+
format: "png"
|
|
932
|
+
})
|
|
933
|
+
// Returns: { bufferId: "buf_xxx", ... }
|
|
934
|
+
|
|
935
|
+
// 2. Save to file
|
|
936
|
+
buffer_save_to_file({
|
|
937
|
+
bufferId: "buf_xxx",
|
|
938
|
+
outputPath: "./diagrams/sequence.png"
|
|
939
|
+
})
|
|
940
|
+
```
|
|
941
|
+
|
|
942
|
+
---
|
|
943
|
+
|
|
944
|
+
## Workload Tools (2)
|
|
945
|
+
|
|
946
|
+
Utility tools for time calculations. Always available with any Jira, Confluence, or Tempo action.
|
|
947
|
+
|
|
948
|
+
### 1. workload_convert
|
|
949
|
+
**Description**: Convert workload time between units (seconds, hours, days)
|
|
950
|
+
**Use Cases**: Convert time values for display, calculate work estimates
|
|
951
|
+
|
|
952
|
+
| Parameter | Type | Required | Description |
|
|
953
|
+
|-----------|------|----------|-------------|
|
|
954
|
+
| value | number | ✓ | Time value to convert |
|
|
955
|
+
| unit | string | ✓ | Source unit ("seconds", "hours", or "days") |
|
|
956
|
+
| hoursPerDay | number | ✗ | Hours per workday (default: 8) |
|
|
957
|
+
|
|
958
|
+
**Response includes**: Equivalent values in all units with formatted string
|
|
959
|
+
|
|
960
|
+
---
|
|
961
|
+
|
|
962
|
+
### 2. workload_sum
|
|
963
|
+
**Description**: Sum multiple workload values and return total in all units
|
|
964
|
+
**Use Cases**: Calculate total time from multiple entries, aggregate worklogs
|
|
965
|
+
|
|
966
|
+
| Parameter | Type | Required | Description |
|
|
967
|
+
|-----------|------|----------|-------------|
|
|
968
|
+
| values | array | ✓ | Array of { value: number, unit: string } |
|
|
969
|
+
| hoursPerDay | number | ✗ | Hours per workday (default: 8) |
|
|
970
|
+
|
|
971
|
+
**Response includes**: Total in seconds, hours, days, and formatted string
|
|
972
|
+
|
|
973
|
+
---
|
|
974
|
+
|
|
975
|
+
## URL Tools (1)
|
|
976
|
+
|
|
977
|
+
Utility tools for URL construction. Always available with any Jira, Confluence, or Tempo action.
|
|
978
|
+
|
|
979
|
+
### 1. fullurl
|
|
980
|
+
**Description**: Convert Jira issue keys, Confluence page IDs, or relative paths into full URLs
|
|
981
|
+
**Use Cases**: Generate clickable links for display, resolve relative Confluence paths
|
|
982
|
+
|
|
983
|
+
**Important**: For local rendering only. Do NOT write resolved full URLs back to Jira/Confluence. Keep relative links in published data to maintain portability.
|
|
984
|
+
|
|
985
|
+
| Parameter | Type | Required | Description |
|
|
986
|
+
|-----------|------|----------|-------------|
|
|
987
|
+
| input | string | ✓ | Jira issue key, Confluence page ID, or relative path |
|
|
988
|
+
|
|
989
|
+
**Auto-detection logic**:
|
|
990
|
+
| Input Pattern | Detected Type | Output |
|
|
991
|
+
|---------------|---------------|--------|
|
|
992
|
+
| `PROJ-123` | jira_issue | `{JIRA_URL}/browse/PROJ-123` |
|
|
993
|
+
| `123456` (numeric) | confluence_page_id | `{CONFLUENCE_URL}/pages/viewpage.action?pageId=123456` |
|
|
994
|
+
| `/display/...` | confluence_path | `{CONFLUENCE_URL}/display/...` |
|
|
995
|
+
| `https://...` | full_url | Passthrough (unchanged) |
|
|
996
|
+
|
|
997
|
+
**Response includes**: `input`, `detectedType`, `service`, `url`
|
|
998
|
+
|
|
999
|
+
**Examples**:
|
|
1000
|
+
```typescript
|
|
1001
|
+
fullurl("PROJ-123") // → https://jira.example.com/browse/PROJ-123
|
|
1002
|
+
fullurl("123456") // → https://confluence.example.com/pages/viewpage.action?pageId=123456
|
|
1003
|
+
fullurl("/display/DOCS/Home") // → https://confluence.example.com/display/DOCS/Home
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
---
|
|
1007
|
+
|
|
1008
|
+
## Jicon Help Tools (1)
|
|
1009
|
+
|
|
1010
|
+
Unified help system for all Jicon workflows and syntax guides. Always available with any Jira, Confluence, or Tempo action.
|
|
1011
|
+
|
|
1012
|
+
### 1. help
|
|
1013
|
+
**Description**: Get Jicon MCP Server help - workflows and syntax guides
|
|
1014
|
+
**Use Cases**: Learn workflows, understand tool sequences, get syntax references
|
|
1015
|
+
|
|
1016
|
+
| Parameter | Type | Required | Description |
|
|
1017
|
+
|-----------|------|----------|-------------|
|
|
1018
|
+
| topic | string | ✗ | Topic for detailed help: jql, cql, storage, plantuml |
|
|
1019
|
+
|
|
1020
|
+
**Default (no topic)**: Compact workflow guide with decision trees showing:
|
|
1021
|
+
- Confluence workflows (create page, update page, draft workflow, search)
|
|
1022
|
+
- Jira workflows (search issues, create issue, worklogs)
|
|
1023
|
+
- Tempo workflows (log work, get worklogs)
|
|
1024
|
+
- Buffer patterns for large responses and editing
|
|
1025
|
+
- Utility tools (fullurl, workload_convert)
|
|
1026
|
+
- Decision tree for when to call each topic
|
|
1027
|
+
|
|
1028
|
+
**Available Topics**:
|
|
1029
|
+
|
|
1030
|
+
| Topic | Description |
|
|
1031
|
+
|-------|-------------|
|
|
1032
|
+
| `jql` | JQL syntax guide - operators, functions, examples |
|
|
1033
|
+
| `cql` | CQL syntax guide - search operators, date functions |
|
|
1034
|
+
| `storage` | Confluence storage format + structure editing (buffer_edit_xhtml) |
|
|
1035
|
+
| `plantuml` | PlantUML syntax for Confluence diagrams |
|
|
1036
|
+
|
|
1037
|
+
**Examples**:
|
|
1038
|
+
```typescript
|
|
1039
|
+
help() // Get workflow overview and decision tree
|
|
1040
|
+
help(topic="jql") // JQL syntax guide
|
|
1041
|
+
help(topic="storage") // Basic Confluence formatting
|
|
1042
|
+
help(topic="plantuml") // PlantUML diagram syntax
|
|
1043
|
+
```
|
|
1044
|
+
|
|
1045
|
+
**Tip**: Start with `help()` to understand the overall workflow, then use specific topics for syntax details.
|
|
1046
|
+
|
|
1047
|
+
---
|
|
1048
|
+
|
|
1049
|
+
## PlantUML Tools (3)
|
|
1050
|
+
|
|
1051
|
+
Docker-based PlantUML validation and rendering. Requires Docker to be installed and running.
|
|
1052
|
+
|
|
1053
|
+
**⚠️ External Includes NOT Supported:**
|
|
1054
|
+
```
|
|
1055
|
+
!include https://raw.githubusercontent.com/... ← NOT SUPPORTED
|
|
1056
|
+
```
|
|
1057
|
+
Confluence's PlantUML plugin cannot fetch external URLs. Use native PlantUML syntax instead of C4 includes. See `help(topic="plantuml")` for examples.
|
|
1058
|
+
|
|
1059
|
+
### 1. plantuml_validate
|
|
1060
|
+
**Description**: Validate PlantUML diagram syntax using a real PlantUML server
|
|
1061
|
+
**Use Cases**: Check diagram syntax before inserting into Confluence, debug diagram errors
|
|
1062
|
+
|
|
1063
|
+
| Parameter | Type | Required | Description |
|
|
1064
|
+
|-----------|------|----------|-------------|
|
|
1065
|
+
| code | string | ✗ | Raw PlantUML code (either code or bufferId required) |
|
|
1066
|
+
| bufferId | string | ✗ | Buffer ID containing PlantUML code |
|
|
1067
|
+
|
|
1068
|
+
**Response includes**: `valid`, `errors` (array of line-level errors if invalid), `normalized` (normalized code)
|
|
1069
|
+
|
|
1070
|
+
**Note**: Validates ALL diagram types (sequence, class, C4, etc.) with line-level error feedback.
|
|
1071
|
+
|
|
1072
|
+
---
|
|
1073
|
+
|
|
1074
|
+
### 2. plantuml_render
|
|
1075
|
+
**Description**: Render PlantUML diagram to a specified format
|
|
1076
|
+
**Use Cases**: Generate ASCII art for terminal display, create images for documentation
|
|
1077
|
+
|
|
1078
|
+
| Parameter | Type | Required | Description |
|
|
1079
|
+
|-----------|------|----------|-------------|
|
|
1080
|
+
| code | string | ✗ | Raw PlantUML code (either code or bufferId required) |
|
|
1081
|
+
| bufferId | string | ✗ | Buffer ID containing PlantUML code |
|
|
1082
|
+
| format | string | ✗ | Output format: "ascii" (default), "svg", "png", "eps" |
|
|
1083
|
+
| maxWidth | number | ✗ | Max width for ASCII output (20-200, default: 80) |
|
|
1084
|
+
|
|
1085
|
+
**Response includes**: `bufferId` (for large outputs), `content` (for small outputs), `format`, `size`
|
|
1086
|
+
|
|
1087
|
+
**Binary Formats**: PNG and EPS outputs are base64-encoded. Use `buffer_save_to_file` to decode and save to disk.
|
|
1088
|
+
|
|
1089
|
+
**Example - ASCII preview**:
|
|
1090
|
+
```typescript
|
|
1091
|
+
plantuml_render({
|
|
1092
|
+
code: "@startuml\nA -> B: Hello\n@enduml",
|
|
1093
|
+
format: "ascii",
|
|
1094
|
+
maxWidth: 60
|
|
1095
|
+
})
|
|
1096
|
+
// Returns ASCII art directly in response
|
|
1097
|
+
```
|
|
1098
|
+
|
|
1099
|
+
**Example - Save PNG**:
|
|
1100
|
+
```typescript
|
|
1101
|
+
const result = plantuml_render({
|
|
1102
|
+
code: "@startuml\nA -> B\n@enduml",
|
|
1103
|
+
format: "png"
|
|
1104
|
+
})
|
|
1105
|
+
buffer_save_to_file({
|
|
1106
|
+
bufferId: result.bufferId,
|
|
1107
|
+
outputPath: "./diagram.png"
|
|
1108
|
+
})
|
|
1109
|
+
```
|
|
1110
|
+
|
|
1111
|
+
---
|
|
1112
|
+
|
|
1113
|
+
### 3. plantuml_status
|
|
1114
|
+
**Description**: Check PlantUML service status
|
|
1115
|
+
**Use Cases**: Verify Docker service is running, troubleshoot connection issues
|
|
1116
|
+
|
|
1117
|
+
| Parameter | Type | Required | Description |
|
|
1118
|
+
|-----------|------|----------|-------------|
|
|
1119
|
+
| (none) | | | |
|
|
1120
|
+
|
|
1121
|
+
**Response includes**: `running`, `port`, `containerId`, `message`
|
|
1122
|
+
|
|
1123
|
+
**Docker Lifecycle**:
|
|
1124
|
+
- Container starts automatically on first `plantuml_validate` or `plantuml_render` call
|
|
1125
|
+
- Uses dynamic port allocation (unique per MCP instance)
|
|
1126
|
+
- Stops gracefully on MCP server shutdown
|
|
1127
|
+
|
|
1128
|
+
---
|
|
1129
|
+
|
|
1130
|
+
## AI Integration Guidelines
|
|
1131
|
+
|
|
1132
|
+
When using Jicon with AI assistants (Claude, GPT, etc.), follow these patterns for optimal results.
|
|
1133
|
+
|
|
1134
|
+
### Content Buffering
|
|
1135
|
+
|
|
1136
|
+
Tools that return large content (Confluence pages, Jira issues, Tempo worklogs) use an in-memory buffering system for efficient content pagination.
|
|
1137
|
+
|
|
1138
|
+
**How It Works:**
|
|
1139
|
+
1. **Initial Call**: When you call a tool like `confluence_get_page`, it fetches the full content and stores it in a buffer
|
|
1140
|
+
2. **Chunked Response**: The response includes a `bufferId`, the first chunk of content (default 5000 chars), and pagination info
|
|
1141
|
+
3. **Retrieve More**: Use `buffer_get_chunk` with the `bufferId` to get subsequent chunks
|
|
1142
|
+
|
|
1143
|
+
**Buffered Response Format:**
|
|
1144
|
+
- `bufferId`: Unique identifier for retrieving more content
|
|
1145
|
+
- `content`: The current chunk of content
|
|
1146
|
+
- `offset`: Starting position of this chunk
|
|
1147
|
+
- `limit`: Maximum characters returned
|
|
1148
|
+
- `totalSize`: Total size of buffered content
|
|
1149
|
+
- `hasMore`: Whether more content is available
|
|
1150
|
+
|
|
1151
|
+
**Auto-Buffered Tools:**
|
|
1152
|
+
- `confluence_get_page`, `confluence_get_page_by_title`
|
|
1153
|
+
- `jira_get_issue`, `jira_search_issues`
|
|
1154
|
+
- `tempo_get_worklogs`, `tempo_get_team_worklogs`
|
|
1155
|
+
|
|
1156
|
+
**Buffer Management:**
|
|
1157
|
+
- **TTL**: Buffers expire after 10 minutes by default; edited buffers reset to 1 day TTL
|
|
1158
|
+
- **List Buffers**: Use `buffer_list` to see active buffers
|
|
1159
|
+
- **Clear Buffers**: Use `buffer_clear` to free memory
|
|
1160
|
+
|
|
1161
|
+
### Buffer Workflows
|
|
1162
|
+
|
|
1163
|
+
**Creating new Confluence pages (draft workflow):**
|
|
1164
|
+
1. `confluence_draft_create` → creates server draft + buffer, returns clickable preview URL
|
|
1165
|
+
2. User clicks URL to review draft in Confluence UI (can edit there)
|
|
1166
|
+
3. If changes needed: `confluence_draft_open` → re-reads user's edits into buffer
|
|
1167
|
+
4. `buffer_edit_xhtml` → structure-aware editing (or `buffer_edit` for simple text)
|
|
1168
|
+
5. `confluence_draft_save` → checkpoint: deletes old draft, creates new with buffer content, returns new URL
|
|
1169
|
+
6. Repeat steps 2-5 until user approves
|
|
1170
|
+
7. User publishes via Confluence UI (click "Publish" button)
|
|
1171
|
+
|
|
1172
|
+
**Editing existing Confluence pages (draft workflow):**
|
|
1173
|
+
1. `confluence_get_page` → page content is buffered, returns `bufferId`, `pageId`, and `version`
|
|
1174
|
+
2. `buffer_edit_xhtml` → structure-aware editing (tables, macros, layouts)
|
|
1175
|
+
3. `confluence_draft_create` → creates draft with modified content for user review
|
|
1176
|
+
4. User reviews draft at URL
|
|
1177
|
+
5. If changes needed: repeat via `confluence_draft_open` → edit → `confluence_draft_save`
|
|
1178
|
+
6. User publishes via Confluence UI (click "Publish" button)
|
|
1179
|
+
|
|
1180
|
+
**Saving buffer content to files:**
|
|
1181
|
+
- `buffer_save_to_file(bufferId, outputPath)` - Save buffer content to a local file
|
|
1182
|
+
- Security: Files can only be saved within project directory (must contain `.jicon.json`)
|
|
1183
|
+
- Binary content (PNG/EPS from `plantuml_render`) is auto-decoded from base64
|
|
1184
|
+
|
|
1185
|
+
### Buffer Content Types
|
|
1186
|
+
|
|
1187
|
+
**Buffer types enforce the correct editing tool:**
|
|
1188
|
+
|
|
1189
|
+
| Buffer Source | contentType | Editing Tool |
|
|
1190
|
+
|---------------|-------------|--------------|
|
|
1191
|
+
| Confluence pages/drafts | `xhtml` | `buffer_edit_xhtml` (required) |
|
|
1192
|
+
| Jira issues | `json` | `buffer_edit` |
|
|
1193
|
+
| Other content | `plain` | `buffer_edit` |
|
|
1194
|
+
|
|
1195
|
+
**XHTML Buffers (Confluence content):**
|
|
1196
|
+
- Confluence tools automatically set `contentType: "xhtml"` on buffers
|
|
1197
|
+
- `buffer_edit` is **blocked** for XHTML buffers - use `buffer_edit_xhtml` instead
|
|
1198
|
+
- This ensures PlantUML validation and proper structure-aware editing
|
|
1199
|
+
|
|
1200
|
+
### XHTML Structure Editing
|
|
1201
|
+
|
|
1202
|
+
Use `buffer_edit_xhtml` for XML tree-aware editing of Confluence storage format content. This tool provides CSS-like selectors for targeting elements and supports PlantUML diagram insertion with automatic syntax validation.
|
|
1203
|
+
|
|
1204
|
+
**Operations:**
|
|
1205
|
+
|
|
1206
|
+
| Operation | Description |
|
|
1207
|
+
|-----------|-------------|
|
|
1208
|
+
| `insert` | Add content relative to selected element |
|
|
1209
|
+
| `insert-plantuml` | Insert PlantUML diagram with validation and macro wrapping |
|
|
1210
|
+
| `update` | Update element content and/or attributes |
|
|
1211
|
+
| `update-plantuml` | Update existing PlantUML macro with validation |
|
|
1212
|
+
| `remove` | Delete selected element(s) |
|
|
1213
|
+
| `move` | Move element to new location |
|
|
1214
|
+
| `wrap` | Wrap element with new parent |
|
|
1215
|
+
|
|
1216
|
+
**Selector Syntax:**
|
|
1217
|
+
|
|
1218
|
+
```
|
|
1219
|
+
p # Tag name
|
|
1220
|
+
ac:structured-macro # Namespaced element
|
|
1221
|
+
[ac:name="plantuml"] # Attribute selector
|
|
1222
|
+
ac:structured-macro[ac:name="code"] # Combined tag + attribute
|
|
1223
|
+
table tbody tr # Descendant selector
|
|
1224
|
+
ul > li # Direct child selector
|
|
1225
|
+
```
|
|
1226
|
+
|
|
1227
|
+
**Example - Add Table Row:**
|
|
1228
|
+
|
|
1229
|
+
```typescript
|
|
1230
|
+
buffer_edit_xhtml({
|
|
1231
|
+
bufferId: "buf_xxx",
|
|
1232
|
+
operation: "insert",
|
|
1233
|
+
selector: "table tbody tr",
|
|
1234
|
+
matchIndex: -1, // Last row (use 0 for first)
|
|
1235
|
+
position: "after",
|
|
1236
|
+
content: "<tr><td>New Cell 1</td><td>New Cell 2</td></tr>"
|
|
1237
|
+
})
|
|
1238
|
+
```
|
|
1239
|
+
|
|
1240
|
+
**Example - Insert PlantUML Diagram:**
|
|
1241
|
+
|
|
1242
|
+
```typescript
|
|
1243
|
+
buffer_edit_xhtml({
|
|
1244
|
+
bufferId: "buf_xxx",
|
|
1245
|
+
operation: "insert-plantuml",
|
|
1246
|
+
selector: "h2",
|
|
1247
|
+
matchIndex: 0,
|
|
1248
|
+
position: "after",
|
|
1249
|
+
plantuml: `
|
|
1250
|
+
class User {
|
|
1251
|
+
+id: string
|
|
1252
|
+
+login(): boolean
|
|
1253
|
+
}
|
|
1254
|
+
class Order
|
|
1255
|
+
User --> Order
|
|
1256
|
+
`
|
|
1257
|
+
})
|
|
1258
|
+
// Automatically wraps in @startuml/@enduml, validates syntax,
|
|
1259
|
+
// and generates complete Confluence PlantUML macro
|
|
1260
|
+
```
|
|
1261
|
+
|
|
1262
|
+
**Position Values:**
|
|
1263
|
+
- `before` - Insert before the selected element
|
|
1264
|
+
- `after` - Insert after the selected element
|
|
1265
|
+
- `inside-start` - Insert as first child of selected element
|
|
1266
|
+
- `inside-end` - Insert as last child of selected element
|
|
1267
|
+
|
|
1268
|
+
**Match Control:**
|
|
1269
|
+
- `matchIndex`: Operate on Nth match (0-based, use negative for reverse)
|
|
1270
|
+
- `matchAll`: Apply operation to all matches
|
|
1271
|
+
|
|
1272
|
+
**Semantic Positions for PlantUML:**
|
|
1273
|
+
|
|
1274
|
+
```typescript
|
|
1275
|
+
buffer_edit_xhtml({
|
|
1276
|
+
bufferId: "buf_xxx",
|
|
1277
|
+
operation: "insert-plantuml",
|
|
1278
|
+
semanticPosition: "after-title", // No selector needed!
|
|
1279
|
+
plantuml: "@startuml\nA -> B: message\n@enduml"
|
|
1280
|
+
})
|
|
1281
|
+
```
|
|
1282
|
+
|
|
1283
|
+
Available: `after-title`, `after-heading`, `before-content`, `end`, `after-toc`
|
|
1284
|
+
|
|
1285
|
+
### XHTML Validation
|
|
1286
|
+
|
|
1287
|
+
Use `buffer_validate_xhtml` to validate Confluence storage format content:
|
|
1288
|
+
|
|
1289
|
+
```typescript
|
|
1290
|
+
buffer_validate_xhtml({
|
|
1291
|
+
bufferId: "buf_xxx",
|
|
1292
|
+
validatePlantUml: true // Enable PlantUML syntax validation (default: true)
|
|
1293
|
+
})
|
|
1294
|
+
// Returns: { valid: true/false, errors: [...], warnings: [...], plantuml: [...] }
|
|
1295
|
+
```
|
|
1296
|
+
|
|
1297
|
+
**Validation Checks:**
|
|
1298
|
+
- XML well-formedness
|
|
1299
|
+
- Required attributes on Confluence elements (ac:name, ri:space-key, etc.)
|
|
1300
|
+
- Valid layout section types
|
|
1301
|
+
- Known macro names (warnings for unknown macros)
|
|
1302
|
+
- PlantUML syntax (if Docker service is running)
|
|
1303
|
+
|
|
1304
|
+
**Automatic Validation:**
|
|
1305
|
+
XHTML content is automatically validated before Confluence writes (`confluence_draft_create`, `confluence_draft_save`).
|
|
1306
|
+
|
|
1307
|
+
### Buffer Lifecycle & Staleness Prevention
|
|
1308
|
+
|
|
1309
|
+
**Automatic Invalidation**: When write operations succeed (`confluence_draft_save`, `jira_update_issue`, `tempo_update_worklog`, etc.), any cached buffers for that resource are automatically invalidated.
|
|
1310
|
+
|
|
1311
|
+
**Version Conflict Handling**: If a write fails due to a version conflict (HTTP 409), the error includes actionable hints suggesting you re-fetch the resource.
|
|
1312
|
+
|
|
1313
|
+
**Resource Tracking**: Read operations attach metadata to buffers (resource type, ID, version) enabling targeted invalidation.
|
|
1314
|
+
|
|
1315
|
+
### Confluence Draft Workflow Details
|
|
1316
|
+
|
|
1317
|
+
Drafts allow iterative content development with user confirmation before publishing.
|
|
1318
|
+
|
|
1319
|
+
**API Limitation:** Confluence Server/Data Center REST API does not support updating drafts. The `confluence_draft_save` tool works around this by:
|
|
1320
|
+
1. Deleting the existing draft
|
|
1321
|
+
2. Creating a new draft with the updated content
|
|
1322
|
+
3. Returning the new draft ID and URL
|
|
1323
|
+
|
|
1324
|
+
**Note:** Publishing is done by the user in Confluence UI. The AI creates and manages drafts; the user decides when to publish
|