Skip to main content
Glama
Pawangunjkar

Jenkins MCP Server

by Pawangunjkar

jenkins_run_groovy_script

Execute Groovy scripts on Jenkins Script Console for admin operations like listing jobs, users, or checking server version with full Jenkins access.

Instructions

Execute a Groovy script on the Jenkins Script Console.

⚠️ This is a powerful admin tool. Scripts run with full Jenkins access.

Common scripts:

  • List all jobs: 'Jenkins.instance.items.each { println it.name }'

  • Get Jenkins version: 'println Jenkins.instance.version'

  • List users: 'Jenkins.instance.securityRealm.getAllUsers().each { println it.id }'

Args: script: Groovy script to execute session_name: Jenkins session to use

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYes
session_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It explicitly warns that scripts run with full Jenkins access (a critical safety disclosure for a mutation-capable admin tool). It does not mention what happens to output/return value, error handling, or whether the script result is returned to the caller, which would add depth. But the security warning is significant and valuable disclosure beyond the schema.

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 reasonably compact with effective front-loading: the core purpose is in the first line, the prominent warning follows immediately, and examples are provided at the end. The examples and Args block are useful, though the Args section slightly duplicates the input schema. Minor redundancy, but overall well-organized and scannable.

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?

Given that an output schema exists (though its content isn't shown), the description still gives useful examples of common scripts and a clear warning about power. For a generic execution tool with zero annotation coverage, it covers the essential safety context. It could be improved by noting what the tool returns (script output vs. exit code), but it's reasonably complete for its complexity level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It lists the two parameters (script, session_name) with brief explanations, but doesn't elaborate on the 'session' semantics — what a session is, why it defaults to 'default', or when one would use a different session. The script parameter is self-explanatory, but session_name lacks meaningful context about its lifecycle or purpose.

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?

The description clearly states the tool executes a Groovy script on the Jenkins Script Console, with a specific verb (execute) and resource (Script Console). It distinguishes itself from siblings like jenkins_get_job or jenkins_build by being a general-purpose admin execution tool, and provides concrete example scripts that make the purpose unambiguous.

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?

The description provides clear context for when to use this tool: it's an admin scripting tool for arbitrary Groovy execution. The warning note ('powerful admin tool') implies it should be used carefully. However, it doesn't explicitly name alternative tools for specific operations (e.g., use jenkins_get_job for reading job details), though the sibling set is large and this tool is clearly the generic escape hatch. The examples help establish appropriate use cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pawangunjkar/jenkins-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server