Skip to main content
Glama

list_nodes

Retrieve basic information about all nodes in a Kubernetes cluster by specifying the context name. Returns JSON data for easy analysis and management.

Instructions

List all nodes in the Kubernetes cluster.

Args: context_name: The Kubernetes context name

Returns: JSON string containing basic information about all nodes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes

Implementation Reference

  • The list_nodes tool handler: lists all Kubernetes nodes in the specified context and returns their names as JSON. Registered via @mcp.tool() decorator.
    @mcp.tool() @use_current_context def list_nodes(context_name: str): """ List all nodes in the Kubernetes cluster. Args: context_name: The Kubernetes context name Returns: JSON string containing basic information about all nodes """ core_v1: CoreV1Api = get_api_clients(context_name)["core"] nodes = core_v1.list_node() result = [{"name": node.metadata.name} for node in nodes.items] return json.dumps(result)

Other Tools

Related 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/bourbonkk/k8s-pilot'

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