Skip to main content
Glama

gitlab_get_branch_details

Retrieve detailed information about a specific branch in a GitLab project, including commit history and metadata, for integration with Jira workflows.

Instructions

Gets detailed information about a specific branch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesThe path of the GitLab project.
branchNameYesThe name of the branch.

Implementation Reference

  • The core handler function that calls the GitLab API to retrieve details for a specific branch in a project.
    async getBranchDetails(projectPath: string, branchName: string): Promise<any> { const encodedProjectPath = encodeURIComponent(projectPath); const encodedBranchName = encodeURIComponent(branchName); return this.callGitLabApi<any>( `projects/${encodedProjectPath}/repository/branches/${encodedBranchName}`, ); }
  • src/index.ts:1937-1951 (registration)
    The registration and dispatch handler in the MCP server that calls the GitLabService.getBranchDetails method.
    case 'gitlab_get_branch_details': { if (!gitlabService) { throw new Error('GitLab service is not initialized.'); } const { projectPath, branchName } = args as { projectPath: string; branchName: string }; const result = await gitlabService.getBranchDetails(projectPath, branchName); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • The tool definition including name, description, and input schema for validation.
    { name: 'gitlab_get_branch_details', description: 'Gets detailed information about a specific branch.', inputSchema: { type: 'object', properties: { projectPath: { type: 'string', description: 'The path of the GitLab project.', }, branchName: { type: 'string', description: 'The name of the branch.', }, }, required: ['projectPath', 'branchName'], }, },

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/HainanZhao/mcp-gitlab-jira'

If you have feedback or need assistance with the MCP directory API, please join our Discord server