Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Get Test Failures

get_test_failures
Read-onlyIdempotent

Retrieves failed JUnit test cases from a Jenkins build, including class, test, error, shortened stack trace, and failure age, so you can diagnose test failures without parsing console logs.

Instructions

Failed test cases from the JUnit test report (not the log): class, test, error message, shortened stack, and 'age' = number of consecutive builds this test has been failing.

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

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.
max_casesNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and openWorld, so the bar is lower. The description contributes real value by naming the data source (JUnit report, not log) and defining 'age' as consecutive failing builds, but it does not disclose that results are capped by max_cases (default 20) or what happens when the cap is hit.

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?

A single sentence, front-loaded with the data source, then the returned fields, then the non-obvious 'age' definition. No filler and no repetition of the title.

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?

An output schema exists, so return values needn't be spelled out, and the description still usefully flags the source distinction and 'age' semantics. The remaining gap is the undocumented max_cases cap, which an agent could overlook when a job has many failures.

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 75% and job/build/instance are well documented in the schema itself, so the baseline is 3. The description adds no parameter guidance of its own and leaves max_cases — the one undocumented parameter, whose default silently truncates output — entirely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Failed test cases from the JUnit test report') and immediately enumerates the returned fields (class, test, error message, shortened stack, age). The parenthetical '(not the log)' explicitly separates it from the log-oriented siblings like get_log_errors and search_log.

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

Usage Guidelines4/5

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

The '(not the log)' clause gives clear selection context: use this for structured JUnit failures rather than for log scraping. It stops short of naming the concrete alternatives (failures_overview, recurring_errors) or stating when-not to use it, so it falls short of a 5.

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