Skip to main content
Glama
mdtahmidhossain

jenkins-http-mcp-server

jenkins_list_jobs

Retrieve a list of Jenkins jobs with customizable details using tree and depth parameters.

Instructions

List jobs visible to the Jenkins user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
treeNojobs[name,fullName,url,color,_class]
depthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The jenkins_list_jobs tool handler function. It accepts optional 'tree' and 'depth' parameters, fetches JSON from the Jenkins API's 'api/json' endpoint, and returns the result.
    @mcp.tool()
    def jenkins_list_jobs(
        tree: str = "jobs[name,fullName,url,color,_class]",
        depth: int | None = None,
    ) -> dict[str, Any]:
        """List jobs visible to the Jenkins user."""
        return _run(lambda: _get_json("api/json", params=_query(tree, depth)))
  • The tool is registered via the @mcp.tool() decorator on line 106 within the register_tools function (which starts at line 55). The decorator registers jenkins_list_jobs as an MCP tool.
    @mcp.tool()
  • jenkins_list_jobs is listed in the READ_ONLY_TOOLS constant, marking it as a read-only (non-destructive) tool.
    READ_ONLY_TOOLS = [
        "jenkins_whoami",
        "jenkins_version",
        "jenkins_health",
        "jenkins_get_json",
        "jenkins_list_jobs",
        "jenkins_get_job",
        "jenkins_get_job_config",
        "jenkins_list_builds",
        "jenkins_get_build",
        "jenkins_get_build_log",
        "jenkins_get_build_artifacts",
        "jenkins_get_test_report",
        "jenkins_list_queue",
        "jenkins_get_queue_item",
        "jenkins_list_views",
        "jenkins_get_view",
        "jenkins_list_nodes",
        "jenkins_get_node",
        "jenkins_list_plugins",
    ]
  • The _query helper function used by jenkins_list_jobs to build query parameters with 'tree' and 'depth'.
    def _query(tree: str | None = None, depth: int | None = None) -> dict[str, Any]:
        params: dict[str, Any] = {}
        if tree:
            params["tree"] = tree
        if depth is not None:
            params["depth"] = depth
        return params
  • The _get_json helper function used by jenkins_list_jobs to make the actual HTTP GET request to the Jenkins API.
    def _get_json(path: str, params: dict[str, Any] | None = None) -> Any:
        with _client() as client:
            return client.get_json(path, params=params)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states that jobs are listed, but lacks details on authentication requirements, pagination, limits, or any side effects. The description is minimal and does not add meaningful behavioral context.

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?

The description is very short and front-loaded, but it is missing necessary detail. While concise, it sacrifices completeness, making it adequate but not excellent.

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

Completeness2/5

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

Given no annotations, low schema coverage, and the presence of an output schema not referenced, the description is incomplete. It does not explain parameters, return value, or any constraints, leaving significant gaps for an agent.

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?

The input schema has 2 parameters (tree and depth) with 0% description coverage. The description does not mention or explain these parameters, leaving the agent to rely solely on the schema defaults and titles, which are insufficient for proper usage.

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 verb 'List' and the resource 'jobs', and adds context 'visible to the Jenkins user', which helps differentiate from sibling tools like 'jenkins_get_job' or 'jenkins_create_job'.

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 guidance is provided on when to use this tool versus alternatives, such as filtering or searching. The description does not mention when-not or provide any context for selecting this tool among many sibling listing tools.

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