get_db_node
Retrieve detailed information about a specific database node in Oracle Cloud Infrastructure to monitor performance, check status, or manage configurations.
Instructions
Get DB Node details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db_node_id | Yes |
Implementation Reference
- Core handler function that executes the OCI API call to retrieve DB Node details and formats the response dictionary.def get_db_node(database_client: oci.database.DatabaseClient, db_node_id: str) -> Dict[str, Any]: """Get DB Node details.""" try: n = database_client.get_db_node(db_node_id).data return { "id": n.id, "db_system_id": n.db_system_id, "hostname": getattr(n, "hostname", None), "vnic_id": getattr(n, "vnic_id", None), "lifecycle_state": n.lifecycle_state, "software_storage_size_in_gb": getattr(n, "software_storage_size_in_gb", None), "time_created": str(getattr(n, "time_created", "")), } except Exception as e: logger.exception(f"Error getting DB Node: {e}") raise
- mcp_server_oci/mcp_server.py:513-522 (handler)MCP-registered tool handler for 'get_db_node', which wraps the core implementation with logging, error handling, and context support, delegating to the database client.@mcp.tool(name="get_db_node") @mcp_tool_wrapper( start_msg="Getting DB Node {db_node_id}...", success_msg="Retrieved DB Node successfully", error_prefix="Error getting DB Node" ) async def mcp_get_db_node(ctx: Context, db_node_id: str) -> Dict[str, Any]: """Get DB Node details.""" return get_db_node(oci_clients["database"], db_node_id)
- mcp_server_oci/mcp_server.py:116-127 (registration)Import statement registering the get_db_node helper function from dbsystems.py for use in the MCP server.list_db_systems, get_db_system, list_db_nodes, get_db_node, start_db_node, stop_db_node, reboot_db_node, reset_db_node, softreset_db_node, start_db_system_all_nodes, stop_db_system_all_nodes, )