get_repository_info
Retrieve status and metadata for indexed repositories on GitHub or GitLab to monitor indexing progress and access repository details.
Instructions
Get information about an indexed repository including status and metadata
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | Branch that was indexed | |
| remote | Yes | Repository host | |
| repository | Yes | Repository in owner/repo format |
Implementation Reference
- src/server.ts:549-579 (handler)MCP tool handler for get_repository_info that checks client availability, extracts parameters, calls GreptileClient.getRepositoryInfo, and formats the response.private async handleGetRepositoryInfo( args: unknown ): Promise<{ content: Array<{ type: string; text: string }> }> { if (!this.greptileClient) { return { content: [ { type: 'text', text: createErrorResponse( 'Cannot get repository info: Missing environment variables. Use greptile_env_check for setup guidance.', 'Configuration Error', undefined ), }, ], }; } const { remote, repository, branch } = args as any; const result = await this.greptileClient.getRepositoryInfo(remote, repository, branch); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/server.ts:195-217 (registration)Tool registration in ListTools response, defining name, description, and input schema.{ name: 'get_repository_info', description: 'Get information about an indexed repository including status and metadata', inputSchema: { type: 'object', properties: { remote: { type: 'string', enum: ['github', 'gitlab'], description: 'Repository host', }, repository: { type: 'string', description: 'Repository in owner/repo format', }, branch: { type: 'string', description: 'Branch that was indexed', }, }, required: ['remote', 'repository', 'branch'], }, },
- src/types/index.ts:97-101 (schema)TypeScript interface defining the input parameters for the get_repository_info tool.export interface GetRepositoryInfoInput { remote: string; repository: string; branch: string; }
- src/clients/greptile.ts:192-203 (helper)GreptileClient helper method that constructs the repository ID and makes the GET API request to retrieve repository information from Greptile.async getRepositoryInfo( remote: string, repository: string, branch: string, timeout?: number ): Promise<Record<string, unknown>> { const repositoryId = `${remote}:${branch}:${repository}`; const encodedId = encodeURIComponent(repositoryId); const url = `${this.baseUrl}/repositories/${encodedId}`; return this.makeRequest('GET', url, undefined, timeout); }