get_space_activities
Retrieve a list of space activities from your Backlog project management tool, filterable by activity type, ID range, count, sort order, and organization.
Instructions
Returns list of space activities
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activityTypeId | No | Activity type IDs | |
| minId | No | Minimum activity ID | |
| maxId | No | Maximum activity ID | |
| count | No | Number of activities to retrieve | |
| order | No | Sort order | |
| organization | No | Optional organization name. Use list_organizations to inspect available organizations. |
Implementation Reference
- src/tools/getSpaceActivities.ts:39-63 (handler)The main tool handler function that defines the 'get_space_activities' tool. It accepts activityTypeId (array of activity types), minId, maxId, count (1-100), and order (asc/desc) parameters and calls backlog.getSpaceActivities() to return a list of space activities.
export const getSpaceActivitiesTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getSpaceActivitiesSchema>, (typeof ActivitySchema)['shape'] > => { return { name: 'get_space_activities', description: t( 'TOOL_GET_SPACE_ACTIVITIES_DESCRIPTION', 'Returns list of space activities' ), schema: z.object(getSpaceActivitiesSchema(t)), outputSchema: ActivitySchema, handler: async ({ activityTypeId, minId, maxId, count, order }) => backlog.getSpaceActivities({ activityTypeId, minId, maxId, count, order, }), }; }; - Input schema definition for 'get_space_activities' using buildToolSchema. Defines parameters: activityTypeId (array of ActivityTypeSchema), minId (number), maxId (number), count (number 1-100), order (enum 'asc'|'desc').
const getSpaceActivitiesSchema = buildToolSchema((t) => ({ activityTypeId: z .array(ActivityTypeSchema) .optional() .describe( t('TOOL_GET_SPACE_ACTIVITIES_ACTIVITY_TYPE_ID', 'Activity type IDs') ), minId: z .number() .optional() .describe(t('TOOL_GET_SPACE_ACTIVITIES_MIN_ID', 'Minimum activity ID')), maxId: z .number() .optional() .describe(t('TOOL_GET_SPACE_ACTIVITIES_MAX_ID', 'Maximum activity ID')), count: z .number() .min(1) .max(100) .optional() .describe( t('TOOL_GET_SPACE_ACTIVITIES_COUNT', 'Number of activities to retrieve') ), order: z .enum(['asc', 'desc']) .optional() .describe(t('TOOL_GET_SPACE_ACTIVITIES_ORDER', 'Sort order')), })); - ActivitySchema - the output schema for space activities. Contains id, project (ProjectSchema), type (ActivityTypeSchema), content, notifications, createdUser, and created fields.
export const ActivitySchema = z.object({ id: z.number(), project: ProjectSchema, type: ActivityTypeSchema, content: z.any(), notifications: z.array(z.any()), createdUser: UserSchema, created: z.string(), }); - ActivityTypeSchema - enum used for activityTypeId input parameter and the type field in ActivitySchema. Defines all activity types (IssueCreated, IssueUpdated, GitPushed, etc.).
export const ActivityTypeSchema = z.nativeEnum({ Undefined: -1, IssueCreated: 1, IssueUpdated: 2, IssueCommented: 3, IssueDeleted: 4, WikiCreated: 5, WikiUpdated: 6, WikiDeleted: 7, FileAdded: 8, FileUpdated: 9, FileDeleted: 10, SvnCommitted: 11, GitPushed: 12, GitRepositoryCreated: 13, IssueMultiUpdated: 14, ProjectUserAdded: 15, ProjectUserRemoved: 16, NotifyAdded: 17, PullRequestAdded: 18, PullRequestUpdated: 19, PullRequestCommented: 20, PullRequestMerged: 21, MilestoneCreated: 22, MilestoneUpdated: 23, MilestoneDeleted: 24, ProjectGroupAdded: 25, ProjectGroupDeleted: 26, }); - src/tools/tools.ts:34-75 (registration)Registration: getSpaceActivitiesTool is imported and included in the 'space' toolset within the allTools() function, making it available as part of the Backlog MCP tool collection.
import { getSpaceActivitiesTool } from './getSpaceActivities.js'; import { getUserStarsCountTool } from './getUserStarsCount.js'; import { getUsersTool } from './getUsers.js'; import { getUserRecentUpdatesTool } from './getUserRecentUpdates.js'; import { getWatchingListCountTool } from './getWatchingListCount.js'; import { getWatchingListItemsTool } from './getWatchingListItems.js'; import { addWatchingTool } from './addWatching.js'; import { updateWatchingTool } from './updateWatching.js'; import { deleteWatchingTool } from './deleteWatching.js'; import { markWatchingAsReadTool } from './markWatchingAsRead.js'; import { getWikiTool } from './getWiki.js'; import { getWikiPagesTool } from './getWikiPages.js'; import { getWikisCountTool } from './getWikisCount.js'; import { markNotificationAsReadTool } from './markNotificationAsRead.js'; import { resetUnreadNotificationCountTool } from './resetUnreadNotificationCount.js'; import { updateIssueTool } from './updateIssue.js'; import { updateProjectTool } from './updateProject.js'; import { updatePullRequestTool } from './updatePullRequest.js'; import { updatePullRequestCommentTool } from './updatePullRequestComment.js'; import { getDocumentTool } from './getDocument.js'; import { getDocumentsTool } from './getDocuments.js'; import { getDocumentTreeTool } from './getDocumentTree.js'; import { getVersionMilestoneListTool } from './getVersionMilestoneList.js'; import { addVersionMilestoneTool } from './addVersionMilestone.js'; import { updateVersionMilestoneTool } from './updateVersionMilestone.js'; import { deleteVersionTool } from './deleteVersion.js'; import { addDocumentTool } from './addDocument.js'; export const allTools = ( backlog: Backlog, helper: TranslationHelper ): ToolsetGroup => { return { toolsets: [ { name: 'space', description: 'Tools for managing Backlog space settings and general information.', enabled: false, tools: [ getSpaceTool(backlog, helper), getSpaceActivitiesTool(backlog, helper),