Skip to main content
Glama

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
NameRequiredDescriptionDefault
userIdYesUser ID

Implementation Reference

  • 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(), });
  • Registers/instantiates the getWatchingListCountTool within the 'issue' toolset group in the allTools export.
    getWatchingListCountTool(backlog, helper),
  • Imports the getWatchingListCountTool for use in tool registration.
    import { getWatchingListCountTool } from './getWatchingListCount.js';

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nulab/backlog-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server