Skip to main content
Glama

list_fault_domains

Retrieve fault domains within an availability domain to plan high-availability deployments and distribute resources across isolated hardware segments in Oracle Cloud Infrastructure.

Instructions

List all fault domains in an availability domain.

Args:
    compartment_id: OCID of the compartment
    availability_domain: Name of the availability domain

Returns:
    List of fault domains with their names and IDs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compartment_idYes
availability_domainYes

Implementation Reference

  • MCP tool handler function registered as 'list_fault_domains'. Wraps the core helper with error handling, logging, and profile checks; delegates to resources.list_fault_domains.
    @mcp.tool(name="list_fault_domains")
    @mcp_tool_wrapper(
        start_msg="Listing fault domains in availability domain {availability_domain}...",
        error_prefix="Error listing fault domains"
    )
    async def mcp_list_fault_domains(ctx: Context, compartment_id: str, availability_domain: str) -> List[Dict[str, Any]]:
        """
        List all fault domains in an availability domain.
    
        Args:
            compartment_id: OCID of the compartment
            availability_domain: Name of the availability domain
    
        Returns:
            List of fault domains with their names and IDs
        """
        return list_fault_domains(oci_clients["identity"], compartment_id, availability_domain)
  • Tool registration via @mcp.tool(name="list_fault_domains") decorator on the handler function.
    @mcp.tool(name="list_fault_domains")
    @mcp_tool_wrapper(
        start_msg="Listing fault domains in availability domain {availability_domain}...",
        error_prefix="Error listing fault domains"
    )
    async def mcp_list_fault_domains(ctx: Context, compartment_id: str, availability_domain: str) -> List[Dict[str, Any]]:
        """
        List all fault domains in an availability domain.
    
        Args:
            compartment_id: OCID of the compartment
            availability_domain: Name of the availability domain
    
        Returns:
            List of fault domains with their names and IDs
        """
        return list_fault_domains(oci_clients["identity"], compartment_id, availability_domain)
  • Supporting utility function that performs the actual OCI API call to list_fault_domains and formats the response data.
    def list_fault_domains(identity_client: oci.identity.IdentityClient, compartment_id: str, 
                           availability_domain: str) -> List[Dict[str, Any]]:
        """
        List all fault domains in an availability domain.
        
        Args:
            identity_client: OCI Identity client
            compartment_id: OCID of the compartment
            availability_domain: Name of the availability domain
            
        Returns:
            List of fault domains with their details
        """
        try:
            fds_response = identity_client.list_fault_domains(
                compartment_id=compartment_id,
                availability_domain=availability_domain
            )
            
            fds = []
            for fd in fds_response.data:
                fds.append({
                    "name": fd.name,
                    "id": fd.id,
                    "compartment_id": fd.compartment_id,
                    "availability_domain": fd.availability_domain,
                })
            
            logger.info(f"Found {len(fds)} fault domains in availability domain {availability_domain}")
            return fds
            
        except Exception as e:
            logger.exception(f"Error listing fault domains: {e}")
            raise
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It states the tool lists fault domains but does not cover critical aspects like whether it's a read-only operation, potential rate limits, authentication requirements, or pagination behavior. The description adds limited value 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.

Conciseness5/5

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

The description is well-structured and concise, with a clear purpose statement followed by Args and Returns sections. Every sentence adds value without redundancy, making it easy to parse and understand quickly.

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 (2 required parameters, no output schema, no annotations), the description is moderately complete. It covers the purpose and parameters but lacks behavioral details and usage guidelines. For a simple list tool, this is adequate but leaves gaps in operational context.

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 both parameters: 'compartment_id: OCID of the compartment' and 'availability_domain: Name of the availability domain.' Since schema description coverage is 0%, this compensates well by explaining what each parameter represents, though it lacks format details like OCID structure or domain naming conventions.

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: 'List all fault domains in an availability domain.' It specifies the verb ('List'), resource ('fault domains'), and scope ('in an availability domain'). However, it does not explicitly differentiate from sibling tools like 'list_availability_domains' or 'list_regions,' 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 lacks context on prerequisites, such as needing compartment and availability domain information, and does not mention sibling tools like 'list_availability_domains' for related operations. This results in minimal usage direction.

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