get_repository_branch_details
Retrieve specific branch information including commit details, protection rules, and status from AtomGit repositories to manage code collaboration and deployment workflows.
Instructions
Get details of a specific branch in a repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner, typically referred to as 'username'. Case-insensitive. | |
| repo | Yes | Repository name. Case-insensitive. | |
| branch | Yes | Branch name, cannot contain wildcards. |
Implementation Reference
- operations/branch.ts:44-63 (handler)The core handler function that performs the HTTP request to AtomGit API to retrieve specific branch details./** * Retrieves details of a branch. * @param owner - Repository owner * @param repo - Repository name * @param branch - Branch name */ export async function getBranchDetail( owner: string, repo: string, branch: string ) { return atomGitRequest( `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/branches/${encodeURIComponent(branch)}`, { method: "GET", } ); }
- operations/branch.ts:11-15 (schema)Zod schema defining the input parameters for the get_repository_branch_details tool.export const ListBranchDetailSchema = z.object({ owner: z.string().describe("Repository owner, typically referred to as 'username'. Case-insensitive."), repo: z.string().describe("Repository name. Case-insensitive."), branch: z.string().describe("Branch name, cannot contain wildcards."), });
- index.ts:167-171 (registration)Registration of the tool in the MCP server's list of tools, including schema reference.{ name: "get_repository_branch_details", description: "Get details of a specific branch in a repository", inputSchema: zodToJsonSchema(branch.ListBranchDetailSchema), },
- index.ts:437-443 (handler)Dispatcher case in the main request handler that parses args and calls the branch handler.case "get_repository_branch_details": { const args = branch.ListBranchDetailSchema.parse(request.params.arguments); const result = await branch.getBranchDetail(args.owner, args.repo, args.branch); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }