Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Get Env Log

get_env_log
Read-onlyIdempotent

Retrieve a build's masked env.log from Jenkins and filter its lines by regex to inspect relevant environment variables.

Instructions

The env.log artifact (environment variables dumped by the pipeline) of a build, with secret-looking values masked. Optional regex pattern filters the lines (e.g. 'JAVA|MAVEN|NODE').

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

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

A3.9/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and open-world behavior, so the bar is lower, and the description clears it by disclosing that secret-looking values are masked — a material behavioral fact that changes how an agent should interpret the output. It stops short of covering truncation or what happens when a build has no env.log.

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?

Two tight sentences: the identity of the artifact and its masking behavior come first, then the optional filter with an example. No filler, nothing repeated from the schema.

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 covers the artifact's nature, redaction, and the filtering option. Gaps are minor: no mention of truncation on very large logs or error behavior when the artifact is absent.

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 75%, with job, build, and instance documented in the schema; the one gap, `pattern`, is exactly what the description fills, explaining that it is an optional regex line filter and giving a concrete example ('JAVA|MAVEN|NODE'). This is meaningful semantics beyond the bare empty-string default.

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 resource precisely: the env.log artifact of a build, including its provenance (variables dumped by the pipeline) and a key transformation (secret-looking values masked). It does not, however, distinguish itself from siblings like read_artifact or get_log_lines, which could plausibly also surface this content.

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 only implied — read this when you need a build's environment variables. There is no explicit 'use this instead of read_artifact when...' or any statement about when the tool is not appropriate, despite several sibling tools that read build files and logs.

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