jenkins_trigger_build
Trigger a non-parameterized Jenkins job build with an optional delay. Start builds without parameters directly via HTTP.
Instructions
Trigger a non-parameterized job build. Requires JENKINS_MCP_ENABLE_WRITES=1.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job | Yes | ||
| delay | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/jenkins_mcp_server/tools.py:210-220 (handler)The main handler function for the jenkins_trigger_build tool. It triggers a non-parameterized Jenkins job build by POSTing to the job's /build endpoint. Requires JENKINS_MCP_ENABLE_WRITES=1.
def jenkins_trigger_build(job: str | list[str], delay: str | None = None) -> dict[str, Any]: """Trigger a non-parameterized job build. Requires JENKINS_MCP_ENABLE_WRITES=1.""" def op() -> dict[str, Any]: config = JenkinsConfig.from_env() config.require_writes() with JenkinsClient(config) as client: params = {"delay": delay} if delay else None return client.post(f"{job_path(job)}/build", params=params) return _run(op) - src/jenkins_mcp_server/tools.py:372-373 (registration)Registration of jenkins_trigger_build in the WRITE_TOOLS list, indicating it is a write-capable tool.
WRITE_TOOLS = [ "jenkins_trigger_build", - src/jenkins_mcp_server/tools.py:55-55 (registration)The @mcp.tool() decorator on the function registers it as an MCP tool. The function is defined inside register_tools() which accepts a FastMCP instance.
def register_tools(mcp: FastMCP) -> None: