Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Get Job Config

get_job_config
Read-onlyIdempotent

Retrieves a Jenkins job's configuration summary (type, SCM, parameters, triggers, credential IDs, etc.) or raw config.xml for inspection or auditing.

Instructions

A job's (or folder's) configuration from config.xml as a compact summary: type, SCM repo/branches, Jenkinsfile path or inline script, parameters, triggers (cron, SCM polling, upstream), build retention, concurrency, label, freestyle build steps, Config File Provider files (managed_files), folder Shared Libraries and the credential IDs used (IDs only, never values). Needs Job/ExtendedRead. Jobs managed by JCasC/JobDSL: this is the live state; the source of truth is in Git.

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_job_config"
  }
}

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).
rawNoReturn the whole config.xml (masked, size-limited) instead of the summary
instanceNoJenkins instance name from list_instances. Empty = default instance.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, so the description focuses on additional context: required permissions, data freshness for managed jobs, and security (credential IDs only, never values). It does not contradict annotations and adds meaningful behavioral traits beyond them.

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 front-loaded with the core purpose, then permission needs and a caveat. The field enumeration is dense but necessary to convey what the summary contains. There is no filler, though the first sentence is quite long.

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

Completeness4/5

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

Given the tool's complexity and the presence of an output schema, the description still adds valuable context: permissions, data freshness for managed jobs, and security constraints. It stops short of mentioning alternatives, but that is more properly a usage guideline concern. Overall, it provides enough for an agent to use the tool correctly.

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 coverage is 100% and all three parameters have detailed descriptions, so the baseline is 3. The description adds value by specifying what the default summary includes (type, SCM, triggers, etc.), which clarifies the difference between raw=false and raw=true. However, it does not add syntax or format details for the job or instance parameters beyond what the schema provides.

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 states the specific resource (job/folder configuration from config.xml) and enumerates what the compact summary contains, making the purpose clear. However, it does not differentiate from siblings such as get_job, get_job_config_history, or diff_job_config, so an agent must infer that this is the tool for retrieving current config rather than comparing or listing jobs.

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?

The description provides a permission prerequisite (Needs Job/ExtendedRead) and notes that JCasC/JobDSL jobs have their source of truth in Git, which is a useful caveat. Yet it never explicitly states when to use this tool instead of alternatives like diff_job_config or get_job, leaving usage to inference.

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