get_activities
Retrieve the complete activity history and timeline for a Bitbucket pull request, including comments, reviews, commits, and other timeline events.
Instructions
Retrieve all activities for a pull request including comments, reviews, commits, and other timeline events. Use this to get the complete activity history and timeline of the pull request.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Bitbucket project key. If omitted, uses BITBUCKET_DEFAULT_PROJECT environment variable. | |
| repository | Yes | Repository slug containing the pull request. | |
| prId | Yes | Pull request ID to get activities for. |
Implementation Reference
- src/index.ts:974-991 (handler)The main handler function `getActivities` that fetches the activities for a specified pull request from the Bitbucket API endpoint `/pull-requests/{prId}/activities` and returns the response as formatted JSON.private async getActivities(params: PullRequestParams) { const { project, repository, prId } = params; if (!project || !repository || !prId) { throw new McpError( ErrorCode.InvalidParams, 'Project, repository, and prId are required' ); } const response = await this.api.get( `/projects/${project}/repos/${repository}/pull-requests/${prId}/activities` ); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] }; }
- src/index.ts:317-329 (schema)The input schema definition for the 'get_activities' tool, specifying the required parameters: repository and prId, with optional project.{ name: 'get_activities', description: 'Retrieve all activities for a pull request including comments, reviews, commits, and other timeline events. Use this to get the complete activity history and timeline of the pull request.', inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Bitbucket project key. If omitted, uses BITBUCKET_DEFAULT_PROJECT environment variable.' }, repository: { type: 'string', description: 'Repository slug containing the pull request.' }, prId: { type: 'number', description: 'Pull request ID to get activities for.' } }, required: ['repository', 'prId'] } },
- src/index.ts:529-536 (registration)The switch case registration in the CallToolRequestSchema handler that processes the tool call by constructing parameters and invoking the getActivities handler.case 'get_activities': { const activitiesPrParams: PullRequestParams = { project: getProject(args.project as string), repository: args.repository as string, prId: args.prId as number }; return await this.getActivities(activitiesPrParams); }