get_watching_list_items
Retrieve a user's list of watching items from Backlog project management tools by providing the user ID, enabling efficient tracking of monitored tasks and issues.
Instructions
Returns list of watching items for a user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | User ID |
Implementation Reference
- src/tools/getWatchingListItems.ts:13-30 (handler)Factory function defining the MCP tool 'get_watching_list_items', including its input/output schemas, description, and handler that executes backlog.getWatchingListItems(userId). This is the core implementation of the tool logic.export const getWatchingListItemsTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getWatchingListItemsSchema>, (typeof WatchingListItemSchema)['shape'] > => { return { name: 'get_watching_list_items', description: t( 'TOOL_GET_WATCHING_LIST_ITEMS_DESCRIPTION', 'Returns list of watching items for a user' ), schema: z.object(getWatchingListItemsSchema(t)), outputSchema: WatchingListItemSchema, handler: async ({ userId }) => backlog.getWatchingListItems(userId), }; };
- Input schema definition for the get_watching_list_items tool, specifying the userId as a required number parameter.const getWatchingListItemsSchema = buildToolSchema((t) => ({ userId: z .number() .describe(t('TOOL_GET_WATCHING_LIST_ITEMS_USER_ID', 'User ID')), }));
- src/tools/tools.ts:101-101 (registration)The tool is registered/added to the 'issue' toolset group by invoking the factory function with the backlog client and translation helper.getWatchingListItemsTool(backlog, helper),
- src/tools/tools.ts:35-35 (registration)Import of the getWatchingListItemsTool factory for use in toolset registration.import { getWatchingListItemsTool } from './getWatchingListItems.js';