get_user_repository
Retrieve a specific repository from AtomGit by providing the owner's username and repository name to access open-source collaboration resources.
Instructions
Search for AtomGit user repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Search query owner | |
| repo | Yes | Search query repo |
Implementation Reference
- operations/repository.ts:31-40 (handler)The core handler function that makes the API request to fetch the user repository details from AtomGit and parses the response using the output schema.export async function getUserRepository( owner: string = '', repo: string = '' ) { const url = `https://api.atomgit.com/repos/${encodeURIComponent(owner.toString())}/${encodeURIComponent(repo.toString())}`; const response = await atomGitRequest(url.toString()); console.log("API Response:", JSON.stringify(response, null, 2)); return AtomGitGetUserRepositorySchema.parse(response); }
- index.ts:82-85 (registration)Registration of the 'get_user_repository' tool in the MCP server's listTools response, including name, description, and input schema.name: "get_user_repository", description: "Search for AtomGit user repository", inputSchema: zodToJsonSchema(repository.getUserRepositorySchema), },
- index.ts:220-229 (handler)The MCP CallToolRequest handler case that parses input arguments and invokes the core getUserRepository function, formatting the response.case "get_user_repository": { const args = repository.getUserRepositorySchema.parse(request.params.arguments); const results = await repository.getUserRepository( args.owner, args.repo, ); return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }], }; }
- operations/repository.ts:10-13 (schema)Input schema validation for the get_user_repository tool using Zod.export const getUserRepositorySchema = z.object({ owner: z.string().describe("Search query owner"), repo: z.string().describe("Search query repo"), });
- common/types.ts:3-68 (schema)Output schema for parsing the AtomGit repository response.export const AtomGitGetUserRepositorySchema = z.object({ allowAutoMerge: z.boolean(), allowForking: z.boolean(), allowMergeCommit: z.boolean(), allowRebaseMerge: z.boolean(), allowSquashMerge: z.boolean(), allowUpdateBranch: z.boolean(), anonymousAccessEnabled: z.boolean(), archived: z.boolean(), codeOfConduct: z.union([z.string(), z.null()]), contributors_url: z.union([z.string(), z.null()]), createdAt: z.string(), default_branch: z.string(), deleteBranchOnMerge: z.boolean(), deployments_url: z.union([z.string(), z.null()]), description: z.union([z.string(), z.null()]), disabled: z.boolean(), downloads_url: z.union([z.string(), z.null()]), events_url: z.union([z.string(), z.null()]), fork: z.boolean(), forks: z.number(), forksCount: z.number(), forks_url: z.union([z.string(), z.null()]), full_name: z.string(), hasDiscussions: z.boolean(), hasDownloads: z.boolean(), hasIssues: z.boolean(), hasPages: z.boolean(), hasProjects: z.boolean(), hasWiki: z.boolean(), homepage: z.union([z.string(), z.null()]), hooksUrl: z.union([z.string(), z.null()]), html_url: z.string(), id: z.number(), isTemplate: z.boolean(), languages_url: z.union([z.string(), z.null()]), license: z.union([z.string(), z.null()]), mergeCommitMessage: z.union([z.string(), z.null()]), mergeCommitTitle: z.union([z.string(), z.null()]), merges_url: z.union([z.string(), z.null()]), mirrorUrl: z.union([z.string(), z.null()]), name: z.string(), organization: z.union([z.string(), z.null()]), owner: z.union([z.string(), z.null()]), parent: z.union([z.string(), z.null()]), permissions: z.union([z.string(), z.null()]), private: z.boolean(), pushedAt: z.union([z.string(), z.null()]), securityAndAnalysis: z.union([z.string(), z.null()]), source: z.union([z.string(), z.null()]), squashMergeCommitMessage: z.union([z.string(), z.null()]), squashMergeCommitTitle: z.union([z.string(), z.null()]), stargazers_url: z.union([z.string(), z.null()]), subscribers_url: z.union([z.string(), z.null()]), subscription_url: z.union([z.string(), z.null()]), svnUrl: z.union([z.string(), z.null()]), tagsUrl: z.union([z.string(), z.null()]), teamsUrl: z.union([z.string(), z.null()]), templateRepository: z.union([z.string(), z.null()]), topics: z.array(z.string()), updatedAt: z.string(), url: z.string(), useSquashPrTitleAsDefault: z.boolean(), visibility: z.string(), webCommitSignoffRequired: z.boolean(), });