Skip to main content
Glama
nulab

Backlog MCP Server

get_wikis_count

Retrieves the total count of wiki pages in a Backlog project by providing the project ID or key.

Instructions

Returns count of wiki pages in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe numeric ID of the project (e.g., 12345)
projectKeyNoThe key of the project (e.g., 'PROJECT')
organizationNoOptional organization name. Use list_organizations to inspect available organizations.

Implementation Reference

  • The main handler function 'getWikisCountTool' defining the tool. It accepts a backlog client and translation helper, returns a ToolDefinition with name 'get_wikis_count'. The handler resolves project ID or key via resolveIdOrKey and calls backlog.getWikisCount().
    export const getWikisCountTool = (
      backlog: Backlog,
      { t }: TranslationHelper
    ): ToolDefinition<
      ReturnType<typeof getWikisCountSchema>,
      (typeof WikiCountSchema)['shape']
    > => {
      return {
        name: 'get_wikis_count',
        description: t(
          'TOOL_GET_WIKIS_COUNT_DESCRIPTION',
          'Returns count of wiki pages in a project'
        ),
        schema: z.object(getWikisCountSchema(t)),
        outputSchema: WikiCountSchema,
        handler: async ({ projectId, projectKey }) => {
          const result = resolveIdOrKey(
            'project',
            { id: projectId, key: projectKey },
            t
          );
          if (!result.ok) {
            throw result.error;
          }
          return backlog.getWikisCount(result.value);
        },
      };
    };
  • Input schema 'getWikisCountSchema' defining optional 'projectId' (number) and 'projectKey' (string) parameters.
    const getWikisCountSchema = buildToolSchema((t) => ({
      projectId: z
        .number()
        .optional()
        .describe(
          t(
            'TOOL_GET_WIKIS_COUNT_PROJECT_ID',
            'The numeric ID of the project (e.g., 12345)'
          )
        ),
      projectKey: z
        .string()
        .optional()
        .describe(
          t(
            'TOOL_GET_WIKIS_COUNT_PROJECT_KEY',
            "The key of the project (e.g., 'PROJECT')"
          )
        ),
    }));
  • Output schema 'WikiCountSchema' — a Zod object with a single 'count' field of type number, used as the output validation for the tool.
    export const WikiCountSchema = z.object({
      count: z.number(),
    });
  • Registration of the tool within the 'wiki' toolset group. It is instantiated as getWikisCountTool(backlog, helper) and placed in the wiki tools array (line 131). Also imported at line 46.
    getWikisCountTool(backlog, helper),
  • Helper function 'resolveIdOrKey' used by the handler to resolve a project from either its numeric ID or string key, returning a Result type.
    export const resolveIdOrKey = <E extends EntityName>(
      entity: E,
      values: { id?: number; key?: string },
      t: TranslationHelper['t']
    ): ResolveResult => resolveIdOrField(entity, 'key', values, t);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states the tool returns a count, but does not mention any behavioral aspects such as whether the count includes all pages, pagination limits, or required permissions.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no unnecessary words. It efficiently states the tool's purpose without redundancy.

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

Completeness3/5

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

Given the tool's simplicity (count with 3 optional parameters, no output schema), the description is minimally adequate but lacks detail on return format and require

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 each parameter adequately. The description does not add further meaning beyond what is already in the schema, such as clarifying that at least one of projectId or projectKey is needed.

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

Purpose5/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 count of wiki pages in a project, using a specific verb ('returns') and resource ('count of wiki pages'). It distinguishes itself from the sibling tool 'get_wiki_pages' which would return the pages themselves, not the count.

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?

The description provides no guidance on when to use this tool versus alternatives like 'get_wiki_pages'. It does not specify prerequisites or context for using the count function.

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