oci 2.154.2__py3-none-any.whl → 2.155.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (520) hide show
  1. oci/__init__.py +2 -2
  2. oci/access_governance_cp/access_governance_cp_client.py +8 -8
  3. oci/addons/adk/agent.py +82 -32
  4. oci/addons/adk/mcp/__init__.py +11 -0
  5. oci/addons/adk/mcp/mcp_client.py +420 -0
  6. oci/addons/adk/tool/function_tool.py +7 -3
  7. oci/addons/adk/tool/tool.py +11 -1
  8. oci/addons/adk/tool/toolkit.py +11 -2
  9. oci/adm/application_dependency_management_client.py +36 -36
  10. oci/ai_anomaly_detection/anomaly_detection_client.py +72 -72
  11. oci/ai_document/ai_service_document_client.py +26 -26
  12. oci/ai_language/ai_service_language_client.py +44 -44
  13. oci/ai_speech/ai_service_speech_client.py +19 -19
  14. oci/ai_vision/ai_service_vision_client.py +28 -28
  15. oci/analytics/analytics_client.py +24 -24
  16. oci/announcements_service/announcement_client.py +5 -5
  17. oci/announcements_service/announcement_subscription_client.py +9 -9
  18. oci/announcements_service/announcements_preferences_client.py +4 -4
  19. oci/announcements_service/service_client.py +1 -1
  20. oci/apiaccesscontrol/api_metadata_client.py +6 -6
  21. oci/apiaccesscontrol/privileged_api_control_client.py +12 -12
  22. oci/apiaccesscontrol/privileged_api_requests_client.py +14 -14
  23. oci/apiaccesscontrol/privileged_api_work_request_client.py +10 -10
  24. oci/apigateway/api_gateway_client.py +21 -21
  25. oci/apigateway/deployment_client.py +6 -6
  26. oci/apigateway/gateway_client.py +6 -6
  27. oci/apigateway/subscribers_client.py +6 -6
  28. oci/apigateway/usage_plans_client.py +6 -6
  29. oci/apigateway/work_requests_client.py +5 -5
  30. oci/apm_config/config_client.py +12 -12
  31. oci/apm_control_plane/apm_domain_client.py +14 -14
  32. oci/apm_synthetics/apm_synthetic_client.py +28 -28
  33. oci/apm_traces/__init__.py +3 -1
  34. oci/apm_traces/attributes_client.py +12 -12
  35. oci/apm_traces/models/__init__.py +25 -1
  36. oci/apm_traces/models/attribute.py +101 -0
  37. oci/apm_traces/models/attribute_metadata.py +149 -0
  38. oci/apm_traces/models/attribute_response.py +2 -2
  39. oci/apm_traces/models/attribute_update_response.py +2 -2
  40. oci/apm_traces/models/auto_activate_status.py +16 -0
  41. oci/apm_traces/models/auto_activate_toggle_status.py +16 -0
  42. oci/apm_traces/models/bulk_activate_attribute_detail.py +47 -8
  43. oci/apm_traces/models/bulk_de_activate_attribute_detail.py +7 -3
  44. oci/apm_traces/models/bulk_pin_attribute_detail.py +7 -3
  45. oci/apm_traces/models/bulk_unpin_attribute_detail.py +7 -3
  46. oci/apm_traces/models/bulk_update_attribute_detail.py +9 -5
  47. oci/apm_traces/models/bulk_update_attribute_notes_detail.py +7 -3
  48. oci/apm_traces/models/create_scheduled_query_details.py +471 -0
  49. oci/apm_traces/models/custom_metric.py +295 -0
  50. oci/apm_traces/models/log.py +475 -0
  51. oci/apm_traces/models/object_storage.py +132 -0
  52. oci/apm_traces/models/scheduled_query.py +666 -0
  53. oci/apm_traces/models/scheduled_query_collection.py +70 -0
  54. oci/apm_traces/models/scheduled_query_processing_config.py +120 -0
  55. oci/apm_traces/models/scheduled_query_summary.py +573 -0
  56. oci/apm_traces/models/streaming.py +70 -0
  57. oci/apm_traces/models/tag_metadata.py +2 -2
  58. oci/apm_traces/models/update_scheduled_query_details.py +471 -0
  59. oci/apm_traces/query_client.py +8 -6
  60. oci/apm_traces/scheduled_query_client.py +755 -0
  61. oci/apm_traces/scheduled_query_client_composite_operations.py +181 -0
  62. oci/apm_traces/trace_client.py +131 -6
  63. oci/appmgmt_control/appmgmt_control_client.py +8 -8
  64. oci/artifacts/artifacts_client.py +32 -32
  65. oci/audit/audit_client.py +3 -3
  66. oci/autoscaling/auto_scaling_client.py +11 -11
  67. oci/base_client.py +3 -0
  68. oci/bastion/bastion_client.py +15 -15
  69. oci/bds/bds_client.py +88 -88
  70. oci/blockchain/blockchain_platform_client.py +27 -27
  71. oci/budget/budget_client.py +10 -10
  72. oci/capacity_management/capacity_management_client.py +32 -32
  73. oci/capacity_management/demand_signal_client.py +13 -13
  74. oci/capacity_management/internal_demand_signal_client.py +12 -12
  75. oci/certificates/certificates_client.py +5 -5
  76. oci/certificates_management/certificates_management_client.py +32 -32
  77. oci/cims/incident_client.py +6 -6
  78. oci/cloud_bridge/common_client.py +5 -5
  79. oci/cloud_bridge/discovery_client.py +15 -15
  80. oci/cloud_bridge/inventory_client.py +16 -16
  81. oci/cloud_bridge/ocb_agent_svc_client.py +23 -23
  82. oci/cloud_guard/cloud_guard_client.py +155 -155
  83. oci/cloud_migrations/migration_client.py +43 -43
  84. oci/cluster_placement_groups/cluster_placement_groups_cp_client.py +13 -13
  85. oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +12 -12
  86. oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
  87. oci/compute_instance_agent/plugin_client.py +2 -2
  88. oci/compute_instance_agent/pluginconfig_client.py +1 -1
  89. oci/container_engine/container_engine_client.py +46 -46
  90. oci/container_instances/container_instance_client.py +18 -18
  91. oci/core/blockstorage_client.py +60 -60
  92. oci/core/compute_client.py +125 -125
  93. oci/core/compute_management_client.py +32 -32
  94. oci/core/virtual_network_client.py +258 -258
  95. oci/dashboard_service/dashboard_client.py +6 -6
  96. oci/dashboard_service/dashboard_group_client.py +6 -6
  97. oci/data_catalog/data_catalog_client.py +149 -149
  98. oci/data_flow/data_flow_client.py +45 -45
  99. oci/data_integration/data_integration_client.py +163 -163
  100. oci/data_labeling_service/data_labeling_management_client.py +17 -17
  101. oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
  102. oci/data_safe/data_safe_client.py +317 -317
  103. oci/data_science/data_science_client.py +145 -145
  104. oci/database/database_client.py +901 -421
  105. oci/database/database_client_composite_operations.py +123 -0
  106. oci/database/models/__init__.py +14 -0
  107. oci/database/models/autonomous_container_database.py +37 -0
  108. oci/database/models/autonomous_container_database_summary.py +37 -0
  109. oci/database/models/autonomous_database_software_image.py +37 -0
  110. oci/database/models/autonomous_database_software_image_summary.py +37 -0
  111. oci/database/models/autonomous_vm_cluster.py +37 -0
  112. oci/database/models/autonomous_vm_cluster_summary.py +37 -0
  113. oci/database/models/azure_encryption_key_details.py +80 -0
  114. oci/database/models/backup.py +7 -3
  115. oci/database/models/backup_destination.py +37 -0
  116. oci/database/models/backup_destination_configuration_summary.py +7 -3
  117. oci/database/models/backup_destination_details.py +7 -3
  118. oci/database/models/backup_destination_details_summary.py +7 -3
  119. oci/database/models/backup_destination_summary.py +37 -0
  120. oci/database/models/backup_summary.py +7 -3
  121. oci/database/models/change_cloud_autonomous_vm_cluster_subscription_details.py +105 -0
  122. oci/database/models/cloud_autonomous_vm_cluster.py +74 -2
  123. oci/database/models/cloud_autonomous_vm_cluster_summary.py +74 -2
  124. oci/database/models/cloud_vm_cluster.py +80 -2
  125. oci/database/models/cloud_vm_cluster_summary.py +80 -2
  126. oci/database/models/create_cloud_autonomous_vm_cluster_details.py +37 -2
  127. oci/database/models/create_cloud_vm_cluster_details.py +17 -17
  128. oci/database/models/create_database_base.py +1 -1
  129. oci/database/models/create_vm_cluster_details.py +2 -2
  130. oci/database/models/database.py +37 -0
  131. oci/database/models/database_software_image.py +37 -0
  132. oci/database/models/database_software_image_summary.py +37 -0
  133. oci/database/models/database_summary.py +37 -0
  134. oci/database/models/db_home.py +37 -0
  135. oci/database/models/db_home_from_agent_resource_id.py +37 -0
  136. oci/database/models/db_home_summary.py +37 -0
  137. oci/database/models/db_node.py +37 -0
  138. oci/database/models/db_node_summary.py +37 -0
  139. oci/database/models/db_server.py +37 -0
  140. oci/database/models/db_server_summary.py +37 -0
  141. oci/database/models/db_system.py +37 -0
  142. oci/database/models/db_system_summary.py +37 -0
  143. oci/database/models/encryption_key_location_details.py +15 -5
  144. oci/database/models/exadata_infrastructure.py +37 -0
  145. oci/database/models/exadata_infrastructure_summary.py +37 -0
  146. oci/database/models/execution_action.py +39 -2
  147. oci/database/models/execution_action_summary.py +39 -2
  148. oci/database/models/execution_window.py +39 -2
  149. oci/database/models/execution_window_summary.py +39 -2
  150. oci/database/models/external_container_database.py +37 -0
  151. oci/database/models/external_container_database_summary.py +37 -0
  152. oci/database/models/external_database_base.py +37 -0
  153. oci/database/models/external_database_connector.py +37 -0
  154. oci/database/models/external_database_connector_summary.py +37 -0
  155. oci/database/models/external_hsm_encryption_details.py +1 -1
  156. oci/database/models/external_macs_connector.py +7 -0
  157. oci/database/models/external_macs_connector_summary.py +7 -0
  158. oci/database/models/external_non_container_database.py +37 -0
  159. oci/database/models/external_non_container_database_summary.py +37 -0
  160. oci/database/models/external_pluggable_database.py +37 -0
  161. oci/database/models/external_pluggable_database_summary.py +37 -0
  162. oci/database/models/identity_connector_details.py +113 -0
  163. oci/database/models/key_store.py +39 -2
  164. oci/database/models/key_store_summary.py +39 -2
  165. oci/database/models/maintenance_run.py +37 -0
  166. oci/database/models/maintenance_run_history.py +39 -2
  167. oci/database/models/maintenance_run_history_summary.py +39 -2
  168. oci/database/models/maintenance_run_summary.py +37 -0
  169. oci/database/models/oneoff_patch.py +39 -2
  170. oci/database/models/oneoff_patch_summary.py +39 -2
  171. oci/database/models/pluggable_database.py +37 -0
  172. oci/database/models/pluggable_database_summary.py +37 -0
  173. oci/database/models/register_cloud_vm_cluster_pkcs_details.py +86 -0
  174. oci/database/models/resource_pool_member_collection.py +70 -0
  175. oci/database/models/resource_pool_member_summary.py +74 -0
  176. oci/database/models/scheduling_policy.py +39 -2
  177. oci/database/models/scheduling_policy_summary.py +39 -2
  178. oci/database/models/scheduling_window.py +39 -2
  179. oci/database/models/scheduling_window_summary.py +39 -2
  180. oci/database/models/unregister_cloud_vm_cluster_pkcs_details.py +86 -0
  181. oci/database/models/vm_cluster.py +37 -0
  182. oci/database/models/vm_cluster_network.py +39 -2
  183. oci/database/models/vm_cluster_network_summary.py +39 -2
  184. oci/database/models/vm_cluster_summary.py +37 -0
  185. oci/database_management/db_management_client.py +229 -229
  186. oci/database_management/diagnosability_client.py +4 -4
  187. oci/database_management/managed_my_sql_databases_client.py +15 -15
  188. oci/database_management/perfhub_client.py +1 -1
  189. oci/database_management/sql_tuning_client.py +17 -17
  190. oci/database_migration/database_migration_client.py +155 -42
  191. oci/database_migration/database_migration_client_composite_operations.py +42 -0
  192. oci/database_migration/models/__init__.py +4 -0
  193. oci/database_migration/models/collect_traces_data.py +183 -0
  194. oci/database_migration/models/collect_traces_details.py +132 -0
  195. oci/database_migration/models/job.py +27 -0
  196. oci/database_tools/database_tools_client.py +23 -23
  197. oci/dblm/db_life_cycle_management_client.py +14 -14
  198. oci/dbmulticloud/__init__.py +28 -0
  199. oci/dbmulticloud/models/__init__.py +112 -0
  200. oci/dbmulticloud/models/arc_agent_nodes.py +218 -0
  201. oci/dbmulticloud/models/change_multi_cloud_resource_discovery_compartment_details.py +191 -0
  202. oci/dbmulticloud/models/change_oracle_db_azure_blob_container_compartment_details.py +187 -0
  203. oci/dbmulticloud/models/change_oracle_db_azure_blob_mount_compartment_details.py +187 -0
  204. oci/dbmulticloud/models/change_oracle_db_azure_connector_compartment_details.py +187 -0
  205. oci/dbmulticloud/models/change_oracle_db_azure_vault_association_compartment_details.py +191 -0
  206. oci/dbmulticloud/models/change_oracle_db_azure_vault_compartment_details.py +191 -0
  207. oci/dbmulticloud/models/create_multi_cloud_resource_discovery_details.py +253 -0
  208. oci/dbmulticloud/models/create_oracle_db_azure_blob_container_details.py +307 -0
  209. oci/dbmulticloud/models/create_oracle_db_azure_blob_mount_details.py +245 -0
  210. oci/dbmulticloud/models/create_oracle_db_azure_connector_details.py +431 -0
  211. oci/dbmulticloud/models/create_oracle_db_azure_vault_association_details.py +257 -0
  212. oci/dbmulticloud/models/create_oracle_db_azure_vault_details.py +377 -0
  213. oci/dbmulticloud/models/multi_cloud_resource_discovery.py +577 -0
  214. oci/dbmulticloud/models/multi_cloud_resource_discovery_summary.py +517 -0
  215. oci/dbmulticloud/models/multi_cloud_resource_discovery_summary_collection.py +70 -0
  216. oci/dbmulticloud/models/oracle_db_azure_blob_container.py +568 -0
  217. oci/dbmulticloud/models/oracle_db_azure_blob_container_summary.py +536 -0
  218. oci/dbmulticloud/models/oracle_db_azure_blob_container_summary_collection.py +70 -0
  219. oci/dbmulticloud/models/oracle_db_azure_blob_mount.py +537 -0
  220. oci/dbmulticloud/models/oracle_db_azure_blob_mount_summary.py +505 -0
  221. oci/dbmulticloud/models/oracle_db_azure_blob_mount_summary_collection.py +70 -0
  222. oci/dbmulticloud/models/oracle_db_azure_connector.py +739 -0
  223. oci/dbmulticloud/models/oracle_db_azure_connector_summary.py +660 -0
  224. oci/dbmulticloud/models/oracle_db_azure_connector_summary_collection.py +70 -0
  225. oci/dbmulticloud/models/oracle_db_azure_key.py +518 -0
  226. oci/dbmulticloud/models/oracle_db_azure_key_summary.py +486 -0
  227. oci/dbmulticloud/models/oracle_db_azure_key_summary_collection.py +70 -0
  228. oci/dbmulticloud/models/oracle_db_azure_vault.py +642 -0
  229. oci/dbmulticloud/models/oracle_db_azure_vault_association.py +553 -0
  230. oci/dbmulticloud/models/oracle_db_azure_vault_association_summary.py +521 -0
  231. oci/dbmulticloud/models/oracle_db_azure_vault_association_summary_collection.py +70 -0
  232. oci/dbmulticloud/models/oracle_db_azure_vault_summary.py +610 -0
  233. oci/dbmulticloud/models/oracle_db_azure_vault_summary_collection.py +70 -0
  234. oci/dbmulticloud/models/patch_oracle_db_azure_connector_details.py +187 -0
  235. oci/dbmulticloud/models/resources.py +229 -0
  236. oci/dbmulticloud/models/update_multi_cloud_resource_discovery_details.py +253 -0
  237. oci/dbmulticloud/models/update_oracle_db_azure_blob_container_details.py +307 -0
  238. oci/dbmulticloud/models/update_oracle_db_azure_blob_mount_details.py +245 -0
  239. oci/dbmulticloud/models/update_oracle_db_azure_connector_details.py +431 -0
  240. oci/dbmulticloud/models/update_oracle_db_azure_vault_association_details.py +257 -0
  241. oci/dbmulticloud/models/update_oracle_db_azure_vault_details.py +377 -0
  242. oci/dbmulticloud/models/work_request.py +496 -0
  243. oci/dbmulticloud/models/work_request_error.py +134 -0
  244. oci/dbmulticloud/models/work_request_error_collection.py +70 -0
  245. oci/dbmulticloud/models/work_request_log_entry.py +101 -0
  246. oci/dbmulticloud/models/work_request_log_entry_collection.py +70 -0
  247. oci/dbmulticloud/models/work_request_resource.py +232 -0
  248. oci/dbmulticloud/models/work_request_summary.py +496 -0
  249. oci/dbmulticloud/models/work_request_summary_collection.py +70 -0
  250. oci/dbmulticloud/multi_cloud_resource_discovery_client.py +883 -0
  251. oci/dbmulticloud/multi_cloud_resource_discovery_client_composite_operations.py +202 -0
  252. oci/dbmulticloud/oracle_db_azure_blob_container_client.py +864 -0
  253. oci/dbmulticloud/oracle_db_azure_blob_container_client_composite_operations.py +196 -0
  254. oci/dbmulticloud/oracle_db_azure_blob_mount_client.py +865 -0
  255. oci/dbmulticloud/oracle_db_azure_blob_mount_client_composite_operations.py +196 -0
  256. oci/dbmulticloud/oracle_db_azure_connector_client.py +963 -0
  257. oci/dbmulticloud/oracle_db_azure_connector_client_composite_operations.py +239 -0
  258. oci/dbmulticloud/oracle_db_azure_key_client.py +419 -0
  259. oci/dbmulticloud/oracle_db_azure_key_client_composite_operations.py +26 -0
  260. oci/dbmulticloud/oracle_db_azure_vault_association_client.py +979 -0
  261. oci/dbmulticloud/oracle_db_azure_vault_association_client_composite_operations.py +235 -0
  262. oci/dbmulticloud/oracle_db_azure_vault_client.py +979 -0
  263. oci/dbmulticloud/oracle_db_azure_vault_client_composite_operations.py +235 -0
  264. oci/dbmulticloud/work_request_client.py +770 -0
  265. oci/dbmulticloud/work_request_client_composite_operations.py +26 -0
  266. oci/delegate_access_control/delegate_access_control_client.py +26 -26
  267. oci/delegate_access_control/work_request_client.py +4 -4
  268. oci/demand_signal/occ_demand_signal_client.py +7 -7
  269. oci/desktops/desktop_service_client.py +21 -21
  270. oci/devops/devops_client.py +141 -141
  271. oci/disaster_recovery/disaster_recovery_client.py +31 -31
  272. oci/distributed_database/distributed_autonomous_db_service_client.py +18 -18
  273. oci/distributed_database/distributed_db_private_endpoint_service_client.py +7 -7
  274. oci/distributed_database/distributed_db_service_client.py +19 -19
  275. oci/distributed_database/distributed_db_work_request_service_client.py +4 -4
  276. oci/dns/dns_client.py +54 -54
  277. oci/dts/appliance_export_job_client.py +6 -6
  278. oci/dts/shipping_vendors_client.py +1 -1
  279. oci/dts/transfer_appliance_client.py +8 -8
  280. oci/dts/transfer_appliance_entitlement_client.py +3 -3
  281. oci/dts/transfer_device_client.py +5 -5
  282. oci/dts/transfer_job_client.py +6 -6
  283. oci/dts/transfer_package_client.py +7 -7
  284. oci/em_warehouse/em_warehouse_client.py +13 -13
  285. oci/email/email_client.py +31 -31
  286. oci/email_data_plane/email_dp_client.py +1 -1
  287. oci/events/events_client.py +6 -6
  288. oci/file_storage/file_storage_client.py +74 -74
  289. oci/fleet_apps_management/fleet_apps_management_admin_client.py +27 -27
  290. oci/fleet_apps_management/fleet_apps_management_catalog_client.py +7 -7
  291. oci/fleet_apps_management/fleet_apps_management_client.py +32 -32
  292. oci/fleet_apps_management/fleet_apps_management_maintenance_window_client.py +5 -5
  293. oci/fleet_apps_management/fleet_apps_management_operations_client.py +29 -29
  294. oci/fleet_apps_management/fleet_apps_management_provision_client.py +6 -6
  295. oci/fleet_apps_management/fleet_apps_management_runbooks_client.py +19 -19
  296. oci/fleet_apps_management/fleet_apps_management_work_request_client.py +4 -4
  297. oci/fleet_software_update/fleet_software_update_client.py +46 -46
  298. oci/fleet_software_update/models/__init__.py +12 -0
  299. oci/fleet_software_update/models/create_fsu_cycle_details.py +11 -3
  300. oci/fleet_software_update/models/create_patch_fsu_cycle.py +1 -1
  301. oci/fleet_software_update/models/create_upgrade_fsu_cycle.py +147 -0
  302. oci/fleet_software_update/models/fsu_cycle.py +11 -3
  303. oci/fleet_software_update/models/fsu_cycle_summary.py +7 -3
  304. oci/fleet_software_update/models/patch_fsu_cycle.py +1 -1
  305. oci/fleet_software_update/models/update_fsu_cycle_details.py +11 -3
  306. oci/fleet_software_update/models/update_patch_fsu_cycle.py +1 -1
  307. oci/fleet_software_update/models/update_upgrade_fsu_cycle.py +118 -0
  308. oci/fleet_software_update/models/upgrade_db_collection_details.py +142 -0
  309. oci/fleet_software_update/models/upgrade_details.py +107 -0
  310. oci/fleet_software_update/models/upgrade_fsu_cycle.py +241 -0
  311. oci/fleet_software_update/models/upgrade_gi_collection_details.py +111 -0
  312. oci/functions/functions_invoke_client.py +1 -1
  313. oci/functions/functions_management_client.py +16 -16
  314. oci/fusion_apps/fusion_applications_client.py +41 -41
  315. oci/generative_ai/generative_ai_client.py +22 -22
  316. oci/generative_ai_agent/generative_ai_agent_client.py +38 -38
  317. oci/generative_ai_agent_runtime/generative_ai_agent_runtime_client.py +6 -6
  318. oci/generative_ai_inference/generative_ai_inference_client.py +6 -6
  319. oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
  320. oci/globally_distributed_database/sharded_database_service_client.py +30 -30
  321. oci/golden_gate/golden_gate_client.py +89 -89
  322. oci/governance_rules_control_plane/governance_rule_client.py +15 -15
  323. oci/governance_rules_control_plane/work_request_client.py +5 -5
  324. oci/healthchecks/health_checks_client.py +17 -17
  325. oci/identity/identity_client.py +145 -145
  326. oci/identity_data_plane/dataplane_client.py +2 -2
  327. oci/identity_domains/identity_domains_client.py +311 -311
  328. oci/integration/integration_instance_client.py +19 -19
  329. oci/jms/java_management_service_client.py +79 -79
  330. oci/jms_java_downloads/java_download_client.py +25 -25
  331. oci/key_management/ekm_client.py +5 -5
  332. oci/key_management/kms_crypto_client.py +6 -6
  333. oci/key_management/kms_hsm_cluster_client.py +12 -12
  334. oci/key_management/kms_management_client.py +21 -21
  335. oci/key_management/kms_vault_client.py +14 -14
  336. oci/license_manager/license_manager_client.py +18 -18
  337. oci/limits/limits_client.py +4 -4
  338. oci/limits/quotas_client.py +7 -7
  339. oci/load_balancer/load_balancer_client.py +61 -61
  340. oci/load_balancer/models/backend.py +4 -4
  341. oci/load_balancer/models/backend_details.py +10 -4
  342. oci/load_balancer/models/backend_set.py +6 -4
  343. oci/load_balancer/models/backend_set_details.py +12 -4
  344. oci/load_balancer/models/create_backend_details.py +10 -4
  345. oci/load_balancer/models/create_backend_set_details.py +12 -4
  346. oci/load_balancer/models/create_listener_details.py +6 -4
  347. oci/load_balancer/models/create_load_balancer_details.py +39 -0
  348. oci/load_balancer/models/listener.py +6 -4
  349. oci/load_balancer/models/listener_details.py +6 -4
  350. oci/load_balancer/models/load_balancer.py +61 -2
  351. oci/load_balancer/models/reserved_ip.py +4 -0
  352. oci/load_balancer/models/update_backend_details.py +10 -4
  353. oci/load_balancer/models/update_backend_set_details.py +12 -4
  354. oci/load_balancer/models/update_listener_details.py +6 -4
  355. oci/load_balancer/models/update_load_balancer_details.py +59 -0
  356. oci/lockbox/lockbox_client.py +24 -24
  357. oci/log_analytics/log_analytics_client.py +200 -200
  358. oci/logging/logging_management_client.py +30 -30
  359. oci/loggingingestion/logging_client.py +1 -1
  360. oci/loggingsearch/log_search_client.py +1 -1
  361. oci/lustre_file_storage/lustre_file_storage_client.py +11 -11
  362. oci/management_agent/management_agent_client.py +28 -28
  363. oci/management_dashboard/dashx_apis_client.py +18 -18
  364. oci/marketplace/account_client.py +2 -2
  365. oci/marketplace/marketplace_client.py +30 -30
  366. oci/marketplace_private_offer/attachment_client.py +5 -5
  367. oci/marketplace_private_offer/offer_client.py +6 -6
  368. oci/marketplace_publisher/attachment_client.py +5 -5
  369. oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
  370. oci/marketplace_publisher/offer_client.py +6 -6
  371. oci/media_services/media_services_client.py +60 -60
  372. oci/media_services/media_stream_client.py +2 -2
  373. oci/mngdmac/mac_device_client.py +3 -3
  374. oci/mngdmac/mac_order_client.py +11 -11
  375. oci/model_deployment/model_deployment_client.py +2 -2
  376. oci/monitoring/monitoring_client.py +18 -18
  377. oci/mysql/channels_client.py +7 -7
  378. oci/mysql/db_backups_client.py +8 -8
  379. oci/mysql/db_system_client.py +17 -17
  380. oci/mysql/models/__init__.py +2 -0
  381. oci/mysql/models/backup.py +29 -2
  382. oci/mysql/models/backup_summary.py +29 -2
  383. oci/mysql/models/copy_backup_details.py +29 -2
  384. oci/mysql/models/create_db_system_details.py +27 -0
  385. oci/mysql/models/db_system.py +27 -0
  386. oci/mysql/models/db_system_snapshot.py +27 -0
  387. oci/mysql/models/encrypt_data_details.py +117 -0
  388. oci/mysql/models/replica.py +27 -0
  389. oci/mysql/models/update_db_system_details.py +27 -0
  390. oci/mysql/mysqlaas_client.py +7 -7
  391. oci/mysql/replicas_client.py +5 -5
  392. oci/mysql/work_requests_client.py +4 -4
  393. oci/network_firewall/network_firewall_client.py +92 -92
  394. oci/network_load_balancer/network_load_balancer_client.py +35 -35
  395. oci/nosql/models/__init__.py +14 -0
  396. oci/nosql/models/configuration.py +109 -0
  397. oci/nosql/models/hosted_configuration.py +78 -0
  398. oci/nosql/models/kms_key.py +244 -0
  399. oci/nosql/models/multi_tenancy_configuration.py +49 -0
  400. oci/nosql/models/update_configuration_details.py +109 -0
  401. oci/nosql/models/update_hosted_configuration_details.py +78 -0
  402. oci/nosql/models/update_multi_tenancy_configuration_details.py +52 -0
  403. oci/nosql/models/work_request.py +7 -3
  404. oci/nosql/models/work_request_summary.py +7 -3
  405. oci/nosql/nosql_client.py +340 -25
  406. oci/nosql/nosql_client_composite_operations.py +81 -0
  407. oci/object_storage/object_storage_client.py +55 -55
  408. oci/oce/oce_instance_client.py +10 -10
  409. oci/oci_control_center/occ_metrics_client.py +3 -3
  410. oci/ocvp/cluster_client.py +5 -5
  411. oci/ocvp/esxi_host_client.py +8 -8
  412. oci/ocvp/sddc_client.py +14 -14
  413. oci/ocvp/work_request_client.py +4 -4
  414. oci/oda/management_client.py +59 -59
  415. oci/oda/oda_client.py +17 -17
  416. oci/oda/odapackage_client.py +7 -7
  417. oci/onesubscription/billing_schedule_client.py +1 -1
  418. oci/onesubscription/commitment_client.py +2 -2
  419. oci/onesubscription/computed_usage_client.py +3 -3
  420. oci/onesubscription/invoice_summary_client.py +2 -2
  421. oci/onesubscription/organization_subscription_client.py +1 -1
  422. oci/onesubscription/ratecard_client.py +1 -1
  423. oci/onesubscription/subscribed_service_client.py +2 -2
  424. oci/onesubscription/subscription_client.py +1 -1
  425. oci/ons/notification_control_plane_client.py +6 -6
  426. oci/ons/notification_data_plane_client.py +10 -10
  427. oci/opa/opa_instance_client.py +13 -13
  428. oci/opensearch/opensearch_cluster_backup_client.py +4 -4
  429. oci/opensearch/opensearch_cluster_client.py +17 -17
  430. oci/opensearch/opensearch_cluster_pipeline_client.py +5 -5
  431. oci/operator_access_control/access_requests_client.py +10 -10
  432. oci/operator_access_control/operator_actions_client.py +2 -2
  433. oci/operator_access_control/operator_control_assignment_client.py +8 -8
  434. oci/operator_access_control/operator_control_client.py +6 -6
  435. oci/opsi/operations_insights_client.py +181 -181
  436. oci/optimizer/optimizer_client.py +26 -26
  437. oci/os_management/event_client.py +8 -8
  438. oci/os_management/os_management_client.py +69 -69
  439. oci/os_management_hub/event_client.py +8 -8
  440. oci/os_management_hub/lifecycle_environment_client.py +13 -13
  441. oci/os_management_hub/managed_instance_client.py +33 -33
  442. oci/os_management_hub/managed_instance_group_client.py +26 -26
  443. oci/os_management_hub/management_station_client.py +10 -10
  444. oci/os_management_hub/onboarding_client.py +13 -13
  445. oci/os_management_hub/reporting_managed_instance_client.py +3 -3
  446. oci/os_management_hub/scheduled_job_client.py +7 -7
  447. oci/os_management_hub/software_source_client.py +33 -33
  448. oci/os_management_hub/work_request_client.py +5 -5
  449. oci/osp_gateway/address_rule_service_client.py +1 -1
  450. oci/osp_gateway/address_service_client.py +2 -2
  451. oci/osp_gateway/invoice_service_client.py +5 -5
  452. oci/osp_gateway/subscription_service_client.py +5 -5
  453. oci/osub_billing_schedule/billing_schedule_client.py +1 -1
  454. oci/osub_organization_subscription/organization_subscription_client.py +1 -1
  455. oci/osub_subscription/commitment_client.py +2 -2
  456. oci/osub_subscription/ratecard_client.py +1 -1
  457. oci/osub_subscription/subscription_client.py +1 -1
  458. oci/osub_usage/computed_usage_client.py +3 -3
  459. oci/psql/postgresql_client.py +34 -34
  460. oci/queue/queue_admin_client.py +11 -11
  461. oci/queue/queue_client.py +8 -8
  462. oci/recovery/database_recovery_client.py +26 -26
  463. oci/redis/oci_cache_user_client.py +7 -7
  464. oci/redis/redis_cluster_client.py +15 -15
  465. oci/redis/redis_identity_client.py +1 -1
  466. oci/resource_manager/resource_manager_client.py +52 -52
  467. oci/resource_scheduler/schedule_client.py +14 -14
  468. oci/resource_search/resource_search_client.py +3 -3
  469. oci/rover/rover_bundle_client.py +8 -8
  470. oci/rover/rover_cluster_client.py +8 -8
  471. oci/rover/rover_entitlement_client.py +6 -6
  472. oci/rover/rover_node_client.py +15 -15
  473. oci/rover/shape_client.py +1 -1
  474. oci/rover/work_requests_client.py +5 -5
  475. oci/sch/connector_plugins_client.py +2 -2
  476. oci/sch/service_connector_client.py +12 -12
  477. oci/secrets/secrets_client.py +3 -3
  478. oci/security_attribute/security_attribute_client.py +18 -18
  479. oci/service_catalog/service_catalog_client.py +26 -26
  480. oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
  481. oci/service_mesh/service_mesh_client.py +96 -96
  482. oci/stack_monitoring/stack_monitoring_client.py +87 -87
  483. oci/streaming/stream_admin_client.py +18 -18
  484. oci/streaming/stream_client.py +8 -8
  485. oci/tenant_manager_control_plane/domain_client.py +5 -5
  486. oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
  487. oci/tenant_manager_control_plane/governance_client.py +2 -2
  488. oci/tenant_manager_control_plane/link_client.py +3 -3
  489. oci/tenant_manager_control_plane/orders_client.py +2 -2
  490. oci/tenant_manager_control_plane/organization_client.py +10 -10
  491. oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
  492. oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
  493. oci/tenant_manager_control_plane/subscription_client.py +11 -11
  494. oci/tenant_manager_control_plane/work_request_client.py +4 -4
  495. oci/threat_intelligence/threatintel_client.py +5 -5
  496. oci/usage/resources_client.py +2 -2
  497. oci/usage/rewards_client.py +6 -6
  498. oci/usage/usagelimits_client.py +1 -1
  499. oci/usage_api/usageapi_client.py +33 -33
  500. oci/vault/vaults_client.py +13 -13
  501. oci/vbs_inst/vbs_instance_client.py +10 -10
  502. oci/version.py +1 -1
  503. oci/visual_builder/vb_instance_client.py +14 -14
  504. oci/vn_monitoring/vn_monitoring_client.py +12 -12
  505. oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
  506. oci/waa/waa_client.py +13 -13
  507. oci/waa/work_request_client.py +4 -4
  508. oci/waas/redirect_client.py +6 -6
  509. oci/waas/waas_client.py +66 -66
  510. oci/waf/waf_client.py +24 -24
  511. oci/wlms/weblogic_management_service_client.py +41 -41
  512. oci/wlms/weblogic_management_service_configuration_client.py +2 -2
  513. oci/work_requests/work_request_client.py +4 -4
  514. oci/zpr/zpr_client.py +15 -15
  515. {oci-2.154.2.dist-info → oci-2.155.0.dist-info}/METADATA +1 -1
  516. {oci-2.154.2.dist-info → oci-2.155.0.dist-info}/RECORD +520 -413
  517. {oci-2.154.2.dist-info → oci-2.155.0.dist-info}/LICENSE.txt +0 -0
  518. {oci-2.154.2.dist-info → oci-2.155.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  519. {oci-2.154.2.dist-info → oci-2.155.0.dist-info}/WHEEL +0 -0
  520. {oci-2.154.2.dist-info → oci-2.155.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,420 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+
6
+ import abc
7
+ import asyncio
8
+ import json
9
+ import sys
10
+ from abc import ABC, abstractmethod
11
+
12
+ from asyncio.subprocess import Process
13
+ from contextlib import AsyncExitStack, asynccontextmanager
14
+ from typing import Any, TextIO, Optional
15
+
16
+ from mcp import ClientSession, StdioServerParameters
17
+ from mcp.client.session_group import StreamableHttpParameters
18
+ from mcp import Tool as MCPTool
19
+ from mcp import stdio_client
20
+ from mcp.client.streamable_http import streamablehttp_client
21
+ from mcp.types import CallToolResult
22
+
23
+ from oci.addons.adk.agent_error import AgentError
24
+ from oci.addons.adk.logger import default_logger as logger
25
+ from oci.addons.adk.tool import FunctionTool
26
+ from oci.addons.adk.tool.toolkit import Toolkit
27
+
28
+
29
+ class MCPClient(ABC):
30
+ """Abstract base class for a MCP Client.
31
+
32
+ This class defines the interface for a MCP client, without imposing implementation
33
+ approach (e.g., Anthropic's ClientSession), or transport (e.g., stdio, SSE, etc.).
34
+ """
35
+
36
+ @abstractmethod
37
+ async def connect(self):
38
+ """Connect to the server.
39
+
40
+ This can spawn a subprocess or open a network connection, depending
41
+ on the transport used in the subclass's implementation.
42
+
43
+ The server will remain connected until `cleanup()` is called.
44
+ """
45
+ pass
46
+
47
+ @abstractmethod
48
+ async def cleanup(self):
49
+ """Cleanup the server connection.
50
+
51
+ This can close a subprocess or close a network connection, depending
52
+ on the transport used in the subclass's implementation.
53
+ """
54
+ pass
55
+
56
+ @property
57
+ @abstractmethod
58
+ def name(self) -> str:
59
+ """A readable name for the connection to the server.
60
+
61
+ This is used for logging and debugging purposes.
62
+ """
63
+ pass
64
+
65
+ @abstractmethod
66
+ async def list_tools(self) -> list[MCPTool]:
67
+ """List the tools available on the connected server.
68
+
69
+ Returns:
70
+ A list of `MCPTool` objects.
71
+ """
72
+ pass
73
+
74
+ @abstractmethod
75
+ async def call_tool(
76
+ self, tool_name: str, arguments: dict[str, Any] | None
77
+ ) -> CallToolResult:
78
+ """Invoke a tool on the connected server.
79
+
80
+ Args:
81
+ tool_name: The name of the tool to invoke.
82
+ arguments: The arguments to pass to the tool.
83
+
84
+ Returns:
85
+ The result of the tool call.
86
+ """
87
+ pass
88
+
89
+
90
+ class MCPClientBase(MCPClient, abc.ABC):
91
+ """Base MCP Client that uses `ClientSession` to communicate with the server.
92
+
93
+ This class provides the core implementation of a MCP client.
94
+ It is intended to be used as a base class for MCP clients that
95
+ use a specific transport (e.g., STDIO, SSE, etc.).
96
+ """
97
+
98
+ def __init__(self) -> None:
99
+ """Initialize the MCP client."""
100
+ self.session: ClientSession | None = None
101
+ self.exit_stack: AsyncExitStack = AsyncExitStack()
102
+ self._cleanup_lock: asyncio.Lock = asyncio.Lock()
103
+ self._tools_list: list[MCPTool] | None = None
104
+ self.stderr: TextIO = sys.stderr
105
+
106
+ @abstractmethod
107
+ def create_context_manager(
108
+ self,
109
+ process: Optional[Process] = None,
110
+ stderr: TextIO = sys.stderr,
111
+ ):
112
+ """Create the context manager for the server."""
113
+ pass
114
+
115
+ async def connect(self):
116
+ """Connect to the server.
117
+
118
+ Connect to the server using ClientSession.
119
+ """
120
+ try:
121
+ transport, process = await self.exit_stack.enter_async_context(
122
+ self.create_context_manager(self._process, stderr=self.stderr)
123
+ )
124
+ read, write = transport
125
+ self.session = await self.exit_stack.enter_async_context(
126
+ ClientSession(read, write)
127
+ )
128
+ await self.session.initialize()
129
+ except Exception as e:
130
+ logger.error(f"Error initializing MCP server: {e}")
131
+ await self.cleanup()
132
+ raise
133
+
134
+ async def cleanup(self):
135
+ """Cleanup the server connection."""
136
+ async with self._cleanup_lock:
137
+ try:
138
+ if self.exit_stack:
139
+ await self.exit_stack.aclose()
140
+ await asyncio.get_running_loop().shutdown_asyncgens()
141
+ self.session = None
142
+ except Exception as e:
143
+ logger.error(f"Error cleaning up server: {e}")
144
+
145
+ async def list_tools(self) -> list[MCPTool]:
146
+ """List the MCP tools available on the server.
147
+
148
+ Returns:
149
+ A list of `MCPTool` objects.
150
+ """
151
+ if not self.session:
152
+ raise AgentError(
153
+ "Server not initialized. Make sure you call `connect()` first."
154
+ )
155
+ self._tools_list = (await self.session.list_tools()).tools
156
+ return self._tools_list
157
+
158
+ async def call_tool(
159
+ self, tool_name: str, arguments: dict[str, Any] | None
160
+ ) -> CallToolResult:
161
+ """Call an MCP tool on the server.
162
+
163
+ Args:
164
+ tool_name: The name of the MCP tool to invoke.
165
+ arguments: The arguments to pass to the MCP tool.
166
+
167
+ Returns:
168
+ The result of the tool call.
169
+ """
170
+ if not self.session:
171
+ raise AgentError(
172
+ "Server not initialized. Make sure you call `connect()` first."
173
+ )
174
+ return await self.session.call_tool(tool_name, arguments)
175
+
176
+ async def as_toolkit(self) -> Toolkit:
177
+ """Converts the MCP tools available on the server to an ADK `Toolkit`.
178
+
179
+ This fetches the MCP tools available on the server and converts them
180
+ to ADK `ToolKit` (a collection of ADK `FunctionTool`s).
181
+
182
+ Returns:
183
+ A `Toolkit` object.
184
+ """
185
+ mcp_tools = await self.list_tools()
186
+ function_tools = [self._to_function_tool(tool) for tool in mcp_tools]
187
+ toolkit = Toolkit()
188
+ toolkit.add_function_tools(function_tools)
189
+ return toolkit
190
+
191
+ def _to_function_tool(self, tool: MCPTool) -> FunctionTool:
192
+ """Convert an MCP tool to ADK `FunctionTool`.
193
+
194
+ Args:
195
+ tool: The MCP tool to convert
196
+
197
+ Returns:
198
+ A `FunctionTool` that wraps the MCP tool functionality
199
+ """
200
+
201
+ # Create a wrapper callable (upon being called, execute self._invoke_mcp_tool)
202
+ async def invoke_mcp_tool_proxy(**kwargs) -> Any:
203
+ # Convert kwargs to JSON string
204
+ input_json = json.dumps(kwargs) if kwargs else ""
205
+ return await self._invoke_mcp_tool(tool, input_json)
206
+
207
+ # Truncate the tool description to 510 characters(OCI Tool description supports a limit of 512 characters)
208
+ truncated_tool_description = (tool.description or "No description provided")[:510]
209
+
210
+ # Create the function tool using the tool's metadata
211
+ return FunctionTool(
212
+ name=tool.name,
213
+ description=truncated_tool_description,
214
+ parameters=tool.inputSchema,
215
+ callable=invoke_mcp_tool_proxy,
216
+ )
217
+
218
+ async def _invoke_mcp_tool(self, tool: MCPTool, input_json: str) -> str:
219
+ """Invoke an MCP tool and return the result as a string.
220
+
221
+ Args:
222
+ tool: The MCP tool to invoke
223
+ input_json: The input to pass to the MCP tool
224
+
225
+ Returns:
226
+ The result of the tool call
227
+ """
228
+
229
+ try:
230
+ json_data: dict[str, Any] = json.loads(input_json) if input_json else {}
231
+ except Exception as e:
232
+ raise AgentError(
233
+ f"Invalid JSON input for MCP tool {tool.name}: {input_json}"
234
+ ) from e
235
+
236
+ try:
237
+ call_tool_result = await self.call_tool(tool.name, json_data)
238
+ self._log_mcp_tool_call(tool.name, json_data, call_tool_result)
239
+ except Exception as e:
240
+ raise AgentError(f"Error invoking MCP tool {tool.name}") from e
241
+
242
+ if len(call_tool_result.content) == 1:
243
+ tool_output_item = call_tool_result.content[0]
244
+ return tool_output_item.model_dump_json()
245
+
246
+ if len(call_tool_result.content) > 1:
247
+ tool_output_list = [item.model_dump() for item in call_tool_result.content]
248
+ return json.dumps(tool_output_list)
249
+
250
+ return "Error invoking MCP tool; call_tool_result.content is an empty list"
251
+
252
+ def _log_mcp_tool_call(
253
+ self,
254
+ tool_name: str,
255
+ tool_args: dict[str, Any],
256
+ call_tool_result: CallToolResult,
257
+ ) -> None:
258
+ """
259
+ Log a MCP tool call.
260
+
261
+ Args:
262
+ tool_name: The name of the MCP tool
263
+ tool_args: The input to the MCP tool
264
+ tool_output: The output from the MCP tool
265
+ """
266
+
267
+ message_text = (
268
+ f"MCP tool name:\n[bold green]{tool_name}[/bold green]\n\n"
269
+ f"MCP tool args:\n[bold magenta]{tool_args}[/bold magenta]\n\n"
270
+ f"MCP tool call result:\n[bold magenta]{call_tool_result.model_dump_json()}[/bold magenta]" # noqa: E501
271
+ )
272
+ logger.print(
273
+ message=message_text,
274
+ title="MCP tool call result",
275
+ border_style="blue",
276
+ expand=False,
277
+ )
278
+
279
+ async def __aenter__(self):
280
+ """Enter the context manager.
281
+
282
+ Upon entering the context manager, we establish a connection to the
283
+ server and return a context manager for the transport.
284
+ """
285
+ logger.debug(f"Entering context manager for {self.name}")
286
+ await self.connect()
287
+ return self
288
+
289
+ async def __aexit__(self, exc_type, exc_value, traceback):
290
+ """Exit the context manager.
291
+
292
+ Upon exiting the context manager, we close the connection to the server.
293
+ """
294
+ logger.debug(f"Exiting context manager for {self.name}")
295
+ await self.cleanup()
296
+
297
+
298
+ class MCPClientStdio(MCPClientBase):
299
+ """MCP Client that uses the stdio transport to communicate with a MCP Server."""
300
+
301
+ def __init__(
302
+ self,
303
+ params: StdioServerParameters,
304
+ name: str | None = None,
305
+ ):
306
+ """
307
+ Create a new MCP Client based on the stdio transport.
308
+ Args:
309
+ params: a dictionary of params that configure the server to be connected to.
310
+ name: A readable name for the client connection.
311
+ """
312
+ super().__init__()
313
+ self.params = params
314
+ self._name = (
315
+ name or f"MCPClientStdio(command={self.params.command}, args={self.params.args})"
316
+ )
317
+ self._process: Optional[Process] = None
318
+
319
+ @asynccontextmanager
320
+ async def create_context_manager(
321
+ self,
322
+ process: Optional[Process] = None,
323
+ stderr: TextIO = sys.stderr,
324
+ ):
325
+ """Create the context manager for the server."""
326
+ if not process:
327
+ self._process = await asyncio.create_subprocess_exec(
328
+ self.params.command,
329
+ *self.params.args,
330
+ stdin=asyncio.subprocess.PIPE,
331
+ stdout=asyncio.subprocess.PIPE,
332
+ stderr=stderr,
333
+ )
334
+ process = self._process
335
+ logger.info(f"MCP client created with pid: {process.pid}")
336
+
337
+ async with stdio_client(server=self.params, errlog=stderr) as context_manager:
338
+ yield context_manager, process
339
+
340
+ async def cleanup(self):
341
+ """Cleanup the server connection."""
342
+ async with self._cleanup_lock:
343
+ try:
344
+ # Finally, clean the exit stack
345
+ if self.exit_stack:
346
+ await self.exit_stack.aclose()
347
+ # Still active process, attempt terminating
348
+ if self._process and self._process.returncode is None:
349
+ try:
350
+ logger.info(f"Closing MCP process with pid: {self._process.pid}")
351
+ self._process.terminate()
352
+ await asyncio.wait_for(self._process.wait(), timeout=5.0)
353
+
354
+ except (asyncio.CancelledError, asyncio.TimeoutError):
355
+ logger.warning("MCP process was canceled or timed out terminating, attempting to kill")
356
+ self._process.kill()
357
+ await asyncio.wait_for(self._process.wait(), timeout=5.0)
358
+ finally:
359
+ logger.info(
360
+ f"MCP process pid: {self._process.pid} returned code {self._process.returncode}"
361
+ )
362
+
363
+ self.session = None
364
+ except Exception as e:
365
+ logger.error(f"Error cleaning up server: {e}")
366
+
367
+ @property
368
+ def name(self) -> str:
369
+ """A readable name for the client connection."""
370
+ return self._name
371
+
372
+
373
+ class MCPClientStreamableHttp(MCPClientBase):
374
+ """MCP Client that uses the streamable HTTP transport to communicate with a MCP Server.
375
+ Implements the Streamable HTTP transport as defined in the Model Context Protocol specification.
376
+ See: https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http
377
+ """
378
+
379
+ def __init__(
380
+ self,
381
+ params: StreamableHttpParameters,
382
+ name: str | None = None,
383
+ client_session_timeout_seconds: float | None = 5
384
+ ):
385
+ """Create a new MCP Client based on the HTTP transport.
386
+
387
+ Args:
388
+ params: The parameters for the MCP Server.
389
+ name: A readable name for the client connection.
390
+ If not provided, we'll create one from the URL.
391
+ client_session_timeout_seconds: The read timeout passed to the MCP ClientSession.
392
+ Defaults to 5 seconds.
393
+ """
394
+ super().__init__()
395
+ self.params = params
396
+ self._name = name or f"MCPServerStreamableHttp(url={self.params.url})"
397
+ self.client_session_timeout_seconds = client_session_timeout_seconds
398
+ self._process = None # Not used for HTTP, but required for interface compatibility
399
+
400
+ @asynccontextmanager
401
+ async def create_context_manager(
402
+ self,
403
+ process,
404
+ stderr,
405
+ ):
406
+ """Create the context manager for the server using streamable HTTP transport."""
407
+ transport = streamablehttp_client(
408
+ url=self.params.url,
409
+ headers=self.params.headers,
410
+ timeout=self.params.timeout,
411
+ sse_read_timeout=self.params.sse_read_timeout,
412
+ terminate_on_close=self.params.terminate_on_close
413
+ )
414
+ async with transport as (read_stream, write_stream, _):
415
+ yield (read_stream, write_stream), process
416
+
417
+ @property
418
+ def name(self) -> str:
419
+ """A readable name for the client connection."""
420
+ return self._name
@@ -2,6 +2,7 @@
2
2
  # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
3
  # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
4
 
5
+ import asyncio
5
6
  from inspect import getdoc, ismethod, signature
6
7
  from typing import Any, Callable, Dict, get_type_hints
7
8
 
@@ -179,7 +180,7 @@ class FunctionTool(BaseModel):
179
180
  ),
180
181
  )
181
182
 
182
- def execute(self, arguments: Dict[str, Any]) -> Any:
183
+ async def execute(self, arguments: Dict[str, Any]) -> Any:
183
184
  """
184
185
  Execute the function with the given arguments.
185
186
 
@@ -195,8 +196,11 @@ class FunctionTool(BaseModel):
195
196
  # Clean and filter arguments
196
197
  filtered_args = self._prepare_arguments(arguments)
197
198
 
198
- # Invoke the callable with the filtered arguments
199
- result = self.callable(**filtered_args)
199
+ if asyncio.iscoroutinefunction(self.callable):
200
+ result = await self.callable(**filtered_args)
201
+ else:
202
+ # Invoke the callable with the filtered arguments
203
+ result = self.callable(**filtered_args)
200
204
 
201
205
  return result
202
206
 
@@ -2,6 +2,7 @@
2
2
  # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
3
  # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
4
 
5
+ import inspect
5
6
  from functools import wraps
6
7
 
7
8
  from oci.addons.adk.util import get_callable_description
@@ -19,9 +20,18 @@ def tool(func=None, *, name=None, description=None):
19
20
 
20
21
  def decorator(func):
21
22
  @wraps(func)
22
- def wrapper(*args, **kwargs):
23
+ def sync_wrapper(*args, **kwargs):
23
24
  return func(*args, **kwargs)
24
25
 
26
+ @wraps(func)
27
+ async def async_wrapper(*args, **kwargs):
28
+ return await func(*args, **kwargs)
29
+
30
+ if inspect.iscoroutinefunction(func):
31
+ wrapper = async_wrapper
32
+ else:
33
+ wrapper = sync_wrapper
34
+
25
35
  # wrap the function with tool metadata
26
36
  wrapper._is_tool = True
27
37
  wrapper._tool_name = name or func.__name__
@@ -128,7 +128,16 @@ class Toolkit(BaseModel):
128
128
  self._add_function_tool_from_openai(attr, matching_openai_tool)
129
129
  else:
130
130
  # Create FunctionTool from method decoration
131
- self._add_function_tool(attr)
131
+ self._add_function_tool_from_callable(attr)
132
+
133
+ def add_function_tool(self, func_tool: FunctionTool) -> None:
134
+ """Add a function tool to the toolkit."""
135
+ self.functions[func_tool.name] = func_tool
136
+
137
+ def add_function_tools(self, func_tools: list[FunctionTool]) -> None:
138
+ """Add a list of function tools to the toolkit."""
139
+ for func_tool in func_tools:
140
+ self.add_function_tool(func_tool)
132
141
 
133
142
  def get_registered_tools(self) -> List[FunctionTool]:
134
143
  """Return a list of all registered tools in the toolkit."""
@@ -155,7 +164,7 @@ class Toolkit(BaseModel):
155
164
  f"Executing mock function implementation with received arguments: {args}"
156
165
  )
157
166
 
158
- def _add_function_tool(self, callable: Callable[..., Any]) -> None:
167
+ def _add_function_tool_from_callable(self, callable: Callable[..., Any]) -> None:
159
168
  """Internal method to add a function as a tool to the toolkit.
160
169
 
161
170
  Args: