Skip to main content
Glama

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
NameRequiredDescriptionDefault
branchYesBranch that was indexed
remoteYesRepository host
repositoryYesRepository in owner/repo format

Implementation Reference

  • 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'], }, },
  • TypeScript interface defining the input parameters for the get_repository_info tool.
    export interface GetRepositoryInfoInput { remote: string; repository: string; branch: string; }
  • 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); }

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/sosacrazy126/greptile-mcp'

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