backlog-mcp-server 0.17.0 → 0.18.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.ja.md +15 -32
- package/README.md +20 -32
- package/build/auth/oauthRoutes.js +53 -1
- package/build/createBacklogMcpServer.d.ts +4 -6
- package/build/createBacklogMcpServer.js +4 -12
- package/build/handlers/builders/composeToolHandler.d.ts +1 -1
- package/build/handlers/builders/composeToolHandler.js +15 -9
- package/build/handlers/transformers/wrapWithFieldPicking.d.ts +14 -1
- package/build/handlers/transformers/wrapWithFieldPicking.js +30 -36
- package/build/index.js +20 -15
- package/build/lib.d.ts +1 -1
- package/build/reportUnknownOverrideKeys.js +0 -1
- package/build/tools/addDocument.d.ts +2 -2
- package/build/tools/addDocument.js +17 -2
- package/build/tools/addIssue.d.ts +2 -2
- package/build/tools/addIssue.js +32 -2
- package/build/tools/addIssueComment.d.ts +2 -2
- package/build/tools/addIssueComment.js +14 -2
- package/build/tools/addProject.d.ts +2 -2
- package/build/tools/addProject.js +22 -2
- package/build/tools/addPullRequest.d.ts +2 -2
- package/build/tools/addPullRequest.js +26 -2
- package/build/tools/addPullRequestComment.d.ts +2 -2
- package/build/tools/addPullRequestComment.js +12 -2
- package/build/tools/addRelatedIssue.d.ts +2 -2
- package/build/tools/addRelatedIssue.js +33 -2
- package/build/tools/addVersionMilestone.d.ts +2 -2
- package/build/tools/addVersionMilestone.js +12 -2
- package/build/tools/addWatching.d.ts +2 -2
- package/build/tools/addWatching.js +12 -2
- package/build/tools/addWiki.d.ts +2 -2
- package/build/tools/addWiki.js +16 -2
- package/build/tools/countIssues.d.ts +2 -2
- package/build/tools/countIssues.js +3 -2
- package/build/tools/deleteIssue.d.ts +2 -2
- package/build/tools/deleteIssue.js +32 -2
- package/build/tools/deleteProject.d.ts +2 -2
- package/build/tools/deleteProject.js +22 -2
- package/build/tools/deleteVersion.d.ts +2 -2
- package/build/tools/deleteVersion.js +12 -2
- package/build/tools/deleteWatching.d.ts +2 -2
- package/build/tools/deleteWatching.js +12 -2
- package/build/tools/getCategories.d.ts +2 -2
- package/build/tools/getCategories.js +8 -2
- package/build/tools/getCustomFields.d.ts +2 -2
- package/build/tools/getCustomFields.js +22 -2
- package/build/tools/getDocument.d.ts +2 -2
- package/build/tools/getDocument.js +17 -2
- package/build/tools/getDocumentTree.d.ts +2 -2
- package/build/tools/getDocumentTree.js +7 -2
- package/build/tools/getDocuments.d.ts +2 -2
- package/build/tools/getDocuments.js +17 -2
- package/build/tools/getGitRepositories.d.ts +2 -2
- package/build/tools/getGitRepositories.js +17 -2
- package/build/tools/getGitRepository.d.ts +2 -2
- package/build/tools/getGitRepository.js +17 -2
- package/build/tools/getIssue.d.ts +2 -2
- package/build/tools/getIssue.js +32 -2
- package/build/tools/getIssueComments.d.ts +2 -2
- package/build/tools/getIssueComments.js +14 -2
- package/build/tools/getIssueTypes.d.ts +2 -2
- package/build/tools/getIssueTypes.js +11 -2
- package/build/tools/getIssues.d.ts +10 -10
- package/build/tools/getIssues.js +32 -2
- package/build/tools/getMyself.d.ts +2 -2
- package/build/tools/getMyself.js +11 -2
- package/build/tools/getNotifications.d.ts +2 -2
- package/build/tools/getNotifications.js +15 -2
- package/build/tools/getNotificationsCount.d.ts +2 -2
- package/build/tools/getNotificationsCount.js +5 -2
- package/build/tools/getPriorities.d.ts +2 -2
- package/build/tools/getPriorities.js +3 -2
- package/build/tools/getProject.d.ts +2 -2
- package/build/tools/getProject.js +22 -2
- package/build/tools/getProjectList.d.ts +2 -2
- package/build/tools/getProjectList.js +22 -2
- package/build/tools/getProjectUsers.d.ts +2 -2
- package/build/tools/getProjectUsers.js +11 -2
- package/build/tools/getPullRequest.d.ts +2 -2
- package/build/tools/getPullRequest.js +26 -2
- package/build/tools/getPullRequestComments.d.ts +2 -2
- package/build/tools/getPullRequestComments.js +12 -2
- package/build/tools/getPullRequests.d.ts +2 -2
- package/build/tools/getPullRequests.js +26 -2
- package/build/tools/getPullRequestsCount.d.ts +2 -2
- package/build/tools/getPullRequestsCount.js +5 -2
- package/build/tools/getRelatedIssues.d.ts +2 -2
- package/build/tools/getRelatedIssues.js +33 -2
- package/build/tools/getResolutions.d.ts +2 -2
- package/build/tools/getResolutions.js +3 -2
- package/build/tools/getSpace.d.ts +2 -2
- package/build/tools/getSpace.js +13 -2
- package/build/tools/getSpaceActivities.d.ts +2 -2
- package/build/tools/getSpaceActivities.js +12 -2
- package/build/tools/getUserRecentUpdates.d.ts +2 -2
- package/build/tools/getUserRecentUpdates.js +12 -2
- package/build/tools/getUserStarsCount.d.ts +2 -2
- package/build/tools/getUserStarsCount.js +3 -2
- package/build/tools/getUsers.d.ts +2 -2
- package/build/tools/getUsers.js +11 -2
- package/build/tools/getVersionMilestoneList.d.ts +2 -2
- package/build/tools/getVersionMilestoneList.js +12 -2
- package/build/tools/getWatchingListCount.d.ts +2 -2
- package/build/tools/getWatchingListCount.js +5 -2
- package/build/tools/getWatchingListItems.d.ts +2 -2
- package/build/tools/getWatchingListItems.js +12 -2
- package/build/tools/getWiki.d.ts +2 -2
- package/build/tools/getWiki.js +16 -2
- package/build/tools/getWikiPages.d.ts +2 -2
- package/build/tools/getWikiPages.js +12 -2
- package/build/tools/getWikisCount.d.ts +2 -2
- package/build/tools/getWikisCount.js +3 -2
- package/build/tools/markNotificationAsRead.d.ts +6 -1
- package/build/tools/markNotificationAsRead.js +6 -1
- package/build/tools/markWatchingAsRead.d.ts +6 -1
- package/build/tools/markWatchingAsRead.js +6 -1
- package/build/tools/removeRelatedIssue.d.ts +2 -2
- package/build/tools/removeRelatedIssue.js +33 -2
- package/build/tools/resetUnreadNotificationCount.d.ts +2 -2
- package/build/tools/resetUnreadNotificationCount.js +5 -2
- package/build/tools/updateIssue.d.ts +2 -2
- package/build/tools/updateIssue.js +32 -2
- package/build/tools/updateIssueComment.d.ts +2 -2
- package/build/tools/updateIssueComment.js +14 -2
- package/build/tools/updateProject.d.ts +2 -2
- package/build/tools/updateProject.js +22 -2
- package/build/tools/updatePullRequest.d.ts +2 -2
- package/build/tools/updatePullRequest.js +26 -2
- package/build/tools/updatePullRequestComment.d.ts +2 -2
- package/build/tools/updatePullRequestComment.js +12 -2
- package/build/tools/updateVersionMilestone.d.ts +2 -2
- package/build/tools/updateVersionMilestone.js +12 -2
- package/build/tools/updateWatching.d.ts +2 -2
- package/build/tools/updateWatching.js +12 -2
- package/build/tools/updateWiki.d.ts +2 -2
- package/build/tools/updateWiki.js +16 -2
- package/build/types/outputFields.d.ts +26 -0
- package/build/types/outputFields.js +3 -0
- package/build/types/tool.d.ts +21 -8
- package/build/types/zod/activityType.d.ts +38 -0
- package/build/types/zod/activityType.js +38 -0
- package/build/utils/fieldSelection.d.ts +22 -0
- package/build/utils/fieldSelection.js +40 -0
- package/build/utils/toolsetUtils.d.ts +1 -3
- package/build/utils/toolsetUtils.js +0 -12
- package/package.json +1 -2
- package/build/tools/dynamicTools/toolsets.d.ts +0 -15
- package/build/tools/dynamicTools/toolsets.js +0 -103
- package/build/types/zod/backlogOutputDefinition.d.ts +0 -3334
- package/build/types/zod/backlogOutputDefinition.js +0 -483
- package/build/utils/generateFieldsDescription.d.ts +0 -5
- package/build/utils/generateFieldsDescription.js +0 -50
- package/build/utils/toolRegistrar.d.ts +0 -5
- package/build/utils/toolRegistrar.js +0 -12
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
import { allTools } from '../tools/tools.js';
|
|
2
|
-
export function getToolset(group, name) {
|
|
3
|
-
return group.toolsets.find((t) => t.name === name);
|
|
4
|
-
}
|
|
5
|
-
export function enableToolset(group, name) {
|
|
6
|
-
const ts = getToolset(group, name);
|
|
7
|
-
if (!ts)
|
|
8
|
-
return `Toolset ${name} not found`;
|
|
9
|
-
if (ts.enabled)
|
|
10
|
-
return `Toolset ${name} is already enabled`;
|
|
11
|
-
ts.enabled = true;
|
|
12
|
-
return `Toolset ${name} enabled`;
|
|
13
|
-
}
|
|
14
2
|
export const buildToolsetGroup = (backlog, helper, enabledToolsets) => {
|
|
15
3
|
const toolsetGroup = allTools(backlog, helper);
|
|
16
4
|
const knownNames = toolsetGroup.toolsets.map((ts) => ts.name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backlog-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"backlog-mcp-server": "./build/index.js"
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
39
39
|
"backlog-js": "^0.19.1",
|
|
40
40
|
"env-var": "^7.5.0",
|
|
41
|
-
"graphql": "^17.0.2",
|
|
42
41
|
"hono": "^4.12.34",
|
|
43
42
|
"js-yaml": "^5.2.3",
|
|
44
43
|
"pino": "^10.3.1",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { DynamicToolDefinition, ToolRegistrar } from '../../types/tool.js';
|
|
3
|
-
import { DynamicToolsetGroup, ToolsetGroup } from '../../types/toolsets.js';
|
|
4
|
-
import { DescriptionHelper } from '../../createDescriptionHelper.js';
|
|
5
|
-
export declare const dynamicTools: (toolRegistrar: ToolRegistrar, helper: DescriptionHelper, toolsetGroup: ToolsetGroup) => DynamicToolsetGroup;
|
|
6
|
-
declare const enableToolsetSchema: (t: DescriptionHelper["t"]) => {
|
|
7
|
-
toolset: z.ZodString;
|
|
8
|
-
};
|
|
9
|
-
export declare const enableToolsetTool: (toolRegistrar: ToolRegistrar, { t }: DescriptionHelper) => DynamicToolDefinition<ReturnType<typeof enableToolsetSchema>>;
|
|
10
|
-
export declare const listAvailableToolsets: ({ t }: DescriptionHelper, toolsetGroup: ToolsetGroup) => DynamicToolDefinition<Record<string, never>>;
|
|
11
|
-
declare const getToolsetToolsSchema: (t: DescriptionHelper["t"]) => {
|
|
12
|
-
toolset: z.ZodString;
|
|
13
|
-
};
|
|
14
|
-
export declare const getToolsetTools: ({ t }: DescriptionHelper, toolsetGroup: ToolsetGroup) => DynamicToolDefinition<ReturnType<typeof getToolsetToolsSchema>>;
|
|
15
|
-
export {};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { buildToolSchema, } from '../../types/tool.js';
|
|
3
|
-
export const dynamicTools = function (toolRegistrar, helper, toolsetGroup) {
|
|
4
|
-
return {
|
|
5
|
-
toolsets: [
|
|
6
|
-
{
|
|
7
|
-
name: 'dynamic_tools',
|
|
8
|
-
description: 'Tools for managing Backlog space settings and general information.',
|
|
9
|
-
enabled: true,
|
|
10
|
-
tools: [
|
|
11
|
-
enableToolsetTool(toolRegistrar, helper),
|
|
12
|
-
listAvailableToolsets(helper, toolsetGroup),
|
|
13
|
-
getToolsetTools(helper, toolsetGroup),
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
const enableToolsetSchema = buildToolSchema((t) => ({
|
|
20
|
-
toolset: z
|
|
21
|
-
.string()
|
|
22
|
-
.describe(t('TOOL_ENABLE_TOOLSET_TOOLSET', 'Enable a toolset')),
|
|
23
|
-
}));
|
|
24
|
-
export const enableToolsetTool = (toolRegistrar, { t }) => {
|
|
25
|
-
return {
|
|
26
|
-
name: 'enable_toolset',
|
|
27
|
-
description: t('TOOL_ENABLE_TOOLSET_DESCRIPTION', 'Enable one of the Backlog MCP server toolsets. Use get_toolset_tools and list_available_toolsets first to inspect what this will enable.'),
|
|
28
|
-
schema: z.object(enableToolsetSchema(t)),
|
|
29
|
-
handler: async ({ toolset }) => {
|
|
30
|
-
const msg = await toolRegistrar.enableToolsetAndRefresh(toolset);
|
|
31
|
-
return {
|
|
32
|
-
content: [
|
|
33
|
-
{
|
|
34
|
-
type: 'text',
|
|
35
|
-
text: msg,
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export const listAvailableToolsets = ({ t }, toolsetGroup) => {
|
|
43
|
-
return {
|
|
44
|
-
name: 'list_available_toolsets',
|
|
45
|
-
description: t('TOOL_LIST_AVAILABLE_TOOLSETS_DESCRIPTION', 'List all available toolsets.'),
|
|
46
|
-
schema: z.object({}),
|
|
47
|
-
handler: async () => {
|
|
48
|
-
const result = toolsetGroup.toolsets.map((ts) => ({
|
|
49
|
-
name: ts.name,
|
|
50
|
-
description: ts.description,
|
|
51
|
-
currentlyEnabled: ts.enabled,
|
|
52
|
-
canEnable: true,
|
|
53
|
-
}));
|
|
54
|
-
return {
|
|
55
|
-
content: [
|
|
56
|
-
{
|
|
57
|
-
type: 'text',
|
|
58
|
-
text: JSON.stringify(result, null, 2),
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
};
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
const getToolsetToolsSchema = buildToolSchema((t) => ({
|
|
66
|
-
toolset: z
|
|
67
|
-
.string()
|
|
68
|
-
.describe(t('TOOL_GET_TOOLSET_TOOLS_TOOLSET', 'Toolset name to inspect')),
|
|
69
|
-
}));
|
|
70
|
-
export const getToolsetTools = ({ t }, toolsetGroup) => {
|
|
71
|
-
return {
|
|
72
|
-
name: 'get_toolset_tools',
|
|
73
|
-
description: t('TOOL_GET_TOOLSET_TOOLS_DESCRIPTION', 'List all tools in a specific toolset.'),
|
|
74
|
-
schema: z.object(getToolsetToolsSchema(t)),
|
|
75
|
-
handler: async ({ toolset }) => {
|
|
76
|
-
const found = toolsetGroup.toolsets.find((ts) => ts.name === toolset);
|
|
77
|
-
if (!found) {
|
|
78
|
-
return {
|
|
79
|
-
content: [
|
|
80
|
-
{
|
|
81
|
-
type: 'text',
|
|
82
|
-
text: `Toolset '${toolset}' not found.`,
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
const tools = found.tools.map((tool) => ({
|
|
88
|
-
name: tool.name,
|
|
89
|
-
description: tool.description,
|
|
90
|
-
toolset: found.name,
|
|
91
|
-
canEnable: true,
|
|
92
|
-
}));
|
|
93
|
-
return {
|
|
94
|
-
content: [
|
|
95
|
-
{
|
|
96
|
-
type: 'text',
|
|
97
|
-
text: JSON.stringify(tools, null, 2),
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
};
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
};
|