get_org_repositories
Search and retrieve repositories from an AtomGit organization using organization path and optional search filters.
Instructions
Search for AtomGit org repositories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orgPath | Yes | Search query org name | |
| per_page | No | Page number for pagination (default: 1) | |
| page | No | Number of results per page (default: 10) | |
| search | No | Search query content |
Implementation Reference
- operations/repository.ts:66-85 (handler)The primary handler function that constructs the AtomGit API URL for organization repositories, appends query parameters, fetches data using atomGitRequest, and returns the response.export async function getOrgRepositories( orgPath: string, per_page: number = 10, page: number = 1, search?: string ) { let url = `https://api.atomgit.com/orgs/${encodeURIComponent(orgPath)}/repos`; const params = new URLSearchParams(); if (per_page) params.append('per_page', per_page.toString()); if (page) params.append('page', page.toString()); if (search) params.append('search', search); const queryString = params.toString(); if (queryString) { url += `?${queryString}`; } const response = await atomGitRequest(url.toString()); return response; }
- operations/repository.ts:22-27 (schema)Zod input schema defining parameters for the get_org_repositories tool: orgPath (required), per_page, page, and search (all optional).export const getOrgRepositoriesSchema = z.object({ orgPath: z.string().describe("Search query org name"), per_page: z.number().optional().describe("Page number for pagination (default: 1)"), page: z.number().optional().describe("Number of results per page (default: 10)"), search: z.string().optional().describe("Search query content"), });
- index.ts:116-120 (registration)MCP tool registration entry in the ListTools response, specifying the tool name, description, and input schema converted to JSON schema.{ name: "get_org_repositories", description: "Search for AtomGit org repositories", inputSchema: zodToJsonSchema(repository.getOrgRepositoriesSchema), },
- index.ts:244-255 (handler)MCP CallTool dispatch handler that validates input arguments using the schema, invokes the core getOrgRepositories function, and returns the results formatted as MCP content.case "get_org_repositories": { const args = repository.getOrgRepositoriesSchema.parse(request.params.arguments); const results = await repository.getOrgRepositories( args.orgPath, args.per_page, args.page, args.search, ); return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }], }; }