Skip to main content
Glama
nulab

Backlog MCP Server

get_categories

Retrieve available categories for a Backlog project to organize and classify issues effectively. Provide either project ID or key to fetch category data.

Instructions

Returns list of categories for a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe numeric ID of the project (e.g., 12345)
projectKeyNoThe numeric ID of the project (e.g., 12345)

Implementation Reference

  • The handler function that resolves the project ID or key using resolveIdOrKey and calls backlog.getCategories to retrieve the list of categories for the project.
    handler: async ({ projectId, projectKey }) => {
      const result = resolveIdOrKey(
        'project',
        { id: projectId, key: projectKey },
        t
      );
      if (!result.ok) {
        throw result.error;
      }
      return backlog.getCategories(result.value);
    },
  • Defines the Zod input schema for the tool, accepting optional projectId (number) or projectKey (string).
    const getCategoriesSchema = buildToolSchema((t) => ({
      projectId: z
        .number()
        .optional()
        .describe(
          t(
            'TOOL_GET_CATEGORIES_PROJECT_ID',
            'The numeric ID of the project (e.g., 12345)'
          )
        ),
      projectKey: z
        .string()
        .optional()
        .describe(
          t(
            'TOOL_GET_CATEGORIES_PROJECT_ID',
            "The key of the project (e.g., 'PROJECT')"
          )
        ),
    }));
  • Registers the getCategoriesTool within the 'issue' toolset group by calling the factory function with backlog and translation helper.
    getCategoriesTool(backlog, helper),
  • Imports the getCategoriesTool factory from its module.
    import { getCategoriesTool } from './getCategories.js';
  • Specifies the output schema as CategorySchema for validation of the returned categories list.
    outputSchema: CategorySchema,

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