Skip to main content
Glama
gcorroto
by gcorroto

jenkins_start_job

Start a Jenkins CI/CD job for a specific application and Git branch to trigger automated builds and deployments.

Instructions

Iniciar un job de Jenkins con una rama específica

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesNombre de la aplicación
branchYesRama de Git a construir

Implementation Reference

  • Core implementation of starting a Jenkins job via HTTP POST to the buildWithParameters endpoint with sanitized branch parameter.
    async startJob(app: string, branch: string): Promise<string> {
      if (!validateAppName(app)) {
        throw new Error('Invalid app name.');
      }
    
      const cleanBranch = sanitizeInput(branch);
      const jobUrl = `${buildJobUrl('', app, cleanBranch)}/buildWithParameters`;
      const params = new URLSearchParams();
      params.append('BRANCH_TO_BUILD', cleanBranch);
      params.append('delay', '0sec');
    
      try {
        await this.client.post(jobUrl, params.toString(), {
          headers: createFormHeaders(this.config)
        });
        
        return `Job started successfully for app ${app} on branch ${cleanBranch}`;
      } catch (error: any) {
        throw handleHttpError(error, `Failed to start job for app: ${app}, branch: ${cleanBranch}`);
      }
    }
  • index.ts:73-93 (registration)
    MCP tool registration for 'jenkins_start_job', including Zod input schema and thin wrapper handler that delegates to JenkinsService.startJob and formats the response.
    server.tool(
      "jenkins_start_job",
      "Iniciar un job de Jenkins con una rama específica",
      {
        app: z.string().describe("Nombre de la aplicación"),
        branch: z.string().describe("Rama de Git a construir")
      },
      async (args) => {
        try {
          const result = await getJenkinsService().startJob(args.app, args.branch);
          
          return {
            content: [{ type: "text", text: `🚀 **${result}**` }],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `❌ **Error:** ${error.message}` }],
          };
        }
      }
    );
  • Input schema validation using Zod for the jenkins_start_job tool.
    {
      app: z.string().describe("Nombre de la aplicación"),
      branch: z.string().describe("Rama de Git a construir")
    },
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. 'Iniciar' implies a write/mutation operation that triggers a Jenkins job, but it doesn't disclose behavioral traits like whether this is asynchronous/synchronous, what permissions are required, potential side effects (e.g., resource consumption), or error conditions. For a mutation tool with zero annotation coverage, this is a significant gap.

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 in Spanish that directly states the tool's purpose. It's front-loaded with the core action and includes the key constraint. There's no wasted verbiage or unnecessary elaboration.

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?

For a mutation tool (starting a Jenkins job) with no annotations and no output schema, the description is incomplete. It doesn't cover what happens after invocation (e.g., returns a build ID, triggers async execution), error handling, or integration with sibling tools. Given the complexity and lack of structured data, more context is needed.

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 both parameters ('app' and 'branch') clearly documented in the schema. The description adds minimal value beyond the schema by implying these parameters are used to start a job, but doesn't provide additional context like parameter relationships or examples. Baseline 3 is appropriate when 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 action ('Iniciar' - start) and resource ('job de Jenkins') with a specific constraint ('con una rama específica' - with a specific branch). It distinguishes from siblings like jenkins_stop_job (stop vs start) and jenkins_get_job_status (get vs start), though it doesn't explicitly mention these distinctions. The purpose is specific and actionable.

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., job must exist), when not to use it (e.g., if job is already running), or refer to sibling tools like jenkins_get_job_status to check status first. 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/gcorroto/mcp-jenkins'

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