Skip to main content
Glama

github_cicd_setup

Configure GitHub CI/CD pipelines with deploy keys and workflows to automate deployment from repositories to specified server paths.

Instructions

Setup GitHub CI/CD with deploy keys and workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoUrlYesGitHub repository URL
deployPathYesDeployment path on server

Implementation Reference

  • Registration of the 'github_cicd_setup' tool including name, description, and input schema definition.
    {
      name: 'github_cicd_setup',
      description: 'Setup GitHub CI/CD with deploy keys and workflow',
      inputSchema: {
        type: 'object',
        properties: {
          repoUrl: { type: 'string', description: 'GitHub repository URL' },
          deployPath: { type: 'string', description: 'Deployment path on server' },
        },
        required: ['repoUrl', 'deployPath'],
      },
    },
  • Zod validation schema for github_cicd_setup tool inputs.
    const GitHubConfigSchema = z.object({
      repoUrl: z.string().describe('GitHub repository URL'),
      deployPath: z.string().describe('Deployment path on the server'),
    });
  • MCP server dispatch handler for 'github_cicd_setup' that validates inputs and calls the GitHubCICD service.
    private async handleGitHubCICDSetup(
      args: unknown
    ): Promise<{ content: Array<{ type: 'text'; text: string }> }> {
      if (!this.githubCICD) {
        throw new Error('SSH connection not established. Please connect first.');
      }
    
      const config = GitHubConfigSchema.parse(args);
      const result = await this.githubCICD.setupCICD(config);
    
      return {
        content: [
          {
            type: 'text',
            text: result.success
              ? `GitHub CI/CD setup completed. Deploy key and workflow generated.`
              : `GitHub CI/CD setup failed: ${result.message}`,
          },
        ],
      };
    }
  • Core implementation of GitHub CI/CD setup: generates SSH deploy key, sets up server deployment directory and script, generates action secret, and creates GitHub workflow YAML.
    async setupCICD(config: GitHubCICDConfig): Promise<GitHubCICDResult> {
      try {
        logger.info('Setting up GitHub CI/CD', {
          repoUrl: config.repoUrl,
          deployPath: config.deployPath,
        });
    
        // Generate deploy key
        const deployKey = await this.generateDeployKey();
        if (!deployKey) {
          return {
            success: false,
            message: 'Failed to generate deploy key',
          };
        }
    
        // Setup deployment directory
        const setupResult = await this.setupDeploymentDirectory(config.deployPath);
        if (!setupResult.success) {
          return setupResult;
        }
    
        // Generate action secret
        const actionSecret = await this.generateActionSecret();
        if (!actionSecret) {
          return {
            success: false,
            message: 'Failed to generate action secret',
          };
        }
    
        // Create workflow file
        const workflowFile = this.generateWorkflowFile(config);
    
        return {
          success: true,
          message: 'GitHub CI/CD setup completed successfully',
          deployKey,
          actionSecret,
          workflowFile,
        };
      } catch (error) {
        logger.error('GitHub CI/CD setup failed', { error, config });
        return {
          success: false,
          message: `GitHub CI/CD setup failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
        };
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'deploy keys and workflow', hinting at configuration and automation, but lacks critical details: whether this is a read-only or mutative operation (likely mutative given 'Setup'), what permissions are required, if it modifies existing setups, or potential side effects like overwriting files. This is inadequate for a tool that likely involves significant system changes.

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

Conciseness4/5

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

The description is a single, efficient sentence: 'Setup GitHub CI/CD with deploy keys and workflow'. It's front-loaded with the core action and includes key components. However, it could be slightly more structured by explicitly separating purpose from context, but it avoids redundancy and wastes no words.

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 the complexity of CI/CD setup (likely involving mutations, authentication, and system changes), the description is incomplete. No annotations exist to cover behavioral traits, and there's no output schema to explain return values. The description lacks details on what 'Setup' entails (e.g., creates files, configures secrets), success/failure conditions, or dependencies. This leaves significant gaps for an AI agent to use the tool effectively.

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?

The input schema has 100% description coverage, with clear parameter definitions ('repoUrl' as GitHub repository URL, 'deployPath' as deployment path on server). The description adds no additional meaning beyond the schema, such as format examples (e.g., URL structure) or constraints (e.g., path must exist). With high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't detract either.

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 tool's purpose: 'Setup GitHub CI/CD with deploy keys and workflow'. It specifies the verb ('Setup') and resource ('GitHub CI/CD'), and mentions key components (deploy keys and workflow). However, it doesn't explicitly differentiate from sibling tools like 'execute_command' or 'vps_initialize', which might also involve setup operations.

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., needing a GitHub repository or server access), exclusions (e.g., not for other CI/CD platforms), or how it relates to sibling tools like 'nginx_setup' or 'ssh_connect'. 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/oxy-Op/DevPilot'

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