@ama-work/mcp-atlassian 1.2.1 → 1.2.2
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
CHANGED
|
@@ -92,6 +92,8 @@ https://raw.githubusercontent.com/Ask-Me-Anything-dot-work/ama-mcp-atlassian/mai
|
|
|
92
92
|
|
|
93
93
|
**Meta:** `atlassian_whoami`
|
|
94
94
|
|
|
95
|
+
Tool arguments pass through the MCP gateway verbatim — gateway namespacing (`{instanceId}.{toolName}`) does not affect argument forwarding. Past bugs where `confluence_create_page` dropped `spaceId` (400 `INVALID_REQUEST_BODY`) were server-side request mapping in this repo, fixed against the `confluence.js` v2 client contract (`{ body: { spaceId, title, ... } }` nesting).
|
|
96
|
+
|
|
95
97
|
## Development
|
|
96
98
|
|
|
97
99
|
```bash
|
|
@@ -10,7 +10,7 @@ export function registerConfluenceCommentTools(server) {
|
|
|
10
10
|
const adfDoc = toADF(body);
|
|
11
11
|
const comment = await client.comment.createFooterComment({
|
|
12
12
|
pageId,
|
|
13
|
-
body: { representation: "atlas_doc_format", value: adfDoc },
|
|
13
|
+
body: { representation: "atlas_doc_format", value: JSON.stringify(adfDoc) },
|
|
14
14
|
});
|
|
15
15
|
return {
|
|
16
16
|
content: [{ type: "text", text: JSON.stringify(comment, null, 2) }],
|
|
@@ -11,12 +11,17 @@ export function registerConfluenceCreateTools(server) {
|
|
|
11
11
|
}, async ({ spaceId, title, body, parentId, status }) => {
|
|
12
12
|
const client = await createConfluenceClient();
|
|
13
13
|
const adfDoc = toADF(body);
|
|
14
|
+
// confluence.js createPage forwards only `parameters.body` as the HTTP request body,
|
|
15
|
+
// so page fields must be nested under `body` (flat fields are silently dropped →
|
|
16
|
+
// API 400 "spaceId: must not be null"). ADF value must be a JSON string per v2 spec.
|
|
14
17
|
const params = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
body: {
|
|
19
|
+
spaceId,
|
|
20
|
+
title,
|
|
21
|
+
status: status ?? "current",
|
|
22
|
+
...(parentId ? { parentId } : {}),
|
|
23
|
+
body: { representation: "atlas_doc_format", value: JSON.stringify(adfDoc) },
|
|
24
|
+
},
|
|
20
25
|
};
|
|
21
26
|
const page = await client.page.createPage(params);
|
|
22
27
|
return {
|
|
@@ -10,12 +10,16 @@ export function registerConfluenceUpdateTools(server) {
|
|
|
10
10
|
}, async ({ pageId, title, body, versionNumber }) => {
|
|
11
11
|
const client = await createConfluenceClient();
|
|
12
12
|
const adfDoc = toADF(body);
|
|
13
|
+
// updatePage forwards only `parameters.body` — nest title/status/version there and
|
|
14
|
+
// JSON-stringify the ADF value (v2 API expects a string, not an object).
|
|
13
15
|
const params = {
|
|
14
16
|
id: Number(pageId),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
body: {
|
|
18
|
+
title,
|
|
19
|
+
status: "current",
|
|
20
|
+
version: { number: versionNumber + 1 },
|
|
21
|
+
body: { representation: "atlas_doc_format", value: JSON.stringify(adfDoc) },
|
|
22
|
+
},
|
|
19
23
|
};
|
|
20
24
|
const page = await client.page.updatePage(params);
|
|
21
25
|
return {
|