Skip to main content
Glama

get_db_system

Retrieve detailed information about Oracle Cloud Infrastructure database systems to monitor configurations, check status, and manage resources.

Instructions

Get DB System details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
db_system_idYes

Implementation Reference

  • MCP tool handler 'mcp_get_db_system' that calls the helper function with OCI database client to retrieve and return DB System details.
    @mcp.tool(name="get_db_system")
    @mcp_tool_wrapper(
        start_msg="Getting DB System {db_system_id}...",
        success_msg="Retrieved DB System successfully",
        error_prefix="Error getting DB System"
    )
    async def mcp_get_db_system(ctx: Context, db_system_id: str) -> Dict[str, Any]:
        """Get DB System details."""
        return get_db_system(oci_clients["database"], db_system_id)
  • Helper function that fetches DB System details using OCI SDK and formats the response dictionary.
    def get_db_system(database_client: oci.database.DatabaseClient, db_system_id: str) -> Dict[str, Any]:
        """Get DB System details."""
        try:
            d = database_client.get_db_system(db_system_id).data
            return {
                "id": d.id,
                "display_name": d.display_name,
                "lifecycle_state": d.lifecycle_state,
                "shape": d.shape,
                "database_edition": getattr(d, "database_edition", None),
                "availability_domain": getattr(d, "availability_domain", None),
                "time_created": str(getattr(d, "time_created", "")),
                "subnet_id": getattr(d, "subnet_id", None),
                "compartment_id": d.compartment_id,
                "node_count": getattr(d, "node_count", None),
                "version": getattr(d, "version", None),
                "cpu_core_count": getattr(d, "cpu_core_count", None),
                "data_storage_size_in_gb": getattr(d, "data_storage_size_in_gb", None),
                "listener_port": getattr(d, "listener_port", None),
                "scan_dns_record_id": getattr(d, "scan_dns_record_id", None),
                "ssh_public_keys": getattr(d, "ssh_public_keys", None),
            }
        except Exception as e:
            logger.exception(f"Error getting DB System: {e}")
            raise

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