Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Get Pipeline Info

get_pipeline_info
Read-onlyIdempotent

Retrieve what actually ran in a Jenkins Pipeline build, including Jenkinsfile source, Git checkouts, Shared Library versions, replay/restart data, slowest steps, and provisioned config files.

Instructions

What actually ran in a Pipeline build: where the Jenkinsfile came from, the git checkouts (repo, branch, commit), the Shared Library versions that were loaded (with a hint when a library branch does not match a VERSION parameter, e.g. rel-2.3 vs REL_VERSION=2.4), replay / restart-from-stage, and the slowest steps, and the Config File Provider files it provisioned. show_script=True adds the executed script (needs the Run/Replay permission).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "job": "<job>"
    },
    "name": "get_pipeline_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobYesJob full name like 'cd/master/my-app' (folders separated by '/'), or a Jenkins job/build URL (instance is then detected from the URL).
buildNoBuild number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild.
instanceNoJenkins instance name from list_instances. Empty = default instance.
show_scriptNoAlso return the Jenkinsfile that actually ran (from the replay page)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld, so safety is covered. The description adds genuinely useful context beyond them: that show_script reads the replay page and requires the Run/Replay permission, and that library-version output flags branch/VERSION mismatches. It does not discuss cost, latency, or failure modes for missing builds, hence not a 5.

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?

Purpose is front-loaded and the dense enumeration of returned sections is information-bearing rather than filler. The single long sentence chains clauses with repeated 'and', which slightly hurts readability, but nothing is truly redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only introspection tool with a full output schema and 100% parameter coverage, the description supplies what structured fields cannot: what sections come back, the permission caveat for show_script, and the mismatch-hint behavior. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds semantics the schema lacks — notably that show_script requires the Run/Replay permission and pulls from the replay page. The other parameters (job, build, instance) are left entirely to the schema, which is acceptable given full coverage.

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?

Opens with a specific framing — 'What actually ran in a Pipeline build' — then enumerates concrete artifacts: Jenkinsfile provenance, git checkouts, shared library versions, replay/restart-from-stage, slowest steps, Config File Provider files. That is far more specific than a generic build-info tool. It never names a sibling (e.g., get_build_summary or get_job_config) to delineate scope, which keeps it from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the content list: an agent can infer this is the tool for pipeline internals rather than job config or logs. There is no explicit when-to-use statement, no exclusions, and no pointer to alternatives among the many build/artifact siblings. The one conditional given (show_script=True) is a parameter note, not usage routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.