Skip to main content
Glama

get_autonomous_database

Retrieve detailed information about an Oracle Cloud Infrastructure Autonomous Database, including connection strings, wallet details, and auto-scaling configuration settings.

Instructions

Get detailed information about a specific Autonomous Database.

Args:
    autonomous_database_id: OCID of the Autonomous Database to retrieve

Returns:
    Detailed Autonomous Database information including connection strings, wallet info, and auto-scaling settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
autonomous_database_idYes

Implementation Reference

  • Core handler function that executes the tool logic: fetches the Autonomous Database details using OCI DatabaseClient.get_autonomous_database and formats them into a structured dictionary response.
    def get_autonomous_database(database_client: oci.database.DatabaseClient, autonomous_database_id: str) -> Dict[str, Any]:
        """
        Get details of a specific autonomous database.
        
        Args:
            database_client: OCI Database client
            autonomous_database_id: OCID of the autonomous database
            
        Returns:
            Details of the autonomous database
        """
        try:
            adb = database_client.get_autonomous_database(autonomous_database_id).data
            
            adb_details = {
                "id": adb.id,
                "db_name": adb.db_name,
                "display_name": adb.display_name,
                "compartment_id": adb.compartment_id,
                "lifecycle_state": adb.lifecycle_state,
                "time_created": str(adb.time_created),
                "cpu_core_count": adb.cpu_core_count,
                "data_storage_size_in_tbs": adb.data_storage_size_in_tbs,
                "is_free_tier": adb.is_free_tier,
                "is_auto_scaling_enabled": adb.is_auto_scaling_enabled,
                "db_workload": adb.db_workload,
                "db_version": adb.db_version,
                "license_model": adb.license_model,
                "is_dedicated": adb.is_dedicated,
                "autonomous_container_database_id": adb.autonomous_container_database_id,
                "is_access_control_enabled": adb.is_access_control_enabled,
                "whitelisted_ips": adb.whitelisted_ips,
                "are_primary_whitelisted_ips_used": adb.are_primary_whitelisted_ips_used,
                "standby_whitelisted_ips": adb.standby_whitelisted_ips,
                "is_data_guard_enabled": adb.is_data_guard_enabled,
                "is_local_data_guard_enabled": adb.is_local_data_guard_enabled,
                "subnet_id": adb.subnet_id,
                "nsg_ids": adb.nsg_ids,
                "private_endpoint": adb.private_endpoint,
                "private_endpoint_label": adb.private_endpoint_label,
                "connection_strings": {
                    "high": adb.connection_strings.high if adb.connection_strings else None,
                    "medium": adb.connection_strings.medium if adb.connection_strings else None,
                    "low": adb.connection_strings.low if adb.connection_strings else None,
                    "dedicated": adb.connection_strings.dedicated if adb.connection_strings else None,
                } if adb.connection_strings else None,
                "connection_urls": {
                    "sql_dev_web_url": adb.connection_urls.sql_dev_web_url if adb.connection_urls else None,
                    "apex_url": adb.connection_urls.apex_url if adb.connection_urls else None,
                    "machine_learning_user_management_url": adb.connection_urls.machine_learning_user_management_url if adb.connection_urls else None,
                    "graph_studio_url": adb.connection_urls.graph_studio_url if adb.connection_urls else None,
                    "mongo_db_url": adb.connection_urls.mongo_db_url if adb.connection_urls else None,
                } if adb.connection_urls else None,
            }
            
            logger.info(f"Retrieved details for autonomous database {autonomous_database_id}")
            return adb_details
            
        except Exception as e:
            logger.exception(f"Error getting autonomous database details: {e}")
            raise
  • MCP tool registration via @mcp.tool decorator on the wrapper function mcp_get_autonomous_database, which delegates to the core handler after adding logging, profile checks, and error handling.
    @mcp.tool(name="get_autonomous_database")
    @mcp_tool_wrapper(
        start_msg="Getting Autonomous Database details for {autonomous_database_id}...",
        success_msg="Retrieved Autonomous Database details successfully",
        error_prefix="Error getting Autonomous Database details"
    )
    async def mcp_get_autonomous_database(ctx: Context, autonomous_database_id: str) -> Dict[str, Any]:
        """
        Get detailed information about a specific Autonomous Database.
    
        Args:
            autonomous_database_id: OCID of the Autonomous Database to retrieve
    
        Returns:
            Detailed Autonomous Database information including connection strings, wallet info, and auto-scaling settings
        """
        return get_autonomous_database(oci_clients["database"], autonomous_database_id)
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 retrieves information, implying it's a read-only operation, but doesn't explicitly confirm this or mention any side effects, authentication requirements, rate limits, or error conditions. The description adds minimal behavioral context 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 zero wasted words. It starts with a clear purpose statement, followed by specific sections for 'Args' and 'Returns,' each providing essential information in a bullet-like format. Every sentence earns its place, making it 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 (one parameter, no output schema, no annotations), the description is adequate but has gaps. It explains the parameter and return content, but lacks behavioral details like read-only confirmation or error handling. For a simple retrieval tool, it meets minimum viability but could be more complete by addressing missing aspects.

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: it explains that 'autonomous_database_id' is an 'OCID of the Autonomous Database to retrieve.' This clarifies the parameter's purpose and format (OCID), which is valuable since the schema has 0% description coverage and only provides a title. With one parameter well-explained, the description compensates effectively.

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 Autonomous Database.' It specifies the verb ('Get') and resource ('Autonomous Database'), making the action clear. However, it doesn't explicitly differentiate from its sibling 'list_autonomous_databases' beyond the singular vs. plural naming, which is why it doesn't reach 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 the sibling 'list_autonomous_databases' for listing multiple databases or clarify that this is for retrieving details of a single, specific database identified by its OCID. Without such context, the agent lacks explicit usage instructions.

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