get_git_repositories
Retrieve a list of Git repositories associated with a specific Backlog project by providing the project ID or key. Streamlines access to repository data for project management and integration tasks.
Instructions
Returns list of Git repositories for a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectIdOrKey | Yes | Project ID or project key |
Implementation Reference
- src/tools/getGitRepositories.ts:44-54 (handler)The asynchronous handler function that implements the core logic of the 'get_git_repositories' tool. It resolves the project ID or key using resolveIdOrKey utility and delegates to the backlog-js library's getGitRepositories method.handler: async ({ projectId, projectKey }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } return backlog.getGitRepositories(result.value); },
- src/tools/getGitRepositories.ts:8-27 (schema)Input schema definition for the get_git_repositories tool, defining optional projectId (number) and projectKey (string) parameters with descriptions.const getGitRepositoriesSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_GET_GIT_REPOSITORIES_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_GET_GIT_REPOSITORIES_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), }));
- src/tools/tools.ts:124-135 (registration)Registration of the getGitRepositoriesTool as part of the 'git' toolset group within the allTools function, which aggregates all MCP tools.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), ],
- src/tools/tools.ts:15-15 (registration)Import statement for the getGitRepositoriesTool in the central tools aggregation file.import { getGitRepositoriesTool } from './getGitRepositories.js';
- Output schema reference for the tool, using GitRepositorySchema imported from types.outputSchema: GitRepositorySchema,