Skip to main content
Glama

get_repository_info

Retrieve indexed repository metadata and status from GitHub or GitLab to verify indexing completion and access repository details.

Instructions

Get information about an indexed repository including status and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
remoteYesRepository host
repositoryYesRepository in owner/repo format
branchYesBranch that was indexed

Implementation Reference

  • Primary handler function that executes the get_repository_info tool logic, checks client initialization, 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:196-217 (registration)
    Registration of the get_repository_info tool in the ListToolsRequestSchema handler, including name, description, and input schema definition.
      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 expected input structure for the get_repository_info tool.
    export interface GetRepositoryInfoInput {
      remote: string;
      repository: string;
      branch: string;
    }
  • GreptileClient helper method that constructs the API endpoint and makes the HTTP GET request to fetch repository information from the Greptile API.
    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);
    }
  • src/server.ts:237-238 (registration)
    Dispatcher case in the CallToolRequestSchema handler that routes to the get_repository_info handler function.
    case 'get_repository_info':
      return await this.handleGetRepositoryInfo(request.params.arguments);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the tool retrieves information, implying it's read-only, but doesn't disclose behavioral traits like authentication requirements, rate limits, error conditions, or what 'indexed' means operationally. The description is minimal and lacks context about the tool's behavior beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place, with no redundant or vague language. It's appropriately sized for a simple retrieval tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool with 3 required parameters. It doesn't explain what 'indexed' entails, what 'status and metadata' includes, or the response format. For a retrieval tool with structured inputs, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for all parameters (e.g., 'Repository host', 'Repository in owner/repo format', 'Branch that was indexed'). The description adds no additional semantic meaning beyond the schema, such as explaining format constraints or relationships between parameters. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'information about an indexed repository', specifying it includes 'status and metadata'. This distinguishes it from sibling tools like 'index_repository' (which creates) and 'query_repository' (which searches content), but doesn't explicitly differentiate from 'greptile_env_check' or 'greptile_help' in terms of scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., that the repository must already be indexed), exclusions, or compare to siblings like 'query_repository' for different types of information needs. Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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