Skip to main content
Glama

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") },

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