backlog-mcp-server 0.9.0 → 0.9.1
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/build/index.js +3 -3
- package/build/tools/tools.js +0 -2
- package/package.json +2 -2
- package/build/tools/deleteDocument.js +0 -19
package/build/index.js
CHANGED
|
@@ -18,9 +18,6 @@ import { wrapServerWithToolRegistry } from './utils/wrapServerWithToolRegistry.j
|
|
|
18
18
|
import packageJson from '../package.json' with { type: 'json' };
|
|
19
19
|
const { version } = packageJson;
|
|
20
20
|
dotenv.config();
|
|
21
|
-
const domain = env.get('BACKLOG_DOMAIN').required().asString();
|
|
22
|
-
const apiKey = env.get('BACKLOG_API_KEY').required().asString();
|
|
23
|
-
const backlog = new backlogjs.Backlog({ host: domain, apiKey: apiKey });
|
|
24
21
|
const argv = yargs(hideBin(process.argv))
|
|
25
22
|
.option('max-tokens', {
|
|
26
23
|
type: 'number',
|
|
@@ -60,6 +57,9 @@ Available toolsets:
|
|
|
60
57
|
default: env.get('ENABLE_DYNAMIC_TOOLSETS').default('false').asBool(),
|
|
61
58
|
})
|
|
62
59
|
.parseSync();
|
|
60
|
+
const domain = env.get('BACKLOG_DOMAIN').required().asString();
|
|
61
|
+
const apiKey = env.get('BACKLOG_API_KEY').required().asString();
|
|
62
|
+
const backlog = new backlogjs.Backlog({ host: domain, apiKey: apiKey });
|
|
63
63
|
const useFields = argv.optimizeResponse;
|
|
64
64
|
const server = wrapServerWithToolRegistry(new McpServer({
|
|
65
65
|
name: 'backlog',
|
package/build/tools/tools.js
CHANGED
|
@@ -55,7 +55,6 @@ import { addVersionMilestoneTool } from './addVersionMilestone.js';
|
|
|
55
55
|
import { updateVersionMilestoneTool } from './updateVersionMilestone.js';
|
|
56
56
|
import { deleteVersionTool } from './deleteVersion.js';
|
|
57
57
|
import { addDocumentTool } from './addDocument.js';
|
|
58
|
-
import { deleteDocumentTool } from './deleteDocument.js';
|
|
59
58
|
export const allTools = (backlog, helper) => {
|
|
60
59
|
return {
|
|
61
60
|
toolsets: [
|
|
@@ -152,7 +151,6 @@ export const allTools = (backlog, helper) => {
|
|
|
152
151
|
getDocumentTreeTool(backlog, helper),
|
|
153
152
|
getDocumentTool(backlog, helper),
|
|
154
153
|
addDocumentTool(backlog, helper),
|
|
155
|
-
deleteDocumentTool(backlog, helper),
|
|
156
154
|
],
|
|
157
155
|
},
|
|
158
156
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backlog-mcp-server",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"backlog-mcp-server": "./build/index.js"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"build"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
31
31
|
"backlog-js": "^0.16.0",
|
|
32
32
|
"cosmiconfig": "^9.0.0",
|
|
33
33
|
"dotenv": "^16.5.0",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { DocumentItemSchema } from '../types/zod/backlogOutputDefinition.js';
|
|
3
|
-
import { buildToolSchema } from '../types/tool.js';
|
|
4
|
-
const deleteDocumentSchema = buildToolSchema((t) => ({
|
|
5
|
-
documentId: z
|
|
6
|
-
.string()
|
|
7
|
-
.describe(t('TOOL_DELETE_DOCUMENT_DOCUMENT_ID', 'Document ID')),
|
|
8
|
-
}));
|
|
9
|
-
export const deleteDocumentTool = (backlog, { t }) => {
|
|
10
|
-
return {
|
|
11
|
-
name: 'delete_document',
|
|
12
|
-
description: t('TOOL_DELETE_DOCUMENT_DESCRIPTION', 'Permanently deletes a document. This is irreversible (hard delete) and the document cannot be recovered. Unlike the Backlog UI trash feature, this operation does not move the document to trash.'),
|
|
13
|
-
schema: z.object(deleteDocumentSchema(t)),
|
|
14
|
-
outputSchema: DocumentItemSchema,
|
|
15
|
-
handler: async ({ documentId }) => {
|
|
16
|
-
return backlog.deleteDocument(documentId);
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
};
|