Skip to main content
Glama
mdtahmidhossain

jenkins-http-mcp-server

jenkins_version

Retrieve the Jenkins server version directly from the X-Jenkins response header.

Instructions

Return Jenkins version from the X-Jenkins response header.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The jenkins_version tool handler: makes a GET request to 'api/json' and returns the Jenkins version from the X-Jenkins response header, along with the X-Jenkins-Session header.
    def jenkins_version() -> dict[str, Any]:
        """Return Jenkins version from the X-Jenkins response header."""
    
        def op() -> dict[str, Any]:
            with _client() as client:
                response = client.request("GET", "api/json", params={"tree": "mode"})
                return {
                    "version": response.headers.get("X-Jenkins"),
                    "session": response.headers.get("X-Jenkins-Session"),
                }
    
        return _run(op)
  • Registration of jenkins_version via the @mcp.tool() decorator inside the register_tools function.
    def register_tools(mcp: FastMCP) -> None:
        @mcp.tool()
        def jenkins_whoami() -> dict[str, Any]:
  • The _client() helper used by jenkins_version to create a JenkinsClient from environment variables.
    def _client() -> JenkinsClient:
        return JenkinsClient.from_env()
    
    
    def _get_json(path: str, params: dict[str, Any] | None = None) -> Any:
        with _client() as client:
            return client.get_json(path, params=params)
  • The _run() helper used to execute the tool's operation and wrap results in a standardized response.
    def _run(fn):
        try:
            return _ok(fn())
        except JenkinsMCPError as exc:
            return exc.to_dict()
  • The _ok() helper that wraps successful data into {'ok': True, 'data': data} format.
    def _ok(data: Any) -> dict[str, Any]:
        return {"ok": True, "data": data}
    
    
    def _run(fn):
        try:
            return _ok(fn())
        except JenkinsMCPError as exc:
            return exc.to_dict()
    
    
    def _client() -> JenkinsClient:
        return JenkinsClient.from_env()
Behavior4/5

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

Since no annotations are present, the description carries full burden. It clearly states that it returns the version from the X-Jenkins response header, which is transparent about its operation and side-effects (none).

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?

The description is a single sentence that is concise and to the point, with no wasted words.

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 that there are no parameters and an output schema exists, the description is complete enough. It explains what the tool returns and from which source.

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?

The input schema has zero parameters, so baseline is 4. The description adds no parameter details because none are needed.

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 specifies the action ('Return') and resource ('Jenkins version'), and it distinguishes itself from sibling tools that perform different operations like 'cancel', 'copy', or 'create'.

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?

No usage guidelines are provided. There is no mention of when to use this tool versus alternatives, nor any exclusions or context for its use.

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/mdtahmidhossain/jenkins-http-mcp-server'

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