jenkins_list_nodes
Retrieve a list of Jenkins nodes visible to you, with customizable fields to display.
Instructions
List Jenkins computers/nodes visible to the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tree | No | computer[displayName,offline,temporarilyOffline,numExecutors,assignedLabels[name]] |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/jenkins_mcp_server/tools.py:187-194 (handler)The actual handler/function that implements the jenkins_list_nodes tool. It calls /computer API with a tree filter to list Jenkins nodes.
@mcp.tool() def jenkins_list_nodes( tree: str = ( "computer[displayName,offline,temporarilyOffline,numExecutors,assignedLabels[name]]" ), ) -> dict[str, Any]: """List Jenkins computers/nodes visible to the user.""" return _run(lambda: _get_json("computer", params={"tree": tree})) - src/jenkins_mcp_server/tools.py:367-370 (registration)Tool name listed in READ_ONLY_TOOLS array, categorizing it as a read-only tool.
"jenkins_list_nodes", "jenkins_get_node", "jenkins_list_plugins", ] - src/jenkins_mcp_server/tools.py:55-55 (registration)The tool is registered via the @mcp.tool() decorator inside register_tools(), meaning it's auto-registered as an MCP tool when register_tools() is called.
def register_tools(mcp: FastMCP) -> None: - The _get_json helper function is called by the handler to perform the API request to Jenkins.
def _get_json(path: str, params: dict[str, Any] | None = None) -> Any: with _client() as client: