Skip to main content
Glama
nulab

Backlog MCP Server

get_git_repository

Retrieve detailed information about a specific Git repository from Backlog projects using project ID, project key, repository ID, or repository name parameters.

Instructions

Returns information about a specific Git repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe numeric ID of the project (e.g., 12345)
projectKeyNoThe key of the project (e.g., 'PROJECT')
repoIdNoRepository ID
repoNameNoRepository name

Implementation Reference

  • The asynchronous handler function that executes the tool logic: resolves project ID/key and repository ID/name, then calls the Backlog API's getGitRepository method.
    handler: async ({ projectId, projectKey, repoId, repoName }) => {
      const result = resolveIdOrKey(
        'project',
        { id: projectId, key: projectKey },
        t
      );
      if (!result.ok) {
        throw result.error;
      }
      const repoResult = resolveIdOrName(
        'repository',
        { id: repoId, name: repoName },
        t
      );
      if (!repoResult.ok) {
        throw repoResult.error;
      }
      return backlog.getGitRepository(result.value, String(repoResult.value));
    },
  • Zod schema definition for the tool's input parameters: projectId/projectKey and repoId/repoName.
    const getGitRepositorySchema = buildToolSchema((t) => ({
      projectId: z
        .number()
        .optional()
        .describe(
          t(
            'TOOL_GET_GIT_REPOSITORY_PROJECT_ID',
            'The numeric ID of the project (e.g., 12345)'
          )
        ),
      projectKey: z
        .string()
        .optional()
        .describe(
          t(
            'TOOL_GET_GIT_REPOSITORY_PROJECT_KEY',
            "The key of the project (e.g., 'PROJECT')"
          )
        ),
      repoId: z
        .number()
        .optional()
        .describe(t('TOOL_GET_GIT_REPOSITORY_REPO_ID', 'Repository ID')),
      repoName: z
        .string()
        .optional()
        .describe(t('TOOL_GET_GIT_REPOSITORY_REPO_NAME', 'Repository name')),
    }));
  • Registration of the getGitRepositoryTool within the 'git' toolset group in the allTools function.
    {
      name: 'git',
      description: 'Tools for managing Git repositories and pull requests.',
      enabled: false,
      tools: [
        getGitRepositoriesTool(backlog, helper),
        getGitRepositoryTool(backlog, helper),
        getPullRequestsTool(backlog, helper),
        getPullRequestsCountTool(backlog, helper),
        getPullRequestTool(backlog, helper),
        addPullRequestTool(backlog, helper),
        updatePullRequestTool(backlog, helper),
        getPullRequestCommentsTool(backlog, helper),
        addPullRequestCommentTool(backlog, helper),
        updatePullRequestCommentTool(backlog, helper),
      ],
    },
  • Tool schema instantiation and output schema reference (GitRepositorySchema).
    schema: z.object(getGitRepositorySchema(t)),
    outputSchema: GitRepositorySchema,
  • Import of the getGitRepositoryTool factory function.
    import { getGitRepositoryTool } from './getGitRepository.js';
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it 'Returns information,' implying a read-only operation, but doesn't clarify authentication needs, rate limits, error handling, or what specific information is returned (e.g., metadata, commits). For a tool with zero annotation coverage, this is inadequate.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy for an agent to parse quickly.

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?

Given the tool's complexity (4 parameters, no annotations, no output schema), the description is incomplete. It lacks details on return values, error conditions, authentication, and usage context relative to siblings. For a read operation with multiple parameters, more guidance is needed to help the agent use it effectively.

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%, with clear descriptions for all 4 parameters (e.g., 'The numeric ID of the project'). The description adds no parameter-specific details beyond what the schema provides, such as how parameters interact (e.g., using 'projectId' vs. 'projectKey') or which are required. Baseline 3 is appropriate given the schema does the heavy lifting.

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's purpose with a specific verb ('Returns') and resource ('information about a specific Git repository'), making it easy to understand what it does. However, it doesn't differentiate itself from sibling tools like 'get_git_repositories' (plural) beyond implying singular vs. plural retrieval, which is a minor gap in sibling differentiation.

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. It doesn't mention sibling tools like 'get_git_repositories' for listing repositories or 'get_project' for project details, nor does it specify prerequisites or exclusions for usage, leaving the agent with no contextual cues.

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