Skip to main content
Glama

list_regions

Retrieve available Oracle Cloud Infrastructure regions with keys and names for resource management and deployment planning.

Instructions

List all available OCI regions.

Returns:
    List of regions with their keys and names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that executes the logic to list all available OCI regions using the OCI IdentityClient, processes the response, and returns a list of dictionaries containing region key and name.
    def list_regions(identity_client: oci.identity.IdentityClient) -> List[Dict[str, Any]]:
        """
        List all available regions.
        
        Args:
            identity_client: OCI Identity client
            
        Returns:
            List of regions with their details
        """
        try:
            regions_response = identity_client.list_regions()
            
            regions = []
            for region in regions_response.data:
                regions.append({
                    "key": region.key,
                    "name": region.name,
                })
            
            logger.info(f"Found {len(regions)} regions")
            return regions
            
        except Exception as e:
            logger.exception(f"Error listing regions: {e}")
            raise
  • Registration of the 'list_regions' tool in the MCP server using the @mcp.tool decorator. This wrapper function handles MCP context, applies common error handling via mcp_tool_wrapper, and delegates to the core handler.
    @mcp.tool(name="list_regions")
    @mcp_tool_wrapper(
        start_msg="Listing all available OCI regions...",
        error_prefix="Error listing regions"
    )
    async def mcp_list_regions(ctx: Context) -> List[Dict[str, Any]]:
        """
        List all available OCI regions.
    
        Returns:
            List of regions with their keys and names
        """
        return list_regions(oci_clients["identity"])
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 mentions the return format ('List of regions with their keys and names'), which adds some value beyond the basic purpose. However, it lacks critical details like whether this is a read-only operation, if it requires authentication, potential rate limits, or error conditions—important for a tool in a cloud infrastructure context.

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 extremely concise and well-structured: two sentences that directly state the purpose and return format, with zero wasted words. It's front-loaded with the core function, making it easy for an agent to parse 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 simplicity (0 parameters, no annotations, no output schema), the description is adequate but has gaps. It explains what the tool does and the return format, which is sufficient for basic use. However, in a cloud infrastructure context with no annotations, more behavioral context (e.g., safety, auth needs) would improve completeness for agent decision-making.

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 tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to explain any parameters, so it naturally meets expectations. A baseline of 4 is appropriate as there are no parameters to document, and the description focuses correctly on output semantics.

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 available OCI regions.' It uses a specific verb ('List') and resource ('OCI regions'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_availability_domains' or 'list_fault_domains' that also list OCI resources, which prevents a perfect score.

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. With many sibling tools that list various OCI resources (e.g., 'list_availability_domains', 'list_compartments'), there's no indication of context, prerequisites, or exclusions. The agent must infer usage from the tool name alone.

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