Skip to main content
Glama
Mulan Permissive Software License, Version 2
15
7

get_repository_branch_details

Fetch specific branch details from a repository by providing the owner, repository name, and branch. Enables efficient management of branch-related data on AtomGit MCP Server.

Instructions

Get details of a specific branch in a repository

Input Schema

NameRequiredDescriptionDefault
branchYesBranch name, cannot contain wildcards.
ownerYesRepository owner, typically referred to as 'username'. Case-insensitive.
repoYesRepository name. Case-insensitive.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "branch": { "description": "Branch name, cannot contain wildcards.", "type": "string" }, "owner": { "description": "Repository owner, typically referred to as 'username'. Case-insensitive.", "type": "string" }, "repo": { "description": "Repository name. Case-insensitive.", "type": "string" } }, "required": [ "owner", "repo", "branch" ], "type": "object" }

Implementation Reference

  • Core handler function that makes the AtomGit API request to retrieve details of a specific repository branch.
    /** * 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", } ); }
  • Zod input schema used for validating tool arguments: owner, repo, branch.
    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)
    Tool registration in the MCP server's listTools handler, providing name, description, and input schema.
    { name: "get_repository_branch_details", description: "Get details of a specific branch in a repository", inputSchema: zodToJsonSchema(branch.ListBranchDetailSchema), },
  • Dispatch handler in the MCP server's callToolRequestHandler that parses input, calls getBranchDetail, and formats response.
    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) }], }; }

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/kaiyuanxiaobing/atomgit-mcp-server'

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