From ad201e6733091a437da6f347a99158fd0536a23e Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 22:00:55 +0000 Subject: [PATCH 1/2] feat(mcp): Add optional workspace_id parameter to cloud tools with conditional schema hiding - Add workspace_id parameter to all 22 cloud MCP tools - Modify _get_cloud_workspace() to accept optional workspace_id override - Implement exclude_args pattern in register_tools() to hide workspace_id when AIRBYTE_CLOUD_WORKSPACE_ID env var is set - When env var is set, workspace_id param is hidden from MCP schema (uses env var) - When env var is not set, workspace_id param is exposed (must be provided in tool calls) Closes airbytehq/PyAirbyte#875 Co-Authored-By: AJ Steers --- airbyte/mcp/_tool_utils.py | 20 ++- airbyte/mcp/cloud_ops.py | 252 +++++++++++++++++++++++++++++++------ 2 files changed, 231 insertions(+), 41 deletions(-) diff --git a/airbyte/mcp/_tool_utils.py b/airbyte/mcp/_tool_utils.py index 21f6ff3ba..96ecc5252 100644 --- a/airbyte/mcp/_tool_utils.py +++ b/airbyte/mcp/_tool_utils.py @@ -7,6 +7,7 @@ from __future__ import annotations +import inspect import os from collections.abc import Callable from typing import Any, Literal, TypeVar @@ -25,6 +26,7 @@ os.environ.get("AIRBYTE_CLOUD_MCP_READONLY_MODE", "").strip() == "1" ) AIRBYTE_CLOUD_MCP_SAFE_MODE = os.environ.get("AIRBYTE_CLOUD_MCP_SAFE_MODE", "1").strip() != "0" +AIRBYTE_CLOUD_WORKSPACE_ID_IS_SET = bool(os.environ.get("AIRBYTE_CLOUD_WORKSPACE_ID", "").strip()) _REGISTERED_TOOLS: list[tuple[Callable[..., Any], dict[str, Any]]] = [] _GUIDS_CREATED_IN_SESSION: set[str] = set() @@ -158,8 +160,20 @@ def register_tools(app: Any, domain: Literal["cloud", "local", "registry"]) -> N for func, tool_annotations in get_registered_tools(domain): if should_register_tool(tool_annotations): extra_help_text = getattr(func, "_mcp_extra_help_text", None) + description: str | None = None if extra_help_text: description = (func.__doc__ or "").rstrip() + "\n" + extra_help_text - app.tool(func, annotations=tool_annotations, description=description) - else: - app.tool(func, annotations=tool_annotations) + + # For cloud tools, conditionally hide workspace_id parameter when env var is set + exclude_args: list[str] | None = None + if domain == "cloud" and AIRBYTE_CLOUD_WORKSPACE_ID_IS_SET: + params = set(inspect.signature(func).parameters.keys()) + excluded = [name for name in ["workspace_id"] if name in params] + exclude_args = excluded or None + + app.tool( + func, + annotations=tool_annotations, + description=description, + exclude_args=exclude_args, + ) diff --git a/airbyte/mcp/cloud_ops.py b/airbyte/mcp/cloud_ops.py index 1311e9e51..67a2c2359 100644 --- a/airbyte/mcp/cloud_ops.py +++ b/airbyte/mcp/cloud_ops.py @@ -63,10 +63,15 @@ class CloudConnectionResult(BaseModel): """ID of the destination used by this connection.""" -def _get_cloud_workspace() -> CloudWorkspace: - """Get an authenticated CloudWorkspace using environment variables.""" +def _get_cloud_workspace(workspace_id: str | None = None) -> CloudWorkspace: + """Get an authenticated CloudWorkspace. + + Args: + workspace_id: Optional workspace ID. If not provided, uses the + AIRBYTE_CLOUD_WORKSPACE_ID environment variable. + """ return CloudWorkspace( - workspace_id=resolve_cloud_workspace_id(), + workspace_id=resolve_cloud_workspace_id(workspace_id), client_id=resolve_cloud_client_id(), client_secret=resolve_cloud_client_secret(), api_root=resolve_cloud_api_url(), @@ -87,27 +92,34 @@ def deploy_source_to_cloud( Field(description="The name of the source connector (e.g., 'source-faker')."), ], *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, config: Annotated[ dict | str | None, Field( description="The configuration for the source connector.", default=None, ), - ], + ] = None, config_secret_name: Annotated[ str | None, Field( description="The name of the secret containing the configuration.", default=None, ), - ], + ] = None, unique: Annotated[ bool, Field( description="Whether to require a unique name.", default=True, ), - ], + ] = True, ) -> str: """Deploy a source connector to Airbyte Cloud. @@ -127,7 +139,7 @@ def deploy_source_to_cloud( ) source.set_config(config_dict, validate=True) - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) deployed_source = workspace.deploy_source( name=source_name, source=source, @@ -158,27 +170,34 @@ def deploy_destination_to_cloud( Field(description="The name of the destination connector (e.g., 'destination-postgres')."), ], *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, config: Annotated[ dict | str | None, Field( description="The configuration for the destination connector.", default=None, ), - ], + ] = None, config_secret_name: Annotated[ str | None, Field( description="The name of the secret containing the configuration.", default=None, ), - ], + ] = None, unique: Annotated[ bool, Field( description="Whether to require a unique name.", default=True, ), - ], + ] = True, ) -> str: """Deploy a destination connector to Airbyte Cloud. @@ -198,7 +217,7 @@ def deploy_destination_to_cloud( ) destination.set_config(config_dict, validate=True) - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) deployed_destination = workspace.deploy_destination( name=destination_name, destination=destination, @@ -242,13 +261,21 @@ def create_connection_on_cloud( ) ), ], + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, table_prefix: Annotated[ str | None, Field( description="Optional table prefix to use when syncing to the destination.", default=None, ), - ], + ] = None, ) -> str: """Create a connection between a deployed source and destination on Airbyte Cloud. @@ -258,7 +285,7 @@ def create_connection_on_cloud( """ resolved_streams_list: list[str] = resolve_list_of_strings(selected_streams) try: - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) deployed_connection = workspace.deploy_connection( connection_name=connection_name, source=source_id, @@ -288,20 +315,27 @@ def run_cloud_sync( Field(description="The ID of the Airbyte Cloud connection."), ], *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, wait: Annotated[ bool, Field( description="Whether to wait for the sync to complete.", default=True, ), - ], + ] = True, wait_timeout: Annotated[ int, Field( description="Maximum time to wait for sync completion (seconds).", default=300, ), - ], + ] = 300, ) -> str: """Run a sync job on Airbyte Cloud. @@ -310,7 +344,7 @@ def run_cloud_sync( Airbyte Cloud API. """ try: - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) connection = workspace.get_connection(connection_id=connection_id) sync_result = connection.run_sync(wait=wait, wait_timeout=wait_timeout) @@ -337,7 +371,16 @@ def run_cloud_sync( idempotent=True, open_world=True, ) -def check_airbyte_cloud_workspace() -> str: +def check_airbyte_cloud_workspace( + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, +) -> str: """Check if we have a valid Airbyte Cloud connection and return workspace info. By default, the `AIRBYTE_CLIENT_ID`, `AIRBYTE_CLIENT_SECRET`, `AIRBYTE_WORKSPACE_ID`, @@ -347,7 +390,7 @@ def check_airbyte_cloud_workspace() -> str: Returns workspace ID and workspace URL for verification. """ try: - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) workspace.connect() except Exception as ex: @@ -367,6 +410,13 @@ def check_airbyte_cloud_workspace() -> str: def deploy_noop_destination_to_cloud( name: str = "No-op Destination", *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, unique: bool = True, ) -> str: """Deploy the No-op destination to Airbyte Cloud for testing purposes. @@ -377,7 +427,7 @@ def deploy_noop_destination_to_cloud( """ try: destination = get_noop_destination() - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) deployed_destination = workspace.deploy_destination( name=name, destination=destination, @@ -413,15 +463,22 @@ def get_cloud_sync_status( description="Optional job ID. If not provided, the latest job will be used.", default=None, ), - ], + ] = None, *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, include_attempts: Annotated[ bool, Field( description="Whether to include detailed attempts information.", default=False, ), - ], + ] = False, ) -> dict[str, Any]: """Get the status of a sync job from the Airbyte Cloud. @@ -430,7 +487,7 @@ def get_cloud_sync_status( Airbyte Cloud API. """ try: - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) connection = workspace.get_connection(connection_id=connection_id) # If a job ID is provided, get the job by ID. @@ -481,6 +538,14 @@ def get_cloud_sync_status( open_world=True, ) def list_deployed_cloud_source_connectors( + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, name_contains: Annotated[ str | None, "Optional case-insensitive substring to filter sources by name", @@ -496,7 +561,7 @@ def list_deployed_cloud_source_connectors( and `AIRBYTE_API_ROOT` environment variables will be used to authenticate with the Airbyte Cloud API. """ - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) sources = workspace.list_sources() # Filter by name if requested @@ -526,6 +591,14 @@ def list_deployed_cloud_source_connectors( open_world=True, ) def list_deployed_cloud_destination_connectors( + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, name_contains: Annotated[ str | None, "Optional case-insensitive substring to filter destinations by name", @@ -541,7 +614,7 @@ def list_deployed_cloud_destination_connectors( and `AIRBYTE_API_ROOT` environment variables will be used to authenticate with the Airbyte Cloud API. """ - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) destinations = workspace.list_destinations() # Filter by name if requested @@ -585,6 +658,14 @@ def get_cloud_sync_logs( description="Optional attempt number. If not provided, the latest attempt will be used." ), ] = None, + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, ) -> str: """Get the logs from a sync job attempt on Airbyte Cloud. @@ -593,7 +674,7 @@ def get_cloud_sync_logs( Airbyte Cloud API. """ try: - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) connection = workspace.get_connection(connection_id=connection_id) sync_result: cloud.SyncResult | None = connection.get_sync_result(job_id=job_id) @@ -639,6 +720,14 @@ def get_cloud_sync_logs( open_world=True, ) def list_deployed_cloud_connections( + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, name_contains: Annotated[ str | None, "Optional case-insensitive substring to filter connections by name", @@ -654,7 +743,7 @@ def list_deployed_cloud_connections( and `AIRBYTE_API_ROOT` environment variables will be used to authenticate with the Airbyte Cloud API. """ - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) connections = workspace.list_connections() # Filter by name if requested @@ -703,6 +792,13 @@ def publish_custom_source_definition( Field(description="The name for the custom connector definition."), ], *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, manifest_yaml: Annotated[ str | Path | None, Field( @@ -738,7 +834,7 @@ def publish_custom_source_definition( if isinstance(manifest_yaml, str) and "\n" not in manifest_yaml: processed_manifest = Path(manifest_yaml) - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) custom_source = workspace.publish_custom_source_definition( name=name, manifest_yaml=processed_manifest, @@ -764,13 +860,22 @@ def publish_custom_source_definition( idempotent=True, open_world=True, ) -def list_custom_source_definitions() -> list[dict[str, Any]]: +def list_custom_source_definitions( + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, +) -> list[dict[str, Any]]: """List custom YAML source definitions in the Airbyte Cloud workspace. Note: Only YAML (declarative) connectors are currently supported. Docker-based custom sources are not yet available. """ - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) definitions = workspace.list_custom_source_definitions( definition_type="yaml", ) @@ -803,6 +908,13 @@ def update_custom_source_definition( ), ], *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, pre_validate: Annotated[ bool, Field( @@ -822,7 +934,7 @@ def update_custom_source_definition( if isinstance(manifest_yaml, str) and "\n" not in manifest_yaml: processed_manifest = Path(manifest_yaml) - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) definition = workspace.get_custom_source_definition( definition_id=definition_id, definition_type="yaml", @@ -852,6 +964,14 @@ def permanently_delete_custom_source_definition( str, Field(description="The ID of the custom source definition to delete."), ], + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, ) -> str: """Permanently delete a custom YAML source definition from Airbyte Cloud. @@ -867,7 +987,7 @@ def permanently_delete_custom_source_definition( Docker-based custom sources are not yet available. """ check_guid_created_in_session(definition_id) - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) definition = workspace.get_custom_source_definition( definition_id=definition_id, definition_type="yaml", @@ -894,6 +1014,14 @@ def rename_cloud_source( str, Field(description="New name for the source."), ], + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, ) -> str: """Rename a deployed source connector on Airbyte Cloud. @@ -901,7 +1029,7 @@ def rename_cloud_source( and `AIRBYTE_API_ROOT` environment variables will be used to authenticate with the Airbyte Cloud API. """ - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) source = workspace.get_source(source_id=source_id) source.rename(name=name) return f"Successfully renamed source '{source_id}' to '{name}'. URL: {source.connector_url}" @@ -930,6 +1058,14 @@ def update_cloud_source_config( default=None, ), ] = None, + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, ) -> str: """Update a deployed source connector's configuration on Airbyte Cloud. @@ -941,7 +1077,7 @@ def update_cloud_source_config( Airbyte Cloud API. """ check_guid_created_in_session(source_id) - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) source = workspace.get_source(source_id=source_id) config_dict = resolve_config( @@ -967,6 +1103,14 @@ def rename_cloud_destination( str, Field(description="New name for the destination."), ], + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, ) -> str: """Rename a deployed destination connector on Airbyte Cloud. @@ -974,7 +1118,7 @@ def rename_cloud_destination( and `AIRBYTE_API_ROOT` environment variables will be used to authenticate with the Airbyte Cloud API. """ - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) destination = workspace.get_destination(destination_id=destination_id) destination.rename(name=name) return ( @@ -1006,6 +1150,14 @@ def update_cloud_destination_config( default=None, ), ] = None, + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, ) -> str: """Update a deployed destination connector's configuration on Airbyte Cloud. @@ -1017,7 +1169,7 @@ def update_cloud_destination_config( Airbyte Cloud API. """ check_guid_created_in_session(destination_id) - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) destination = workspace.get_destination(destination_id=destination_id) config_dict = resolve_config( @@ -1045,6 +1197,14 @@ def rename_cloud_connection( str, Field(description="New name for the connection."), ], + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, ) -> str: """Rename a connection on Airbyte Cloud. @@ -1052,7 +1212,7 @@ def rename_cloud_connection( and `AIRBYTE_API_ROOT` environment variables will be used to authenticate with the Airbyte Cloud API. """ - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) connection = workspace.get_connection(connection_id=connection_id) connection.rename(name=name) return ( @@ -1075,6 +1235,14 @@ def set_cloud_connection_table_prefix( str, Field(description="New table prefix to use when syncing to the destination."), ], + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, ) -> str: """Set the table prefix for a connection on Airbyte Cloud. @@ -1086,7 +1254,7 @@ def set_cloud_connection_table_prefix( Airbyte Cloud API. """ check_guid_created_in_session(connection_id) - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) connection = workspace.get_connection(connection_id=connection_id) connection.set_table_prefix(prefix=prefix) return ( @@ -1114,6 +1282,14 @@ def set_cloud_connection_selected_streams( ) ), ], + *, + workspace_id: Annotated[ + str | None, + Field( + description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", + default=None, + ), + ] = None, ) -> str: """Set the selected streams for a connection on Airbyte Cloud. @@ -1125,7 +1301,7 @@ def set_cloud_connection_selected_streams( Airbyte Cloud API. """ check_guid_created_in_session(connection_id) - workspace: CloudWorkspace = _get_cloud_workspace() + workspace: CloudWorkspace = _get_cloud_workspace(workspace_id) connection = workspace.get_connection(connection_id=connection_id) resolved_streams_list: list[str] = resolve_list_of_strings(stream_names) From 4203f57ea2c95e377ae275bc4313e10af4846f97 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Tue, 25 Nov 2025 14:11:02 -0800 Subject: [PATCH 2/2] remove python-level default arg values --- airbyte/mcp/cloud_ops.py | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/airbyte/mcp/cloud_ops.py b/airbyte/mcp/cloud_ops.py index 67a2c2359..1cba32d63 100644 --- a/airbyte/mcp/cloud_ops.py +++ b/airbyte/mcp/cloud_ops.py @@ -98,28 +98,28 @@ def deploy_source_to_cloud( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], config: Annotated[ dict | str | None, Field( description="The configuration for the source connector.", default=None, ), - ] = None, + ], config_secret_name: Annotated[ str | None, Field( description="The name of the secret containing the configuration.", default=None, ), - ] = None, + ], unique: Annotated[ bool, Field( description="Whether to require a unique name.", default=True, ), - ] = True, + ], ) -> str: """Deploy a source connector to Airbyte Cloud. @@ -176,28 +176,28 @@ def deploy_destination_to_cloud( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], config: Annotated[ dict | str | None, Field( description="The configuration for the destination connector.", default=None, ), - ] = None, + ], config_secret_name: Annotated[ str | None, Field( description="The name of the secret containing the configuration.", default=None, ), - ] = None, + ], unique: Annotated[ bool, Field( description="Whether to require a unique name.", default=True, ), - ] = True, + ], ) -> str: """Deploy a destination connector to Airbyte Cloud. @@ -268,14 +268,14 @@ def create_connection_on_cloud( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], table_prefix: Annotated[ str | None, Field( description="Optional table prefix to use when syncing to the destination.", default=None, ), - ] = None, + ], ) -> str: """Create a connection between a deployed source and destination on Airbyte Cloud. @@ -321,21 +321,21 @@ def run_cloud_sync( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], wait: Annotated[ bool, Field( description="Whether to wait for the sync to complete.", default=True, ), - ] = True, + ], wait_timeout: Annotated[ int, Field( description="Maximum time to wait for sync completion (seconds).", default=300, ), - ] = 300, + ], ) -> str: """Run a sync job on Airbyte Cloud. @@ -379,7 +379,7 @@ def check_airbyte_cloud_workspace( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Check if we have a valid Airbyte Cloud connection and return workspace info. @@ -416,7 +416,7 @@ def deploy_noop_destination_to_cloud( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], unique: bool = True, ) -> str: """Deploy the No-op destination to Airbyte Cloud for testing purposes. @@ -463,7 +463,7 @@ def get_cloud_sync_status( description="Optional job ID. If not provided, the latest job will be used.", default=None, ), - ] = None, + ], *, workspace_id: Annotated[ str | None, @@ -471,14 +471,14 @@ def get_cloud_sync_status( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], include_attempts: Annotated[ bool, Field( description="Whether to include detailed attempts information.", default=False, ), - ] = False, + ], ) -> dict[str, Any]: """Get the status of a sync job from the Airbyte Cloud. @@ -545,7 +545,7 @@ def list_deployed_cloud_source_connectors( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], name_contains: Annotated[ str | None, "Optional case-insensitive substring to filter sources by name", @@ -598,7 +598,7 @@ def list_deployed_cloud_destination_connectors( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], name_contains: Annotated[ str | None, "Optional case-insensitive substring to filter destinations by name", @@ -665,7 +665,7 @@ def get_cloud_sync_logs( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Get the logs from a sync job attempt on Airbyte Cloud. @@ -727,7 +727,7 @@ def list_deployed_cloud_connections( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], name_contains: Annotated[ str | None, "Optional case-insensitive substring to filter connections by name", @@ -798,7 +798,7 @@ def publish_custom_source_definition( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], manifest_yaml: Annotated[ str | Path | None, Field( @@ -868,7 +868,7 @@ def list_custom_source_definitions( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> list[dict[str, Any]]: """List custom YAML source definitions in the Airbyte Cloud workspace. @@ -914,7 +914,7 @@ def update_custom_source_definition( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], pre_validate: Annotated[ bool, Field( @@ -971,7 +971,7 @@ def permanently_delete_custom_source_definition( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Permanently delete a custom YAML source definition from Airbyte Cloud. @@ -1021,7 +1021,7 @@ def rename_cloud_source( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Rename a deployed source connector on Airbyte Cloud. @@ -1065,7 +1065,7 @@ def update_cloud_source_config( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Update a deployed source connector's configuration on Airbyte Cloud. @@ -1110,7 +1110,7 @@ def rename_cloud_destination( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Rename a deployed destination connector on Airbyte Cloud. @@ -1149,7 +1149,7 @@ def update_cloud_destination_config( description="The name of the secret containing the configuration.", default=None, ), - ] = None, + ], *, workspace_id: Annotated[ str | None, @@ -1157,7 +1157,7 @@ def update_cloud_destination_config( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Update a deployed destination connector's configuration on Airbyte Cloud. @@ -1204,7 +1204,7 @@ def rename_cloud_connection( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Rename a connection on Airbyte Cloud. @@ -1242,7 +1242,7 @@ def set_cloud_connection_table_prefix( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Set the table prefix for a connection on Airbyte Cloud. @@ -1289,7 +1289,7 @@ def set_cloud_connection_selected_streams( description="Workspace ID. Defaults to AIRBYTE_CLOUD_WORKSPACE_ID env var.", default=None, ), - ] = None, + ], ) -> str: """Set the selected streams for a connection on Airbyte Cloud.