Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Get Log Lines

get_log_lines
Read-onlyIdempotent

Retrieves a numbered window of a Jenkins build's cleaned console log so you can inspect specific lines without loading the full output. Optionally hides pipeline and download noise.

Instructions

A window of the cleaned console log with line numbers (max 400 lines per call). Use line numbers from the other tools. hide_noise drops [Pipeline]/download/progress lines.

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

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.
countNo
startNo1-based first line; 0 or negative = tail of the log
instanceNoJenkins instance name from list_instances. Empty = default instance.
hide_noiseNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so safety is covered. The description adds real behavioral context — a hard 400-line cap and what hide_noise filters out — but leaves "cleaned" undefined and does not say what happens if count exceeds 400 or if the requested range runs past the log end.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no filler, so nothing is wasted. But the first sentence is a fragment that front-loads a noun phrase instead of the action, which weakens orientation for an agent skimming definitions.

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 and strong annotations, the description only needs to cover paging behavior and the noise filter, and it does both. The remaining gap — how this differs from sibling log tools — is a routing concern more than a completeness one.

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 67%; job, build, start, and instance are already documented in the schema, so the burden is small. The description compensates for the two undocumented parameters by giving hide_noise meaning and tying the 400-line cap to count, but it adds no syntax detail for count or paging beyond that.

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

Purpose3/5

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

The description identifies the resource (the cleaned console log) and its key output trait (line numbers, 400-line window), but it is a noun phrase with no verb — it never says "retrieves" or "returns a slice of". It also does not distinguish this tool from close siblings like get_stage_log, search_log, or get_log_errors, which also surface log content.

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

Usage Guidelines2/5

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

"Use line numbers from the other tools" implies a follow-up workflow after search_log/get_log_errors, which is a useful hint. However, there is no explicit when-to-use guidance and no exclusion: nothing says when to prefer get_stage_log, search_log, or get_env_log instead of pulling a raw window.

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