Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Compare Artifacts

compare_artifacts
Read-onlyIdempotent

Compare archived artifacts from two builds to find unique or changed files; optionally diff a text artifact or hash/size a binary artifact.

Instructions

Compare the archived artifacts of two builds. Without path: artifacts only in one build, and which common ones changed (by Jenkins fingerprint, else by size, small files byte-wise). With path: a unified diff of a text artifact (secrets masked), or the sha256/size of a binary one.

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": "compare_artifacts"
  }
}

Input Schema

NameRequiredDescriptionDefault
badNoBuild number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild.lastFailedBuild
jobYesJob full name like 'cd/master/my-app' (folders separated by '/'), or a Jenkins job/build URL (instance is then detected from the URL).
goodNoBuild number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild.lastSuccessfulBuild
pathNoOne artifact to diff; empty = compare the lists
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.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 the safety profile is covered; the description adds real behavioral detail beyond that — change detection via Jenkins fingerprints, fallback to size, byte-wise comparison for small files, and secret masking in text diffs. It doesn't cover failure behavior when a path is absent in one or both builds, which is the main remaining gap.

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?

Two compact sentences, front-loaded with the core action and then partitioned by mode; no filler. The parenthetical comparison logic ('by Jenkins fingerprint, else by size, small files byte-wise') is dense but each clause carries information.

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 annotations carrying safety and an output schema carrying return shape, the description covers what remains: both modes, match/change algorithm, and secret masking. Only edge cases (missing artifact, non-text/non-binary content) are left unstated.

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 the permalink enums for bad/good plus instance/path are fully documented in the schema, so the baseline of 3 applies. The description reinforces what 'path' empty vs. set means but adds no syntax or format detail beyond the schema (e.g., exact artifact path format, leading-slash rules).

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?

States a specific verb and resource ('Compare the archived artifacts of two builds') and immediately splits the behavior into its two modes, so an agent knows exactly what it produces. It does not explicitly name compare_builds or list_artifacts to draw the boundary, but the scoping to 'archived artifacts' is specific enough to separate it by name and subject.

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 'Without path' / 'With path' construction gives clear mode-selection guidance: omit path to get a membership/change summary, supply path to get a content diff or hash. It stops short of stating when to prefer this over compare_builds or read_artifact, so no explicit exclusions or alternatives are given.

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