Skip to main content
Glama

list_file_systems

Retrieve all File Storage file systems in a specified Oracle Cloud Infrastructure compartment and availability domain to view their state and metadata.

Instructions

List all File Storage file systems in a compartment and availability domain.

Args:
    compartment_id: OCID of the compartment to list file systems from
    availability_domain: Name of the availability domain

Returns:
    List of file systems with their state and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compartment_idYes
availability_domainYes

Implementation Reference

  • The core handler function that implements the logic to list OCI File Storage file systems in a compartment and availability domain using the OCI SDK's FileStorageClient with pagination support.
    def list_file_systems(file_storage_client: oci.file_storage.FileStorageClient, 
                          compartment_id: str, availability_domain: str) -> List[Dict[str, Any]]:
        """
        List all file systems in a compartment and availability domain.
        
        Args:
            file_storage_client: OCI FileStorage client
            compartment_id: OCID of the compartment
            availability_domain: Availability domain name
            
        Returns:
            List of file systems with their details
        """
        try:
            file_systems_response = oci.pagination.list_call_get_all_results(
                file_storage_client.list_file_systems,
                compartment_id,
                availability_domain
            )
            
            file_systems = []
            for file_system in file_systems_response.data:
                file_systems.append({
                    "id": file_system.id,
                    "display_name": file_system.display_name,
                    "compartment_id": file_system.compartment_id,
                    "availability_domain": file_system.availability_domain,
                    "lifecycle_state": file_system.lifecycle_state,
                    "time_created": str(file_system.time_created),
                    "metered_bytes": file_system.metered_bytes,
                    "is_clone_parent": file_system.is_clone_parent,
                    "is_hydrated": file_system.is_hydrated,
                    "lifecycle_details": file_system.lifecycle_details,
                    "kms_key_id": file_system.kms_key_id,
                })
            
            logger.info(f"Found {len(file_systems)} file systems in compartment {compartment_id}")
            return file_systems
            
        except Exception as e:
            logger.exception(f"Error listing file systems: {e}")
            raise
  • The MCP tool registration decorator @mcp.tool(name='list_file_systems') that defines the tool entrypoint, adds error handling wrapper, and delegates to the storage handler function.
    @mcp.tool(name="list_file_systems")
    @mcp_tool_wrapper(
        start_msg="Listing file systems in compartment {compartment_id}...",
        error_prefix="Error listing file systems"
    )
    async def mcp_list_file_systems(ctx: Context, compartment_id: str, availability_domain: str) -> List[Dict[str, Any]]:
        """
        List all File Storage file systems in a compartment and availability domain.
    
        Args:
            compartment_id: OCID of the compartment to list file systems from
            availability_domain: Name of the availability domain
    
        Returns:
            List of file systems with their state and metadata
        """
        return list_file_systems(oci_clients["file_storage"], compartment_id, availability_domain)
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. It states it's a list operation, implying read-only behavior, but doesn't disclose other traits like pagination, rate limits, authentication needs, or error handling. The description is minimal and lacks behavioral details beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the purpose stated first, followed by parameter and return sections. Each sentence adds value, though it could be slightly more detailed without losing conciseness.

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 no annotations and no output schema, the description is incomplete for a tool with two required parameters. It covers the basic purpose and parameters but lacks details on behavior, output format, and usage context, which are needed for effective tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description adds meaning by explaining that 'compartment_id' is an OCID and 'availability_domain' is a name, which clarifies the parameter types beyond the schema's string types. However, it doesn't provide format details or examples, leaving gaps in understanding.

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 action ('List all File Storage file systems') and the scope ('in a compartment and availability domain'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_file_system' (singular vs. plural), though the 'list' prefix implies a collection operation.

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, such as 'get_file_system' for retrieving a single file system or other list tools for different resources. It mentions the required parameters but doesn't explain usage context or prerequisites.

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