Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Draft Kb Entry

draft_kb_entry

Writes a new Markdown knowledge-base draft for human review after root-cause confirmation, without overwriting files or touching Jenkins.

Instructions

Write a NEW knowledge base draft (Markdown) to knowledge/drafts/ for human review. Call this at the end of a debugging session once the user confirmed the root cause. It never touches Jenkins and never overwrites a file. Drafts are not used for matching until a human reviews them and moves them into knowledge/ (then commit to Git).

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": {
      "title": "<title>",
      "root_cause": "<root_cause>",
      "match": "<match>"
    },
    "name": "draft_kb_entry"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobNoJob full name or Jenkins URL. Empty = not tied to a build.
buildNoBuild number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild.
matchYesPython regexes (case-insensitive). Use specific phrases copied from the log, not generic words like 'ERROR'.
stageNo
titleYesShort title: symptom -> cause
statusNoopen | solved | workaroundopen
versionNoProduct/application version of the build, if relevant
categoryNo
instanceNoJenkins instance name from list_instances. Empty = default instance.
solutionNoHow it was / is fixed. Empty if not known yet.
symptomsNo
how_foundNoHow the cause was identified (searches, comparisons)
root_causeYesThe confirmed root cause
consequencesNoRegexes of follow-up errors caused by this issue
red_herringsNoRegexes of errors that appeared but were NOT the cause (e.g. also present in green builds)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Adds real context beyond the annotations: the write target, that Jenkins is untouched, that no existing file is overwritten, and that drafts stay inert until a human reviews and commits them. The gap is the idempotentHint=false signal — the description never says what happens when a draft with the same title already exists, so duplicate behavior remains unexplained.

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?

Four short sentences, each carrying distinct information: what is written and where, when to call it, safety guarantees, and lifecycle. Front-loaded with the action, zero 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?

For a 15-parameter write tool with annotations and an output schema, the description covers purpose, timing, safety and downstream lifecycle well. The remaining shortfall is duplicate-title behavior and any hint about how the drafted match/symptom regexes will be consumed later.

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 description coverage is 80%, so the schema already documents most of the 15 parameters (match, consequences, red_herrings, status, etc.). The description contributes nothing parameter-specific — notably no guidance on how 'match' regexes relate to the draft's future matching role — so the baseline 3 applies.

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 (Write), resource (a NEW knowledge base draft in Markdown) and destination (knowledge/drafts/). The word 'NEW' plus 'never overwrites a file' implicitly separates it from the sibling update path (propose_kb_update) and from anything that would modify knowledge/ directly.

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?

Gives an explicit trigger point: 'at the end of a debugging session once the user confirmed the root cause,' which is a concrete pre-condition an agent can check. It does not name propose_kb_update or state when to prefer it, so the exclusion side of the decision is left implicit.

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