Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

List Workspace

list_workspace
Read-onlyIdempotent

Lists files and folders in a Jenkins job's current workspace on the agent for a given build, including non-archived files and pipeline node-specific workspaces.

Instructions

Files in a job's workspace (folders end with '/'), for files that were not archived (e.g. app-queue.log). Pipeline: the workspace of a node block of the build; with several blocks it lists them first. Shows the CURRENT state on the agent. Needs the Job/Workspace permission and a reachable agent.

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

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).
pathNoFolder inside the workspace; empty = root
buildNoBuild number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild.
node_idNoPipeline only: workspace of which node block (node_id from list_workspace); empty = the only one
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?

The annotations already establish read-only, idempotent, open-world behavior. The description adds meaningful context beyond them: the listing reflects the CURRENT state on the agent, requires Job/Workspace permission, needs a reachable agent, and explains pipeline node-block behavior when several blocks exist.

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?

The description is compact and front-loads the core scope before covering pipeline and permission details. It is telegraphic in places, but nearly every sentence carries useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema, full parameter descriptions, and annotations, the description supplies the remaining decision-critical context: current-state semantics, permission and reachability requirements, archived-file exclusion, folder notation, and pipeline node handling. No major call requirement is missing.

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 description coverage is 100%, so the schema already explains job, path, build, node_id, and instance well. The description still adds non-obvious meaning for node_id handling in pipelines, particularly that multiple node blocks are listed first, which goes beyond the schema wording.

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?

The description clearly identifies the resource: files in a job's workspace, excluding archived files, with pipeline node-block nuance. It distinguishes the scope from archived artifacts, though it does not explicitly name sibling tools such as list_artifacts or read_workspace_file.

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?

It gives useful context for pipeline workspaces and notes permission/reachability requirements, but it does not explicitly state when to use this tool versus list_artifacts, read_workspace_file, or other workspace/log tools. Usage is therefore implied rather than fully routed.

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