Skip to main content
Glama

greptile_env_check

Verify environment variable configuration and setup status to ensure proper system operation.

Instructions

Check environment variable configuration and setup status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the greptile_env_check tool logic. It generates a report on environment variable status, API connectivity, and provides setup guidance.
    /**
     * Handle greptile_env_check tool
     */
    private async handleEnvironmentCheck(): Promise<{
      content: Array<{ type: string; text: string }>;
    }> {
      const status = this.envStatus;
    
      const report = {
        status: status.isFullyConfigured ? 'CONFIGURED' : 'INCOMPLETE',
        environment_variables: {
          GREPTILE_API_KEY: status.hasGreptileApiKey ? 'SET' : 'MISSING',
          GITHUB_TOKEN: status.hasGithubToken ? 'SET' : 'MISSING',
        },
        api_connectivity: null as string | null,
        missing_variables: status.missingVars,
        setup_instructions: status.suggestions,
      };
    
      if (this.greptileClient) {
        try {
          const healthCheck = await this.greptileClient.healthCheck();
          report.api_connectivity = healthCheck ? 'CONNECTED' : 'FAILED';
        } catch (error) {
          report.api_connectivity = 'ERROR: ' + (error as Error).message;
        }
      } else {
        report.api_connectivity = 'NOT_INITIALIZED';
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(report, null, 2),
          },
        ],
      };
    }
  • src/server.ts:228-229 (registration)
    The switch case that registers and dispatches calls to the greptile_env_check tool handler.
    case 'greptile_env_check':
      return await this.handleEnvironmentCheck();
  • The tool definition including name, description, and input schema (empty object) registered in the ListTools response.
    {
      name: 'greptile_env_check',
      description: 'Check environment variable configuration and setup status',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },

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