Skip to main content
Glama

get_oke_node_pool

Retrieve detailed configuration and status information for a specific Oracle Container Engine for Kubernetes (OKE) node pool, including node specifications, placement settings, security configurations, and individual node states.

Instructions

Get detailed information about a specific node pool.

Args:
    node_pool_id: OCID of the node pool

Returns:
    Detailed node pool information including:
    - Node configuration (shape, image, SSH keys)
    - Individual node details (IPs, state, fault domains)
    - Placement configuration across ADs
    - Node eviction settings
    - Node pool cycling details
    - Initial node labels
    - Security settings (NSGs, encryption)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_pool_idYes

Implementation Reference

  • Core handler function that retrieves and formats detailed information about an OKE node pool using the OCI Container Engine client, including node configurations, individual nodes, eviction settings, and tags.
    def get_node_pool(container_engine_client: oci.container_engine.ContainerEngineClient,
                      node_pool_id: str) -> Dict[str, Any]:
        """
        Get details of a specific node pool.
    
        Args:
            container_engine_client: OCI ContainerEngine client
            node_pool_id: OCID of the node pool
    
        Returns:
            Details of the node pool
        """
        try:
            np = container_engine_client.get_node_pool(node_pool_id).data
    
            # Format node config details
            node_config_details = None
            if hasattr(np, 'node_config_details') and np.node_config_details:
                placement_configs = []
                if hasattr(np.node_config_details, 'placement_configs') and np.node_config_details.placement_configs:
                    for pc in np.node_config_details.placement_configs:
                        placement_configs.append({
                            "availability_domain": pc.availability_domain,
                            "subnet_id": pc.subnet_id,
                            "capacity_reservation_id": pc.capacity_reservation_id if hasattr(pc, 'capacity_reservation_id') else None,
                            "fault_domains": pc.fault_domains if hasattr(pc, 'fault_domains') else None,
                        })
    
                node_config_details = {
                    "size": np.node_config_details.size,
                    "placement_configs": placement_configs,
                    "nsg_ids": np.node_config_details.nsg_ids if hasattr(np.node_config_details, 'nsg_ids') else None,
                    "kms_key_id": np.node_config_details.kms_key_id if hasattr(np.node_config_details, 'kms_key_id') else None,
                    "is_pv_encryption_in_transit_enabled": np.node_config_details.is_pv_encryption_in_transit_enabled if hasattr(np.node_config_details, 'is_pv_encryption_in_transit_enabled') else None,
                    "freeform_tags": np.node_config_details.freeform_tags if hasattr(np.node_config_details, 'freeform_tags') else None,
                    "defined_tags": np.node_config_details.defined_tags if hasattr(np.node_config_details, 'defined_tags') else None,
                }
    
            # Format node shape config
            node_shape_config = None
            if hasattr(np, 'node_shape_config') and np.node_shape_config:
                node_shape_config = {
                    "ocpus": np.node_shape_config.ocpus if hasattr(np.node_shape_config, 'ocpus') else None,
                    "memory_in_gbs": np.node_shape_config.memory_in_gbs if hasattr(np.node_shape_config, 'memory_in_gbs') else None,
                }
    
            # Format node source details
            node_source_details = None
            if hasattr(np, 'node_source_details') and np.node_source_details:
                node_source_details = {
                    "source_type": np.node_source_details.source_type,
                    "image_id": np.node_source_details.image_id if hasattr(np.node_source_details, 'image_id') else None,
                    "boot_volume_size_in_gbs": np.node_source_details.boot_volume_size_in_gbs if hasattr(np.node_source_details, 'boot_volume_size_in_gbs') else None,
                }
    
            # Format initial node labels
            initial_node_labels = []
            if hasattr(np, 'initial_node_labels') and np.initial_node_labels:
                for label in np.initial_node_labels:
                    initial_node_labels.append({
                        "key": label.key if hasattr(label, 'key') else None,
                        "value": label.value if hasattr(label, 'value') else None,
                    })
    
            # Format node eviction node pool settings
            node_eviction_node_pool_settings = None
            if hasattr(np, 'node_eviction_node_pool_settings') and np.node_eviction_node_pool_settings:
                node_eviction_node_pool_settings = {
                    "eviction_grace_duration": np.node_eviction_node_pool_settings.eviction_grace_duration if hasattr(np.node_eviction_node_pool_settings, 'eviction_grace_duration') else None,
                    "is_force_delete_after_grace_duration": np.node_eviction_node_pool_settings.is_force_delete_after_grace_duration if hasattr(np.node_eviction_node_pool_settings, 'is_force_delete_after_grace_duration') else None,
                }
    
            # Format node pool cycling details
            node_pool_cycling_details = None
            if hasattr(np, 'node_pool_cycling_details') and np.node_pool_cycling_details:
                node_pool_cycling_details = {
                    "maximum_unavailable": np.node_pool_cycling_details.maximum_unavailable if hasattr(np.node_pool_cycling_details, 'maximum_unavailable') else None,
                    "maximum_surge": np.node_pool_cycling_details.maximum_surge if hasattr(np.node_pool_cycling_details, 'maximum_surge') else None,
                    "is_node_cycling_enabled": np.node_pool_cycling_details.is_node_cycling_enabled if hasattr(np.node_pool_cycling_details, 'is_node_cycling_enabled') else None,
                }
    
            node_pool_details = {
                "id": np.id,
                "name": np.name,
                "compartment_id": np.compartment_id,
                "cluster_id": np.cluster_id,
                "lifecycle_state": np.lifecycle_state,
                "lifecycle_details": np.lifecycle_details,
                "kubernetes_version": np.kubernetes_version,
                "node_image_id": np.node_image_id if hasattr(np, 'node_image_id') else None,
                "node_image_name": np.node_image_name if hasattr(np, 'node_image_name') else None,
                "node_shape": np.node_shape,
                "node_shape_config": node_shape_config,
                "node_source_details": node_source_details,
                "node_config_details": node_config_details,
                "initial_node_labels": initial_node_labels,
                "ssh_public_key": np.ssh_public_key if hasattr(np, 'ssh_public_key') else None,
                "quantity_per_subnet": np.quantity_per_subnet if hasattr(np, 'quantity_per_subnet') else None,
                "subnet_ids": np.subnet_ids if hasattr(np, 'subnet_ids') else None,
                "nodes": [
                    {
                        "id": node.id if hasattr(node, 'id') else None,
                        "name": node.name if hasattr(node, 'name') else None,
                        "availability_domain": node.availability_domain if hasattr(node, 'availability_domain') else None,
                        "subnet_id": node.subnet_id if hasattr(node, 'subnet_id') else None,
                        "lifecycle_state": node.lifecycle_state if hasattr(node, 'lifecycle_state') else None,
                        "fault_domain": node.fault_domain if hasattr(node, 'fault_domain') else None,
                        "private_ip": node.private_ip if hasattr(node, 'private_ip') else None,
                        "public_ip": node.public_ip if hasattr(node, 'public_ip') else None,
                        "node_error": {
                            "code": node.node_error.code if node.node_error and hasattr(node.node_error, 'code') else None,
                            "message": node.node_error.message if node.node_error and hasattr(node.node_error, 'message') else None,
                        } if hasattr(node, 'node_error') and node.node_error else None,
                    }
                    for node in np.nodes
                ] if hasattr(np, 'nodes') and np.nodes else [],
                "node_eviction_node_pool_settings": node_eviction_node_pool_settings,
                "node_pool_cycling_details": node_pool_cycling_details,
                "freeform_tags": np.freeform_tags if hasattr(np, 'freeform_tags') else None,
                "defined_tags": np.defined_tags if hasattr(np, 'defined_tags') else None,
                "time_created": str(np.time_created) if hasattr(np, 'time_created') and np.time_created else None,
            }
    
            logger.info(f"Retrieved details for node pool {node_pool_id}")
            return node_pool_details
    
        except Exception as e:
            logger.exception(f"Error getting node pool details: {e}")
            raise
  • MCP tool registration for 'get_oke_node_pool' with wrapper that handles context, logging, error handling, and calls the core get_node_pool function.
    @mcp.tool(name="get_oke_node_pool")
    @mcp_tool_wrapper(
        start_msg="Getting details for node pool {node_pool_id}...",
        error_prefix="Error getting node pool details"
    )
    async def mcp_get_oke_node_pool(ctx: Context, node_pool_id: str) -> Dict[str, Any]:
        """
        Get detailed information about a specific node pool.
    
        Args:
            node_pool_id: OCID of the node pool
    
        Returns:
            Detailed node pool information including:
            - Node configuration (shape, image, SSH keys)
            - Individual node details (IPs, state, fault domains)
            - Placement configuration across ADs
            - Node eviction settings
            - Node pool cycling details
            - Initial node labels
            - Security settings (NSGs, encryption)
        """
        return get_node_pool(oci_clients["container_engine"], node_pool_id)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It clearly indicates a read-only operation ('Get detailed information'), which is appropriate. However, it doesn't disclose behavioral traits like authentication requirements, rate limits, error conditions, or whether the operation is idempotent. The return details are listed but lack context on format or potential omissions.

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 well-structured and front-loaded with the core purpose. It uses bullet points efficiently to detail return values without unnecessary elaboration. Every sentence earns its place, and there's no redundant or verbose content.

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

Completeness4/5

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

Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is reasonably complete. It covers purpose, parameter semantics, and return details. However, it lacks information on authentication, error handling, or operational constraints, which would enhance completeness for a cloud resource tool.

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 description adds meaningful context for the single parameter: 'node_pool_id: OCID of the node pool.' This clarifies the parameter's purpose and format (OCID), which is valuable since schema description coverage is 0%. However, it doesn't provide examples or validation rules beyond the basic definition.

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 tool's purpose: 'Get detailed information about a specific node pool.' It specifies the verb ('Get') and resource ('node pool'), and distinguishes it from sibling tools like 'list_oke_node_pools' by focusing on a specific instance rather than listing multiple.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying 'a specific node pool' and providing the required 'node_pool_id' parameter. It differentiates from 'list_oke_node_pools' by focusing on detailed retrieval vs. listing. However, it lacks explicit when-not-to-use guidance or alternative tool mentions beyond this implicit distinction.

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/jopsis/mcp-server-oci'

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