Skip to main content
Glama

get_boot_volume

Retrieve detailed boot volume information including size, performance metrics, and source image data from Oracle Cloud Infrastructure using the boot volume OCID.

Instructions

Get detailed information about a specific boot volume.

Args:
    boot_volume_id: OCID of the boot volume to retrieve

Returns:
    Detailed boot volume information including size, performance, and source image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boot_volume_idYes

Implementation Reference

  • Core handler function implementing the logic to retrieve boot volume details using OCI BlockstorageClient.get_boot_volume and formatting the response.
    def get_boot_volume(block_storage_client: oci.core.BlockstorageClient, boot_volume_id: str) -> Dict[str, Any]:
        """
        Get details of a specific boot volume.
        
        Args:
            block_storage_client: OCI BlockStorage client
            boot_volume_id: OCID of the boot volume
            
        Returns:
            Details of the boot volume
        """
        try:
            boot_volume = block_storage_client.get_boot_volume(boot_volume_id).data
            
            boot_volume_details = {
                "id": boot_volume.id,
                "display_name": boot_volume.display_name,
                "compartment_id": boot_volume.compartment_id,
                "availability_domain": boot_volume.availability_domain,
                "size_in_mbs": boot_volume.size_in_mbs,
                "size_in_gbs": boot_volume.size_in_gbs,
                "lifecycle_state": boot_volume.lifecycle_state,
                "time_created": str(boot_volume.time_created),
                "is_hydrated": boot_volume.is_hydrated,
                "vpus_per_gb": boot_volume.vpus_per_gb,
                "is_auto_tune_enabled": boot_volume.is_auto_tune_enabled,
                "auto_tuned_vpus_per_gb": boot_volume.auto_tuned_vpus_per_gb,
                "kms_key_id": boot_volume.kms_key_id,
                "source_details": {
                    "type": boot_volume.source_details.type if boot_volume.source_details else None,
                    "id": boot_volume.source_details.id if boot_volume.source_details else None,
                } if boot_volume.source_details else None,
            }
            
            logger.info(f"Retrieved details for boot volume {boot_volume_id}")
            return boot_volume_details
            
        except Exception as e:
            logger.exception(f"Error getting boot volume details: {e}")
            raise
  • MCP tool registration using @mcp.tool(name='get_boot_volume'), including wrapper decorator for logging/error handling and docstring schema, which delegates to the core handler.
    @mcp.tool(name="get_boot_volume")
    @mcp_tool_wrapper(
        start_msg="Getting boot volume details for {boot_volume_id}...",
        success_msg="Retrieved boot volume details successfully",
        error_prefix="Error getting boot volume details"
    )
    async def mcp_get_boot_volume(ctx: Context, boot_volume_id: str) -> Dict[str, Any]:
        """
        Get detailed information about a specific boot volume.
    
        Args:
            boot_volume_id: OCID of the boot volume to retrieve
    
        Returns:
            Detailed boot volume information including size, performance, and source image
        """
        return get_boot_volume(oci_clients["block_storage"], boot_volume_id)
  • Docstring providing input schema (boot_volume_id parameter) and output description for the MCP tool.
    """
    Get detailed information about a specific boot volume.
    
    Args:
        boot_volume_id: OCID of the boot volume to retrieve
    
    Returns:
        Detailed boot volume information including size, performance, and source image
    """

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