get_watching_list_count
Count how many items a user is watching in Backlog to track their monitoring workload and prioritize notifications.
Instructions
Returns count of watching items for a user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | User ID |
Implementation Reference
- src/tools/getWatchingListCount.ts:13-30 (handler)The primary handler implementation for the 'get_watching_list_count' tool. It defines the tool including name, description, input/output schemas, and the async handler that calls backlog.getWatchingListCount(userId).export const getWatchingListCountTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getWatchingListCountSchema>, (typeof WatchingListCountSchema)['shape'] > => { return { name: 'get_watching_list_count', description: t( 'TOOL_GET_WATCHING_LIST_COUNT_DESCRIPTION', 'Returns count of watching items for a user' ), schema: z.object(getWatchingListCountSchema(t)), outputSchema: WatchingListCountSchema, handler: async ({ userId }) => backlog.getWatchingListCount(userId), }; };
- Input schema for the tool, defining the 'userId' parameter as a number.const getWatchingListCountSchema = buildToolSchema((t) => ({ userId: z .number() .describe(t('TOOL_GET_WATCHING_LIST_COUNT_USER_ID', 'User ID')), }));
- Output schema for the tool response, defining a 'count' number field.export const WatchingListCountSchema = z.object({ count: z.number(), });
- src/tools/tools.ts:107-107 (registration)Registration of the getWatchingListCountTool into the 'issue' toolset group in the allTools function.getWatchingListCountTool(backlog, helper),
- src/tools/tools.ts:35-35 (registration)Import of the getWatchingListCountTool for use in toolset registration.import { getWatchingListCountTool } from './getWatchingListCount.js';