backlog-mcp-server 0.15.0 → 0.15.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.
Files changed (117) hide show
  1. package/README.ja.md +4 -2
  2. package/README.md +4 -2
  3. package/build/auth/backlogAuthContext.d.ts +2 -0
  4. package/build/auth/backlogOAuthClient.d.ts +10 -0
  5. package/build/auth/backlogOAuthConfig.d.ts +9 -0
  6. package/build/auth/bearerAuthMiddleware.d.ts +4 -0
  7. package/build/auth/oauthRoutes.d.ts +4 -0
  8. package/build/auth/tokenStore.d.ts +62 -0
  9. package/build/backlog/backlogErrorHandler.d.ts +2 -0
  10. package/build/backlog/customFields.d.ts +29 -0
  11. package/build/backlog/parseBacklogAPIError.d.ts +8 -0
  12. package/build/createBacklogMcpServer.d.ts +29 -0
  13. package/build/createBacklogMcpServer.js +6 -1
  14. package/build/createTranslationHelper.d.ts +16 -0
  15. package/build/createTranslationHelper.js +7 -11
  16. package/build/handlers/builders/composeToolHandler.d.ts +31 -0
  17. package/build/handlers/builders/composeToolHandler.js +21 -9
  18. package/build/handlers/transformers/wrapWithErrorHandling.d.ts +2 -0
  19. package/build/handlers/transformers/wrapWithFieldPicking.d.ts +4 -0
  20. package/build/handlers/transformers/wrapWithOrganizationContext.d.ts +3 -0
  21. package/build/handlers/transformers/wrapWithTokenLimit.d.ts +2 -0
  22. package/build/handlers/transformers/wrapWithToolResult.d.ts +6 -0
  23. package/build/httpMcpServer.d.ts +22 -0
  24. package/build/index.d.ts +2 -0
  25. package/build/index.js +8 -2
  26. package/build/lib.d.ts +25 -0
  27. package/build/lib.js +20 -0
  28. package/build/loadTranslationOverrides.d.ts +17 -0
  29. package/build/loadTranslationOverrides.js +24 -0
  30. package/build/registerTools.d.ts +5 -0
  31. package/build/registerTools.js +7 -6
  32. package/build/tools/addDocument.d.ts +15 -0
  33. package/build/tools/addIssue.d.ts +30 -0
  34. package/build/tools/addIssueComment.d.ts +14 -0
  35. package/build/tools/addProject.d.ts +18 -0
  36. package/build/tools/addPullRequest.d.ts +20 -0
  37. package/build/tools/addPullRequestComment.d.ts +16 -0
  38. package/build/tools/addRelatedIssue.d.ts +12 -0
  39. package/build/tools/addVersionMilestone.d.ts +15 -0
  40. package/build/tools/addWatching.d.ts +11 -0
  41. package/build/tools/addWiki.d.ts +13 -0
  42. package/build/tools/countIssues.d.ts +48 -0
  43. package/build/tools/deleteIssue.d.ts +11 -0
  44. package/build/tools/deleteProject.d.ts +11 -0
  45. package/build/tools/deleteVersion.d.ts +12 -0
  46. package/build/tools/deleteWatching.d.ts +10 -0
  47. package/build/tools/dynamicTools/organizations.d.ts +6 -0
  48. package/build/tools/dynamicTools/toolsets.d.ts +15 -0
  49. package/build/tools/getCategories.d.ts +11 -0
  50. package/build/tools/getCustomFields.d.ts +12 -0
  51. package/build/tools/getDocument.d.ts +10 -0
  52. package/build/tools/getDocumentTree.d.ts +10 -0
  53. package/build/tools/getDocuments.d.ts +11 -0
  54. package/build/tools/getGitRepositories.d.ts +11 -0
  55. package/build/tools/getGitRepository.d.ts +13 -0
  56. package/build/tools/getIssue.d.ts +11 -0
  57. package/build/tools/getIssueComments.d.ts +18 -0
  58. package/build/tools/getIssueTypes.d.ts +11 -0
  59. package/build/tools/getIssues.d.ts +75 -0
  60. package/build/tools/getMyself.d.ts +7 -0
  61. package/build/tools/getNotifications.d.ts +16 -0
  62. package/build/tools/getNotificationsCount.d.ts +11 -0
  63. package/build/tools/getPriorities.d.ts +7 -0
  64. package/build/tools/getProject.d.ts +11 -0
  65. package/build/tools/getProjectList.d.ts +11 -0
  66. package/build/tools/getProjectUsers.d.ts +11 -0
  67. package/build/tools/getPullRequest.d.ts +14 -0
  68. package/build/tools/getPullRequestComments.d.ts +21 -0
  69. package/build/tools/getPullRequests.d.ts +19 -0
  70. package/build/tools/getPullRequestsCount.d.ts +17 -0
  71. package/build/tools/getRelatedIssues.d.ts +11 -0
  72. package/build/tools/getResolutions.d.ts +7 -0
  73. package/build/tools/getSpace.d.ts +7 -0
  74. package/build/tools/getSpaceActivities.d.ts +45 -0
  75. package/build/tools/getUserRecentUpdates.d.ts +46 -0
  76. package/build/tools/getUserStarsCount.d.ts +12 -0
  77. package/build/tools/getUsers.d.ts +7 -0
  78. package/build/tools/getVersionMilestoneList.d.ts +11 -0
  79. package/build/tools/getWatchingListCount.d.ts +10 -0
  80. package/build/tools/getWatchingListItems.d.ts +10 -0
  81. package/build/tools/getWiki.d.ts +10 -0
  82. package/build/tools/getWikiPages.d.ts +12 -0
  83. package/build/tools/getWikisCount.d.ts +11 -0
  84. package/build/tools/markNotificationAsRead.d.ts +13 -0
  85. package/build/tools/markWatchingAsRead.d.ts +13 -0
  86. package/build/tools/removeRelatedIssue.d.ts +12 -0
  87. package/build/tools/resetUnreadNotificationCount.d.ts +7 -0
  88. package/build/tools/shared/customFieldFiltersSchema.d.ts +21 -0
  89. package/build/tools/tools.d.ts +4 -0
  90. package/build/tools/updateIssue.d.ts +34 -0
  91. package/build/tools/updateIssueComment.d.ts +13 -0
  92. package/build/tools/updateProject.d.ts +21 -0
  93. package/build/tools/updatePullRequest.d.ts +20 -0
  94. package/build/tools/updatePullRequestComment.d.ts +16 -0
  95. package/build/tools/updateVersionMilestone.d.ts +17 -0
  96. package/build/tools/updateWatching.d.ts +11 -0
  97. package/build/tools/updateWiki.d.ts +13 -0
  98. package/build/types/mcp.d.ts +10 -0
  99. package/build/types/result.d.ts +10 -0
  100. package/build/types/tool.d.ts +24 -0
  101. package/build/types/toolsets.d.ts +16 -0
  102. package/build/types/zod/backlogOutputDefinition.d.ts +3334 -0
  103. package/build/types/zod/backlogOutputDefinition.js +0 -16
  104. package/build/utils/backlogClientRegistry.d.ts +28 -0
  105. package/build/utils/backlogClientRegistry.js +4 -0
  106. package/build/utils/backlogOrganizationContext.d.ts +2 -0
  107. package/build/utils/generateFieldsDescription.d.ts +5 -0
  108. package/build/utils/logger.d.ts +2 -0
  109. package/build/utils/logger.js +27 -14
  110. package/build/utils/resolveIdOrKey.d.ts +18 -0
  111. package/build/utils/runToolSafely.d.ts +6 -0
  112. package/build/utils/tokenCounter.d.ts +1 -0
  113. package/build/utils/toolRegistrar.d.ts +5 -0
  114. package/build/utils/toolsetUtils.d.ts +6 -0
  115. package/build/utils/toolsetUtils.js +0 -20
  116. package/build/utils/wrapServerWithToolRegistry.d.ts +6 -0
  117. package/package.json +11 -2
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { PullRequestCountSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getPullRequestsCountSchema: (t: TranslationHelper["t"]) => {
7
+ projectId: z.ZodOptional<z.ZodNumber>;
8
+ projectKey: z.ZodOptional<z.ZodString>;
9
+ repoId: z.ZodOptional<z.ZodNumber>;
10
+ repoName: z.ZodOptional<z.ZodString>;
11
+ statusId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
12
+ assigneeId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
13
+ issueId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
14
+ createdUserId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
15
+ };
16
+ export declare const getPullRequestsCountTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getPullRequestsCountSchema>, (typeof PullRequestCountSchema)["shape"]>;
17
+ export {};
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { RelatedIssueSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getRelatedIssuesSchema: (t: TranslationHelper["t"]) => {
7
+ issueId: z.ZodOptional<z.ZodNumber>;
8
+ issueKey: z.ZodOptional<z.ZodString>;
9
+ };
10
+ export declare const getRelatedIssuesTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getRelatedIssuesSchema>, (typeof RelatedIssueSchema)["shape"]>;
11
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Backlog } from 'backlog-js';
2
+ import { ToolDefinition } from '../types/tool.js';
3
+ import { TranslationHelper } from '../createTranslationHelper.js';
4
+ import { ResolutionSchema } from '../types/zod/backlogOutputDefinition.js';
5
+ declare const getResolutionsSchema: (t: TranslationHelper["t"]) => {};
6
+ export declare const getResolutionsTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getResolutionsSchema>, (typeof ResolutionSchema)["shape"]>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Backlog } from 'backlog-js';
2
+ import { ToolDefinition } from '../types/tool.js';
3
+ import { TranslationHelper } from '../createTranslationHelper.js';
4
+ import { SpaceSchema } from '../types/zod/backlogOutputDefinition.js';
5
+ declare const getSpaceSchema: (t: TranslationHelper["t"]) => {};
6
+ export declare const getSpaceTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getSpaceSchema>, (typeof SpaceSchema)["shape"]>;
7
+ export {};
@@ -0,0 +1,45 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { ActivitySchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getSpaceActivitiesSchema: (t: TranslationHelper["t"]) => {
7
+ activityTypeId: z.ZodOptional<z.ZodArray<z.ZodEnum<{
8
+ Undefined: number;
9
+ IssueCreated: number;
10
+ IssueUpdated: number;
11
+ IssueCommented: number;
12
+ IssueDeleted: number;
13
+ WikiCreated: number;
14
+ WikiUpdated: number;
15
+ WikiDeleted: number;
16
+ FileAdded: number;
17
+ FileUpdated: number;
18
+ FileDeleted: number;
19
+ SvnCommitted: number;
20
+ GitPushed: number;
21
+ GitRepositoryCreated: number;
22
+ IssueMultiUpdated: number;
23
+ ProjectUserAdded: number;
24
+ ProjectUserRemoved: number;
25
+ NotifyAdded: number;
26
+ PullRequestAdded: number;
27
+ PullRequestUpdated: number;
28
+ PullRequestCommented: number;
29
+ PullRequestMerged: number;
30
+ MilestoneCreated: number;
31
+ MilestoneUpdated: number;
32
+ MilestoneDeleted: number;
33
+ ProjectGroupAdded: number;
34
+ ProjectGroupDeleted: number;
35
+ }>>>;
36
+ minId: z.ZodOptional<z.ZodNumber>;
37
+ maxId: z.ZodOptional<z.ZodNumber>;
38
+ count: z.ZodOptional<z.ZodNumber>;
39
+ order: z.ZodOptional<z.ZodEnum<{
40
+ asc: "asc";
41
+ desc: "desc";
42
+ }>>;
43
+ };
44
+ export declare const getSpaceActivitiesTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getSpaceActivitiesSchema>, (typeof ActivitySchema)["shape"]>;
45
+ export {};
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { ActivitySchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getUserRecentUpdatesSchema: (t: TranslationHelper["t"]) => {
7
+ userId: z.ZodNumber;
8
+ activityTypeId: z.ZodOptional<z.ZodArray<z.ZodEnum<{
9
+ Undefined: number;
10
+ IssueCreated: number;
11
+ IssueUpdated: number;
12
+ IssueCommented: number;
13
+ IssueDeleted: number;
14
+ WikiCreated: number;
15
+ WikiUpdated: number;
16
+ WikiDeleted: number;
17
+ FileAdded: number;
18
+ FileUpdated: number;
19
+ FileDeleted: number;
20
+ SvnCommitted: number;
21
+ GitPushed: number;
22
+ GitRepositoryCreated: number;
23
+ IssueMultiUpdated: number;
24
+ ProjectUserAdded: number;
25
+ ProjectUserRemoved: number;
26
+ NotifyAdded: number;
27
+ PullRequestAdded: number;
28
+ PullRequestUpdated: number;
29
+ PullRequestCommented: number;
30
+ PullRequestMerged: number;
31
+ MilestoneCreated: number;
32
+ MilestoneUpdated: number;
33
+ MilestoneDeleted: number;
34
+ ProjectGroupAdded: number;
35
+ ProjectGroupDeleted: number;
36
+ }>>>;
37
+ minId: z.ZodOptional<z.ZodNumber>;
38
+ maxId: z.ZodOptional<z.ZodNumber>;
39
+ count: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
40
+ order: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
41
+ asc: "asc";
42
+ desc: "desc";
43
+ }>>>;
44
+ };
45
+ export declare const getUserRecentUpdatesTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getUserRecentUpdatesSchema>, (typeof ActivitySchema)["shape"]>;
46
+ export {};
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { StarCountSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getUserStarsCountSchema: (t: TranslationHelper["t"]) => {
7
+ userId: z.ZodNumber;
8
+ since: z.ZodOptional<z.ZodString>;
9
+ until: z.ZodOptional<z.ZodString>;
10
+ };
11
+ export declare const getUserStarsCountTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getUserStarsCountSchema>, (typeof StarCountSchema)["shape"]>;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Backlog } from 'backlog-js';
2
+ import { ToolDefinition } from '../types/tool.js';
3
+ import { TranslationHelper } from '../createTranslationHelper.js';
4
+ import { UserSchema } from '../types/zod/backlogOutputDefinition.js';
5
+ declare const getUsersSchema: (t: TranslationHelper["t"]) => {};
6
+ export declare const getUsersTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getUsersSchema>, (typeof UserSchema)["shape"]>;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { VersionSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getVersionMilestoneListSchema: (t: TranslationHelper["t"]) => {
7
+ projectId: z.ZodOptional<z.ZodNumber>;
8
+ projectKey: z.ZodOptional<z.ZodString>;
9
+ };
10
+ export declare const getVersionMilestoneListTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getVersionMilestoneListSchema>, (typeof VersionSchema)["shape"]>;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { WatchingListCountSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getWatchingListCountSchema: (t: TranslationHelper["t"]) => {
7
+ userId: z.ZodNumber;
8
+ };
9
+ export declare const getWatchingListCountTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getWatchingListCountSchema>, (typeof WatchingListCountSchema)["shape"]>;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { WatchingListItemSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getWatchingListItemsSchema: (t: TranslationHelper["t"]) => {
7
+ userId: z.ZodNumber;
8
+ };
9
+ export declare const getWatchingListItemsTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getWatchingListItemsSchema>, (typeof WatchingListItemSchema)["shape"]>;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { WikiSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getWikiSchema: (t: TranslationHelper["t"]) => {
7
+ wikiId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
8
+ };
9
+ export declare const getWikiTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getWikiSchema>, (typeof WikiSchema)["shape"]>;
10
+ export {};
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { WikiListItemSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getWikiPagesSchema: (t: TranslationHelper["t"]) => {
7
+ projectId: z.ZodOptional<z.ZodNumber>;
8
+ projectKey: z.ZodOptional<z.ZodString>;
9
+ keyword: z.ZodOptional<z.ZodString>;
10
+ };
11
+ export declare const getWikiPagesTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getWikiPagesSchema>, (typeof WikiListItemSchema)["shape"]>;
12
+ export {};
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { WikiCountSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const getWikisCountSchema: (t: TranslationHelper["t"]) => {
7
+ projectId: z.ZodOptional<z.ZodNumber>;
8
+ projectKey: z.ZodOptional<z.ZodString>;
9
+ };
10
+ export declare const getWikisCountTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof getWikisCountSchema>, (typeof WikiCountSchema)["shape"]>;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ declare const markNotificationAsReadSchema: (t: TranslationHelper["t"]) => {
6
+ id: z.ZodNumber;
7
+ };
8
+ export declare const MarkNotificationAsReadResultSchema: z.ZodObject<{
9
+ success: z.ZodBoolean;
10
+ message: z.ZodString;
11
+ }, z.core.$strip>;
12
+ export declare const markNotificationAsReadTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof markNotificationAsReadSchema>, (typeof MarkNotificationAsReadResultSchema)["shape"]>;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ declare const markWatchingAsReadSchema: (t: TranslationHelper["t"]) => {
6
+ watchId: z.ZodNumber;
7
+ };
8
+ export declare const MarkWatchingAsReadResultSchema: z.ZodObject<{
9
+ success: z.ZodBoolean;
10
+ message: z.ZodString;
11
+ }, z.core.$strip>;
12
+ export declare const markWatchingAsReadTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof markWatchingAsReadSchema>, (typeof MarkWatchingAsReadResultSchema)["shape"]>;
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { RelatedIssueSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const removeRelatedIssueSchema: (t: TranslationHelper["t"]) => {
7
+ issueId: z.ZodOptional<z.ZodNumber>;
8
+ issueKey: z.ZodOptional<z.ZodString>;
9
+ relatedIssueId: z.ZodNumber;
10
+ };
11
+ export declare const removeRelatedIssueTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof removeRelatedIssueSchema>, (typeof RelatedIssueSchema)["shape"]>;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Backlog } from 'backlog-js';
2
+ import { ToolDefinition } from '../types/tool.js';
3
+ import { TranslationHelper } from '../createTranslationHelper.js';
4
+ import { NotificationCountSchema } from '../types/zod/backlogOutputDefinition.js';
5
+ declare const resetUnreadNotificationCountSchema: (t: TranslationHelper["t"]) => {};
6
+ export declare const resetUnreadNotificationCountTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof resetUnreadNotificationCountSchema>, (typeof NotificationCountSchema)["shape"]>;
7
+ export {};
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import { TranslationHelper } from '../../createTranslationHelper.js';
3
+ export declare const buildCustomFieldFilterSchema: (t: TranslationHelper["t"]) => z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ type: z.ZodLiteral<"text">;
5
+ id: z.ZodNumber;
6
+ value: z.ZodString;
7
+ }, z.core.$strip>, z.ZodObject<{
8
+ type: z.ZodLiteral<"numeric">;
9
+ id: z.ZodNumber;
10
+ min: z.ZodOptional<z.ZodNumber>;
11
+ max: z.ZodOptional<z.ZodNumber>;
12
+ }, z.core.$strip>, z.ZodObject<{
13
+ type: z.ZodLiteral<"date">;
14
+ id: z.ZodNumber;
15
+ min: z.ZodOptional<z.ZodString>;
16
+ max: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ type: z.ZodLiteral<"list">;
19
+ id: z.ZodNumber;
20
+ value: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
21
+ }, z.core.$strip>], "type">;
@@ -0,0 +1,4 @@
1
+ import { Backlog } from 'backlog-js';
2
+ import { TranslationHelper } from '../createTranslationHelper.js';
3
+ import { ToolsetGroup } from '../types/toolsets.js';
4
+ export declare const allTools: (backlog: Backlog, helper: TranslationHelper) => ToolsetGroup;
@@ -0,0 +1,34 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { IssueSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const updateIssueSchema: (t: TranslationHelper["t"]) => {
7
+ issueId: z.ZodOptional<z.ZodNumber>;
8
+ issueKey: z.ZodOptional<z.ZodString>;
9
+ summary: z.ZodOptional<z.ZodString>;
10
+ issueTypeId: z.ZodOptional<z.ZodNumber>;
11
+ priorityId: z.ZodOptional<z.ZodNumber>;
12
+ description: z.ZodOptional<z.ZodString>;
13
+ startDate: z.ZodOptional<z.ZodString>;
14
+ dueDate: z.ZodOptional<z.ZodString>;
15
+ estimatedHours: z.ZodOptional<z.ZodNumber>;
16
+ actualHours: z.ZodOptional<z.ZodNumber>;
17
+ categoryId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
18
+ versionId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
19
+ milestoneId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
20
+ statusId: z.ZodOptional<z.ZodNumber>;
21
+ resolutionId: z.ZodOptional<z.ZodNumber>;
22
+ assigneeId: z.ZodOptional<z.ZodNumber>;
23
+ notifiedUserId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
24
+ attachmentId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
25
+ parentIssueId: z.ZodOptional<z.ZodNumber>;
26
+ comment: z.ZodOptional<z.ZodString>;
27
+ customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
+ id: z.ZodNumber;
29
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>]>>;
30
+ otherValue: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>>>;
32
+ };
33
+ export declare const updateIssueTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof updateIssueSchema>, (typeof IssueSchema)["shape"]>;
34
+ export {};
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { IssueCommentSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const updateIssueCommentSchema: (t: TranslationHelper["t"]) => {
7
+ issueId: z.ZodOptional<z.ZodNumber>;
8
+ issueKey: z.ZodOptional<z.ZodString>;
9
+ commentId: z.ZodNumber;
10
+ content: z.ZodString;
11
+ };
12
+ export declare const updateIssueCommentTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof updateIssueCommentSchema>, (typeof IssueCommentSchema)["shape"]>;
13
+ export {};
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { ProjectSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const updateProjectSchema: (t: TranslationHelper["t"]) => {
7
+ projectId: z.ZodOptional<z.ZodNumber>;
8
+ projectKey: z.ZodOptional<z.ZodString>;
9
+ name: z.ZodOptional<z.ZodString>;
10
+ key: z.ZodOptional<z.ZodString>;
11
+ chartEnabled: z.ZodOptional<z.ZodBoolean>;
12
+ subtaskingEnabled: z.ZodOptional<z.ZodBoolean>;
13
+ projectLeaderCanEditProjectLeader: z.ZodOptional<z.ZodBoolean>;
14
+ textFormattingRule: z.ZodOptional<z.ZodEnum<{
15
+ backlog: "backlog";
16
+ markdown: "markdown";
17
+ }>>;
18
+ archived: z.ZodOptional<z.ZodBoolean>;
19
+ };
20
+ export declare const updateProjectTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof updateProjectSchema>, (typeof ProjectSchema)["shape"]>;
21
+ export {};
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { PullRequestSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const updatePullRequestSchema: (t: TranslationHelper["t"]) => {
7
+ projectId: z.ZodOptional<z.ZodNumber>;
8
+ projectKey: z.ZodOptional<z.ZodString>;
9
+ repoId: z.ZodOptional<z.ZodNumber>;
10
+ repoName: z.ZodOptional<z.ZodString>;
11
+ number: z.ZodNumber;
12
+ summary: z.ZodOptional<z.ZodString>;
13
+ description: z.ZodOptional<z.ZodString>;
14
+ issueId: z.ZodOptional<z.ZodNumber>;
15
+ assigneeId: z.ZodOptional<z.ZodNumber>;
16
+ notifiedUserId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
17
+ statusId: z.ZodOptional<z.ZodNumber>;
18
+ };
19
+ export declare const updatePullRequestTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof updatePullRequestSchema>, (typeof PullRequestSchema)["shape"]>;
20
+ export {};
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { PullRequestCommentSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const updatePullRequestCommentSchema: (t: TranslationHelper["t"]) => {
7
+ projectId: z.ZodOptional<z.ZodNumber>;
8
+ projectKey: z.ZodOptional<z.ZodString>;
9
+ repoId: z.ZodOptional<z.ZodNumber>;
10
+ repoName: z.ZodOptional<z.ZodString>;
11
+ number: z.ZodNumber;
12
+ commentId: z.ZodNumber;
13
+ content: z.ZodString;
14
+ };
15
+ export declare const updatePullRequestCommentTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof updatePullRequestCommentSchema>, (typeof PullRequestCommentSchema)["shape"]>;
16
+ export {};
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { VersionSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const updateVersionMilestoneSchema: (t: TranslationHelper["t"]) => {
7
+ projectId: z.ZodOptional<z.ZodNumber>;
8
+ projectKey: z.ZodOptional<z.ZodString>;
9
+ id: z.ZodNumber;
10
+ name: z.ZodString;
11
+ description: z.ZodOptional<z.ZodString>;
12
+ startDate: z.ZodOptional<z.ZodString>;
13
+ releaseDueDate: z.ZodOptional<z.ZodString>;
14
+ archived: z.ZodOptional<z.ZodBoolean>;
15
+ };
16
+ export declare const updateVersionMilestoneTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof updateVersionMilestoneSchema>, (typeof VersionSchema)["shape"]>;
17
+ export {};
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { WatchingListItemSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const updateWatchingSchema: (t: TranslationHelper["t"]) => {
7
+ watchId: z.ZodNumber;
8
+ note: z.ZodString;
9
+ };
10
+ export declare const updateWatchingTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof updateWatchingSchema>, (typeof WatchingListItemSchema)["shape"]>;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { Backlog } from 'backlog-js';
3
+ import { ToolDefinition } from '../types/tool.js';
4
+ import { TranslationHelper } from '../createTranslationHelper.js';
5
+ import { WikiSchema } from '../types/zod/backlogOutputDefinition.js';
6
+ declare const updateWikiSchema: (t: TranslationHelper["t"]) => {
7
+ wikiId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
8
+ name: z.ZodOptional<z.ZodString>;
9
+ content: z.ZodOptional<z.ZodString>;
10
+ mailNotify: z.ZodOptional<z.ZodBoolean>;
11
+ };
12
+ export declare const updateWikiTool: (backlog: Backlog, { t }: TranslationHelper) => ToolDefinition<ReturnType<typeof updateWikiSchema>, (typeof WikiSchema)["shape"]>;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ export type MCPOptions = {
2
+ useFields: boolean;
3
+ maxTokens: number;
4
+ prefix: string;
5
+ /**
6
+ * Whether tools take an `organization` parameter. Only true when more than one
7
+ * Backlog space is configured; see `BacklogClientRegistry.isMultiOrganization`.
8
+ */
9
+ useOrganization: boolean;
10
+ };
@@ -0,0 +1,10 @@
1
+ export type ErrorLike = {
2
+ kind: 'error';
3
+ message: string;
4
+ };
5
+ export type Success<T> = {
6
+ kind: 'ok';
7
+ data: T;
8
+ };
9
+ export type SafeResult<T> = Success<T> | ErrorLike;
10
+ export declare function isErrorLike<T>(res: SafeResult<T>): res is ErrorLike;
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ import { TranslationHelper } from '../createTranslationHelper.js';
3
+ import { CallToolResult } from '@modelcontextprotocol/server';
4
+ export type ToolDefinition<Shape extends z.ZodRawShape, OutputShape extends z.ZodRawShape> = {
5
+ name: string;
6
+ description: string;
7
+ schema: z.ZodObject<Shape>;
8
+ outputSchema: z.ZodObject<OutputShape>;
9
+ handler: (input: z.infer<z.ZodObject<Shape>> & {
10
+ fields?: string;
11
+ organization?: string;
12
+ }) => Promise<z.infer<z.ZodObject<OutputShape>> | z.infer<z.ZodObject<OutputShape>>[]>;
13
+ importantFields?: (keyof z.infer<z.ZodObject<OutputShape>>)[];
14
+ };
15
+ export declare const buildToolSchema: <T extends z.ZodRawShape>(fn: (t: TranslationHelper["t"]) => T) => (t: TranslationHelper["t"]) => T;
16
+ export type DynamicToolDefinition<Shape extends z.ZodRawShape> = {
17
+ name: string;
18
+ description: string;
19
+ schema: z.ZodObject<Shape>;
20
+ handler: (input: z.infer<z.ZodObject<Shape>>) => Promise<CallToolResult>;
21
+ };
22
+ export interface ToolRegistrar {
23
+ enableToolsetAndRefresh(toolset: string): Promise<string>;
24
+ }
@@ -0,0 +1,16 @@
1
+ import { DynamicToolDefinition, ToolDefinition } from './tool.js';
2
+ type BaseToolset<TTool> = {
3
+ name: string;
4
+ description: string;
5
+ enabled: boolean;
6
+ tools: TTool[];
7
+ };
8
+ export type Toolset = BaseToolset<ToolDefinition<any, any>>;
9
+ export type ToolsetGroup = {
10
+ toolsets: Toolset[];
11
+ };
12
+ export type DynamicToolset = BaseToolset<DynamicToolDefinition<any>>;
13
+ export type DynamicToolsetGroup = {
14
+ toolsets: DynamicToolset[];
15
+ };
16
+ export {};