Skip to main content
Glama
xhuaustc

Jenkins MCP Tool

get_server_names

Retrieve all available Jenkins server names to manage multiple CI/CD environments and automate operations across your infrastructure.

Instructions

Get the list of all available Jenkins server names.

Returns:
    List of server names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_server_names' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. Retrieves Jenkins servers via get_jenkins_servers() and extracts their names.
    @mcp.tool()
    def get_server_names() -> List[str]:
        """Get the list of all available Jenkins server names.
    
        Returns:
            List of server names
        """
        servers = get_jenkins_servers()
        return [server["name"] for server in servers]
  • Helper function called by get_server_names to load and return the list of configured Jenkins servers from the application configuration.
    def get_jenkins_servers(config: Optional[Dict[str, Any]] = None) -> list:
        """Get all Jenkins server configs, only supports new format (servers/uri/tokenEnv)."""
        if config is None:
            config = load_config()
        servers = config.get("servers", [])
        result = []
        for s in servers:
            name = s.get("name")
            uri = s.get("uri")
            user = s.get("user")
            token = s.get("token")
            token_env = s.get("tokenEnv")
            if token_env:
                token_env_val = os.environ.get(token_env)
                if token_env_val:
                    token = token_env_val
            result.append({"name": name, "uri": uri, "user": user, "token": token})
        return result
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns a list of server names, which is basic output information, but fails to describe critical behaviors such as whether this requires authentication, how the list is formatted (e.g., sorted, paginated), or any rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational traits.

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 front-loaded with the core purpose in the first sentence, followed by a brief return statement. It avoids unnecessary elaboration, though the 'Returns:' section could be integrated more seamlessly. Overall, it is efficient with minimal waste, earning a high score for conciseness.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, 100% schema coverage, and an output schema exists), the description is adequate but not fully complete. It covers the basic purpose and return value, but lacks behavioral context (e.g., authentication needs, list characteristics) that would be helpful despite the output schema. For a read-only tool with no annotations, more disclosure would enhance completeness.

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 tool has zero parameters, and schema description coverage is 100%, so there are no parameters to document. The description appropriately omits parameter details, aligning with the schema's completeness. A baseline of 4 is applied since no parameters exist, and the description does not need to compensate for any gaps.

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 specific action ('Get the list') and resource ('all available Jenkins server names'), distinguishing it from sibling tools that focus on jobs, builds, parameters, or scenarios. It provides a precise verb+resource combination that leaves no ambiguity about its function.

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?

The description implies usage when server names are needed, but offers no explicit guidance on when to use this tool versus alternatives (e.g., for server discovery vs. job-related operations). It lacks any mention of prerequisites, exclusions, or comparative context with sibling tools, leaving usage decisions to inference.

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/xhuaustc/jenkins-mcp'

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