get_watching_list_count
Track the number of watching items for a specific user in Backlog. Input the userId to retrieve the count, enabling efficient monitoring of watched tasks and issues.
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)Exports the MCP tool definition for 'get_watching_list_count', including input schema construction, output schema reference, and the handler function that delegates to backlog.getWatchingListCount(userId). This is the core implementation of the tool logic.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), }; };
- Defines the input schema for the get_watching_list_count tool, requiring a userId (number).const getWatchingListCountSchema = buildToolSchema((t) => ({ userId: z .number() .describe(t('TOOL_GET_WATCHING_LIST_COUNT_USER_ID', 'User ID')), }));
- Defines the output schema for the watching list count response, which is an object with a 'count' number field.export const WatchingListCountSchema = z.object({ count: z.number(), });
- src/tools/tools.ts:102-102 (registration)Registers/instantiates the getWatchingListCountTool within the 'issue' toolset group in the allTools export.getWatchingListCountTool(backlog, helper),
- src/tools/tools.ts:34-34 (registration)Imports the getWatchingListCountTool for use in tool registration.import { getWatchingListCountTool } from './getWatchingListCount.js';