Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Get Log Errors

get_log_errors
Read-onlyIdempotent

Extract and group de-duplicated error lines from a Jenkins build log, with line numbers, stage, severity, stack traces, and known-issue annotations to speed troubleshooting.

Instructions

All detected error lines of a build, de-duplicated into groups (same message = one group with a count), in order of first appearance, with line number, stage, severity and a shortened stack trace. Severity 'warn' = error text inside a line logged as WARN (often retries, rarely the cause); category 'generic' = an 'Error:'/'FATAL:' line no specific rule knows (ranked after specific errors). Groups the knowledge base knows are annotated ('known issue', 'known noise', 'consequence of'). Generic Jenkins wrapper messages ('script returned exit code 1') are hidden unless include_generic.

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

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.
categoryNoOptional filter: maven, tests, java, helm, k8s, ansible, docker, network, nexus, system, jenkins, generic or a custom category
instanceNoJenkins instance name from list_instances. Empty = default instance.
max_groupsNo
include_genericNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/openWorld, but the description adds substantial behavior: de-duplication into groups with counts, ordering by first appearance, ranking of generic errors after specific ones, KB annotation of known groups, and hiding of generic Jenkins wrapper messages unless include_generic. That is exactly the kind of output-shaping behavior an agent cannot get from structured fields.

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?

Front-loaded with the core definition, and every subsequent clause carries real semantic load (severity, category, KB tags, hiding rule). It is dense and semicolon-heavy, but no sentence is filler.

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?

With an output schema present, return-value explanation is unnecessary, and the description still covers filtering, defaults and grouping behavior. The one meaningful gap is max_groups — whether it truncates, and how truncation is reported — for a 6-parameter tool.

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 67%, and the description compensates where the schema is thin: it defines the 'generic' category and its ranking, and explains include_generic's hiding behavior, both of which are undocumented in the schema. max_groups is left entirely unexplained, which keeps it below 5.

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 and resource — 'all detected error lines of a build, de-duplicated into groups' — plus ordering, grouping and payload contents. It is clearly distinguishable from siblings like get_log_lines (raw lines) and recurring_errors.

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 implied rather than stated: the severity/category semantics and the include_generic toggle imply 'use this for error triage, not raw log reading', but no sibling or alternative is named and no when-not condition is given. Guidance exists only as implicit rules inside the field semantics.

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