Skip to main content
Glama
nulab

Backlog MCP Server

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

Implementation Reference

  • 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(),
    });
  • Registration of the getWatchingListCountTool into the 'issue' toolset group in the allTools function.
    getWatchingListCountTool(backlog, helper),
  • Import of the getWatchingListCountTool for use in toolset 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