Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Read Artifact

read_artifact
Read-onlyIdempotent

Read and grep Jenkins build artifacts such as logs, reports, YAML, and JSON by job, build, and path, with secret masking and safe text-only decoding.

Instructions

Read a text artifact (reports, logs, yaml, json...). With pattern it greps (regex, case-insensitive, 1 line context, max 50 matches); otherwise returns count lines from start (0 = tail). Secrets are masked. UTF-8, UTF-16 (with BOM) and cp1252 files are decoded; binary files are refused.

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>",
      "path": "<path>"
    },
    "name": "read_artifact"
  }
}

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).
pathYesrelativePath from list_artifacts
buildNoBuild number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild.
countNo
startNo
patternNo
instanceNoJenkins instance name from list_instances. Empty = default instance.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only declare it is a safe idempotent read; the description goes well beyond that with secrets masking, binary refusal, supported encodings (UTF-8/UTF-16 BOM/cp1252), 1-line grep context and a 50-match cap. These are behavioral traits an agent cannot infer from the schema or annotations.

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?

Three dense, front-loaded sentences covering modes, limits, encoding and security behavior with no filler. Terse fragments ('0 = tail', '1 line context') trade grammar for information density without losing meaning.

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 shape needn't be described, and the description nonetheless covers the tricky parts: mode selection, match cap, masking, and decode/refusal behavior. Minor gap: it doesn't say how to detect a truncated line window or that grep results are capped rather than complete.

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 57%, with job, build and instance documented in the schema but count/start/pattern left bare. The description compensates by defining pattern as case-insensitive regex with context and match cap, and by explaining count/start semantics including the non-obvious '0 = tail'. Job/build/instance meaning is not repeated, which is correct since the schema already carries it.

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+resource ('Read a text artifact') and enumerates the file kinds it covers (reports, logs, yaml, json). An agent can tell it is a file-content reader, though it never distinguishes itself from close siblings like read_workspace_file, read_managed_file, or get_log_lines.

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 implicitly splits usage into two modes – grep via `pattern` versus line-window via `count`/`start` – which is helpful operational guidance. But it gives no explicit when-to-use versus the sibling readers, and no exclusions (e.g., 'for workspace files use read_workspace_file').

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