Skip to main content
Glama

get_volume

Retrieve detailed information about a specific Oracle Cloud Infrastructure Block Storage volume, including size, performance tier, and backup policy, by providing its OCID.

Instructions

Get detailed information about a specific Block Storage volume.

Args:
    volume_id: OCID of the volume to retrieve

Returns:
    Detailed volume information including size, performance tier, and backup policy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
volume_idYes

Implementation Reference

  • The core handler function that retrieves detailed information about a specific OCI block volume using the BlockstorageClient. It extracts and formats volume properties into a dictionary.
    def get_volume(block_storage_client: oci.core.BlockstorageClient, volume_id: str) -> Dict[str, Any]:
        """
        Get details of a specific volume.
        
        Args:
            block_storage_client: OCI BlockStorage client
            volume_id: OCID of the volume
            
        Returns:
            Details of the volume
        """
        try:
            volume = block_storage_client.get_volume(volume_id).data
            
            volume_details = {
                "id": volume.id,
                "display_name": volume.display_name,
                "compartment_id": volume.compartment_id,
                "availability_domain": volume.availability_domain,
                "size_in_mbs": volume.size_in_mbs,
                "size_in_gbs": volume.size_in_gbs,
                "lifecycle_state": volume.lifecycle_state,
                "time_created": str(volume.time_created),
                "volume_group_id": volume.volume_group_id,
                "is_hydrated": volume.is_hydrated,
                "vpus_per_gb": volume.vpus_per_gb,
                "is_auto_tune_enabled": volume.is_auto_tune_enabled,
                "auto_tuned_vpus_per_gb": volume.auto_tuned_vpus_per_gb,
                "kms_key_id": volume.kms_key_id,
                "source_details": {
                    "type": volume.source_details.type if volume.source_details else None,
                    "id": volume.source_details.id if volume.source_details else None,
                } if volume.source_details else None,
            }
            
            logger.info(f"Retrieved details for volume {volume_id}")
            return volume_details
            
        except Exception as e:
            logger.exception(f"Error getting volume details: {e}")
            raise
  • MCP tool registration for 'get_volume'. This async wrapper function registers the tool with the FastMCP server, provides input validation via type hints, adds logging and error handling via mcp_tool_wrapper, and delegates to the core handler.
    @mcp.tool(name="get_volume")
    @mcp_tool_wrapper(
        start_msg="Getting volume details for {volume_id}...",
        success_msg="Retrieved volume details successfully",
        error_prefix="Error getting volume details"
    )
    async def mcp_get_volume(ctx: Context, volume_id: str) -> Dict[str, Any]:
        """
        Get detailed information about a specific Block Storage volume.
    
        Args:
            volume_id: OCID of the volume to retrieve
    
        Returns:
            Detailed volume information including size, performance tier, and backup policy
        """
        return get_volume(oci_clients["block_storage"], volume_id)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves detailed information, implying a read-only operation, but doesn't specify authentication requirements, rate limits, error conditions, or whether it's safe to invoke. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 a clear purpose statement followed by specific sections for 'Args' and 'Returns.' Every sentence adds value without redundancy, making it efficient and easy to parse.

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 low complexity (1 parameter, no nested objects) and lack of annotations or output schema, the description is moderately complete. It covers the basic purpose and parameter semantics but lacks behavioral details and usage guidelines. For a simple retrieval tool, this is adequate but has clear gaps, especially in guiding the agent on when to use it.

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: 'volume_id: OCID of the volume to retrieve.' Since schema description coverage is 0% (the schema only provides a title 'Volume Id' and type 'string'), this clarifies that 'OCID' refers to Oracle Cloud Identifier, which is crucial for correct usage. However, it doesn't detail the format or constraints of OCIDs, preventing a perfect score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 Block Storage volume.' It specifies the verb ('Get') and resource ('Block Storage volume'), making the action clear. However, it doesn't explicitly differentiate from sibling tools like 'get_boot_volume' or 'list_volumes', which prevents a score of 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_volumes' for browsing volumes or 'get_boot_volume' for similar retrieval operations. Without any context on usage scenarios or exclusions, the agent lacks direction for tool selection.

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