Skip to main content
Glama
nulab

Backlog MCP Server

get_categories

Retrieves all categories associated with a specific project in Backlog. Provide project ID or key to get the category list.

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)
organizationNoOptional organization name. Use list_organizations to inspect available organizations.

Implementation Reference

  • The main handler function for the get_categories tool. It accepts projectId or projectKey, resolves the project identifier using resolveIdOrKey, and calls backlog.getCategories() to return the list of categories.
    export const getCategoriesTool = (
      backlog: Backlog,
      { t }: TranslationHelper
    ): ToolDefinition<
      ReturnType<typeof getCategoriesSchema>,
      (typeof CategorySchema)['shape']
    > => {
      return {
        name: 'get_categories',
        description: t(
          'TOOL_GET_CATEGORIES_DESCRIPTION',
          'Returns list of categories for a project'
        ),
        schema: z.object(getCategoriesSchema(t)),
        importantFields: ['id', 'projectId', 'name'],
        outputSchema: CategorySchema,
        handler: async ({ projectId, projectKey }) => {
          const result = resolveIdOrKey(
            'project',
            { id: projectId, key: projectKey },
            t
          );
          if (!result.ok) {
            throw result.error;
          }
          return backlog.getCategories(result.value);
        },
      };
  • Input schema for get_categories, defining optional projectId (number) and projectKey (string) fields using buildToolSchema.
    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')"
          )
        ),
    }));
  • Output schema (CategorySchema) for categories returned by the tool, defining fields: id, projectId, name, displayOrder.
    export const CategorySchema = z.object({
      id: z.number(),
      projectId: z.number(),
      name: z.string(),
      displayOrder: z.number(),
    });
  • Import of getCategoriesTool from getCategories.ts for registration in the toolset.
    import { getCategoriesTool } from './getCategories.js';
  • Registration of getCategoriesTool in the 'issue' toolset group within allTools.
    getCategoriesTool(backlog, helper),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, and the description lacks details on behavioral traits like error handling, authentication, or data scope beyond 'for a project'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise but slightly too brief; it could include more context without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should explain what the returned list contains (e.g., category names, IDs). It does not, leaving the agent underinformed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents parameters. The description adds minimal value beyond implying the project context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns a list of categories for a project, using a specific verb and resource. It differentiates from other get_* tools by specifying 'categories'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, such as when projectId vs projectKey is preferred, or when it should not be used.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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