11import { connectServer , createMcpServer , formatToolResponse , initializeRuntimeConfig } from '@atlassian-dc-mcp/common' ;
22import { BitbucketService , bitbucketToolSchemas } from './bitbucket-service.js' ;
33import { getBitbucketRuntimeConfig , getDefaultPageSize } from './config.js' ;
4+ import { createRequire } from 'node:module' ;
5+
6+ const require = createRequire ( import . meta. url ) ;
7+ const { version } = require ( '../package.json' ) ;
48
59initializeRuntimeConfig ( ) ;
610
@@ -20,7 +24,7 @@ const bitbucketService = new BitbucketService(
2024
2125const server = createMcpServer ( {
2226 name : "atlassian-bitbucket-mcp" ,
23- version : "0.1.0"
27+ version
2428} ) ;
2529
2630server . tool (
@@ -97,16 +101,8 @@ server.tool(
97101 "bitbucket_getPR_CommentsAndAction" ,
98102 "Get comments for a Bitbucket pull request and other actions, like approvals" ,
99103 bitbucketToolSchemas . getPullRequestComments ,
100- async ( { projectKey, repositorySlug, pullRequestId, start, limit, output, includeResolved } ) => {
101- const result = await bitbucketService . getPullRequestCommentsAndActions (
102- projectKey ,
103- repositorySlug ,
104- pullRequestId ,
105- start ,
106- limit ,
107- output ,
108- includeResolved
109- ) ;
104+ async ( { projectKey, repositorySlug, pullRequestId, start, limit, output } ) => {
105+ const result = await bitbucketService . getPullRequestCommentsAndActions ( projectKey , repositorySlug , pullRequestId , start , limit , output ) ;
110106 return formatToolResponse ( result ) ;
111107 }
112108) ;
0 commit comments