get_watching_list_items
Retrieve a user's list of watched items from Backlog project management to track issues, projects, and resources requiring attention.
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)The tool definition including the handler function that executes the tool logic by delegating to the Backlog SDK's getWatchingListItems method with the provided userId.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 tool, specifying userId as a required number field.const getWatchingListItemsSchema = buildToolSchema((t) => ({ userId: z .number() .describe(t('TOOL_GET_WATCHING_LIST_ITEMS_USER_ID', 'User ID')), }));
- src/tools/tools.ts:36-36 (registration)Import of the getWatchingListItemsTool.import { getWatchingListItemsTool } from './getWatchingListItems.js';
- src/tools/tools.ts:106-106 (registration)Registration of the tool in the 'issue' toolset within allTools function.getWatchingListItemsTool(backlog, helper),