backlog-mcp-server 0.6.0 → 0.7.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/build/index.js CHANGED
@@ -15,7 +15,8 @@ import { logger } from './utils/logger.js';
15
15
  import { createToolRegistrar } from './utils/toolRegistrar.js';
16
16
  import { buildToolsetGroup } from './utils/toolsetUtils.js';
17
17
  import { wrapServerWithToolRegistry } from './utils/wrapServerWithToolRegistry.js';
18
- import { VERSION } from './version.js';
18
+ import packageJson from '../package.json' with { type: 'json' };
19
+ const { version } = packageJson;
19
20
  dotenv.config();
20
21
  const domain = env.get('BACKLOG_DOMAIN').required().asString();
21
22
  const apiKey = env.get('BACKLOG_API_KEY').required().asString();
@@ -63,7 +64,7 @@ const useFields = argv.optimizeResponse;
63
64
  const server = wrapServerWithToolRegistry(new McpServer({
64
65
  name: 'backlog',
65
66
  title: useFields ? 'backlog (field selection enabled)' : 'backlog',
66
- version: VERSION,
67
+ version,
67
68
  }));
68
69
  const transHelper = createTranslationHelper();
69
70
  const maxTokens = argv.maxTokens;
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod';
2
+ import { DocumentItemSchema } from '../types/zod/backlogOutputDefinition.js';
3
+ import { buildToolSchema } from '../types/tool.js';
4
+ const addDocumentSchema = buildToolSchema((t) => ({
5
+ projectId: z
6
+ .number()
7
+ .describe(t('TOOL_ADD_DOCUMENT_PROJECT_ID', 'Project ID')),
8
+ title: z
9
+ .string()
10
+ .optional()
11
+ .describe(t('TOOL_ADD_DOCUMENT_TITLE', 'Title of the document')),
12
+ content: z
13
+ .string()
14
+ .optional()
15
+ .describe(t('TOOL_ADD_DOCUMENT_CONTENT', 'Content of the document')),
16
+ emoji: z
17
+ .string()
18
+ .optional()
19
+ .describe(t('TOOL_ADD_DOCUMENT_EMOJI', 'Emoji for the document')),
20
+ parentId: z
21
+ .string()
22
+ .optional()
23
+ .describe(t('TOOL_ADD_DOCUMENT_PARENT_ID', 'Parent document ID')),
24
+ addLast: z
25
+ .boolean()
26
+ .optional()
27
+ .describe(t('TOOL_ADD_DOCUMENT_ADD_LAST', 'Add to the end of the list')),
28
+ }));
29
+ export const addDocumentTool = (backlog, { t }) => {
30
+ return {
31
+ name: 'addDocument',
32
+ description: t('TOOL_ADD_DOCUMENT_DESCRIPTION', 'Adds a new document to the specified project.'),
33
+ schema: z.object(addDocumentSchema(t)),
34
+ outputSchema: DocumentItemSchema,
35
+ importantFields: ['id', 'projectId', 'title', 'plain', 'createdUser'],
36
+ handler: async (params) => {
37
+ return backlog.addDocument(params);
38
+ },
39
+ };
40
+ };
@@ -51,6 +51,7 @@ import { getVersionMilestoneListTool } from './getVersionMilestoneList.js';
51
51
  import { addVersionMilestoneTool } from './addVersionMilestone.js';
52
52
  import { updateVersionMilestoneTool } from './updateVersionMilestone.js';
53
53
  import { deleteVersionTool } from './deleteVersion.js';
54
+ import { addDocumentTool } from './addDocument.js';
54
55
  export const allTools = (backlog, helper) => {
55
56
  return {
56
57
  toolsets: [
@@ -143,6 +144,7 @@ export const allTools = (backlog, helper) => {
143
144
  getDocumentsTool(backlog, helper),
144
145
  getDocumentTreeTool(backlog, helper),
145
146
  getDocumentTool(backlog, helper),
147
+ addDocumentTool(backlog, helper),
146
148
  ],
147
149
  },
148
150
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backlog-mcp-server",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "backlog-mcp-server": "./build/index.js"
@@ -8,7 +8,6 @@
8
8
  "license": "MIT",
9
9
  "scripts": {
10
10
  "dev": "tsx src/index.ts",
11
- "prebuild": "node scripts/replace-version.js",
12
11
  "build": "tsc && chmod 755 build/index.js",
13
12
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
14
13
  "test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage",
@@ -22,7 +21,7 @@
22
21
  ],
23
22
  "dependencies": {
24
23
  "@modelcontextprotocol/sdk": "^1.24.0",
25
- "backlog-js": "^0.15.0",
24
+ "backlog-js": "^0.16.0",
26
25
  "cosmiconfig": "^9.0.0",
27
26
  "dotenv": "^16.5.0",
28
27
  "env-var": "^7.5.0",