Skip to main content
Glama

get_git_repository

Retrieve details of a specific Git repository by providing its project ID or key and repository ID or name using the Backlog MCP Server API integration.

Instructions

Returns information about a specific Git repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdOrKeyYesProject ID or project key
repoIdOrNameYesRepository ID or name

Implementation Reference

  • The main handler function for the get_git_repository tool. It resolves the project ID or key and repository ID or name using helper functions, then calls the Backlog API's getGitRepository method to retrieve the repository information.
    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)); },
  • Input schema for the get_git_repository tool using Zod, defining optional parameters for project (ID or key) and repository (ID or name).
    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.
    getGitRepositoryTool(backlog, helper),
  • Import of the getGitRepositoryTool from its implementation file.
    import { getGitRepositoryTool } from './getGitRepository.js';
  • Reference to the output schema (GitRepositorySchema) for the tool's response validation.
    outputSchema: GitRepositorySchema,

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