Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions airbyte/_direct_connectors/connector_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- `CloudWorkspace.get_agent_skill_docs` / `CloudConnector.read_agent_skill_docs`
(MCP tool `get_external_access_skill_docs`) read destination skill docs straight from
the Agents API, with no local enrichment.
- `CloudConnector.get_direct_access_guidance` (MCP tool `describe_cloud_connector`
- `CloudConnector.get_direct_access_guidance` (MCP tool `describe_connector`
with `with_direct_access_guidance=True`) prepends a short local intro --
location, table naming, and dialect notes -- to the server-served destination
docs overview.
Expand All @@ -17,7 +17,7 @@

This module also builds `_DirectConnectorInspectResult` payloads locally from the
Cloud workspace objects and summarizes the connections touching a connector for
the `describe_cloud_connector` MCP tool.
the `describe_connector` MCP tool.
"""

from __future__ import annotations
Expand Down
2 changes: 1 addition & 1 deletion airbyte/_direct_connectors/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def _collect_index_errors(self) -> ExternalSearchResult:
if not self.metadata and not self.errors:
collected.append(
"No index matched this search type and stream selection, so empty results "
"do not mean there are no matches. Call `get_cloud_search_status` to see "
"do not mean there are no matches. Call `get_search_index_status` to see "
"which streams have which index types."
)
self.warnings = [
Expand Down
2 changes: 1 addition & 1 deletion airbyte/_util/api_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"This is expected right after creating a connector with `defer_credentials=True`. "
"Don't retry yet. Ask the user to open the connector's settings page, complete "
"authentication and any missing settings, then test and save. After they confirm, call "
"`check_cloud_connector`; once it succeeds, retry this call."
"`check_connector`; once it succeeds, retry this call."
)
ACTOR_NOT_READY_PYTHON_GUIDANCE = (
"This is expected right after creating a connector as a draft. Don't retry yet. "
Expand Down
2 changes: 1 addition & 1 deletion airbyte/_util/destination_smoke_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

This module provides the core logic for running smoke tests against destination
connectors. It is used by both the CLI (`pyab destination-smoke-test`) and the
MCP tool (`destination_smoke_test`).
MCP tool (`run_local_destination_smoke_test`).

Smoke tests send synthetic data from the built-in smoke test source to a
destination connector and report whether the destination accepted the data
Expand Down
26 changes: 13 additions & 13 deletions airbyte/cloud/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def get_workspace(self, workspace_id: str | None = None) -> CloudWorkspace:
guidance=(
"No workspace was configured, and no default workspace could be resolved "
"for the authenticated user. Provide a workspace ID, or call "
"`get_default_cloud_context` to discover your workspaces and organizations."
"`get_default_workspace_context` to discover your workspaces and organizations."
),
)

Expand Down Expand Up @@ -907,13 +907,13 @@ def get_default_context_for_user(self) -> CloudDefaultContextInfo:
if any(permission.get("permissionType") == "instance_admin" for permission in permissions):
discovery_hints.append(
"Instance-admin access may include every organization and workspace in the "
"instance. Use list_cloud_organizations(name_contains=...) or "
"list_cloud_workspaces(organization_id=...) to discover others."
"instance. Use list_organizations(name_contains=...) or "
"list_workspaces(organization_id=...) to discover others."
)
if membership_organization_ids:
discovery_hints.append(
"Organization membership grants access to every workspace in those "
"organizations. Use list_cloud_workspaces(organization_id=<id>) to "
"organizations. Use list_workspaces(organization_id=<id>) to "
"discover workspaces."
)
if user is not None and not isinstance(user.get("defaultWorkspaceId"), str):
Expand Down Expand Up @@ -956,13 +956,13 @@ def _missing_default_workspace_hint(self) -> str:
"Your Airbyte user profile has no default workspace; this "
"session uses the configured workspace "
f"{self.default_workspace_id}. Use "
"set_default_cloud_workspace(user_email=<your email>, "
"set_default_workspace(user_email=<your email>, "
"workspace_id=<id>) to set a durable default; it applies to "
"both MCP sessions and the Airbyte Cloud web app."
)
return (
"No default workspace is set. Use "
"set_default_cloud_workspace(user_email=<your email>, "
"set_default_workspace(user_email=<your email>, "
"workspace_id=<id>) to durably set one; it applies to both MCP "
"sessions and the Airbyte Cloud web app."
)
Expand Down Expand Up @@ -1008,7 +1008,7 @@ def set_default_workspace_for_user(
raise exc.AirbyteLibInputError(
message=("The provided `user_email` does not match the authenticated user."),
guidance=(
"Call get_default_cloud_context to see the authenticated user "
"Call get_default_workspace_context to see the authenticated user "
"context, then pass that user's email."
),
context={
Expand All @@ -1030,21 +1030,21 @@ def set_default_workspace_for_user(
except exc.AirbyteMissingResourceError as error:
raise exc.AirbyteLibInputError(
message=f"Workspace {workspace_id} was not found.",
guidance=("Call get_default_cloud_context to see your member workspaces."),
guidance=("Call get_default_workspace_context to see your member workspaces."),
context={"workspace_id": workspace_id},
) from error
except exc.AirbyteCloudError as error:
if (error.context or {}).get("status_code") == HTTPStatus.NOT_FOUND:
raise exc.AirbyteLibInputError(
message=f"Workspace {workspace_id} was not found.",
guidance=("Call get_default_cloud_context to see your member workspaces."),
guidance=("Call get_default_workspace_context to see your member workspaces."),
context={"workspace_id": workspace_id},
) from error
raise
if workspace.get("tombstone"):
raise exc.AirbyteLibInputError(
message=f"Workspace {workspace_id} is tombstoned (deleted).",
guidance=("Call get_default_cloud_context to see your member workspaces."),
guidance=("Call get_default_workspace_context to see your member workspaces."),
context={"workspace_id": workspace_id},
)
workspace_organization_id = workspace.get("organizationId")
Expand All @@ -1063,7 +1063,7 @@ def set_default_workspace_for_user(
f"or its organization {workspace_organization_id}."
),
guidance=(
"Call get_default_cloud_context to see your member_workspaces "
"Call get_default_workspace_context to see your member_workspaces "
"and member_organizations, then choose a workspace you are a "
"member of."
),
Expand Down Expand Up @@ -1173,7 +1173,7 @@ def _raise_ambiguous_organization_error(
"with one of these "
"organization IDs "
f"(showing {len(candidates)} of {len(organization_ids)}): {candidate_details}. "
"Call `get_default_cloud_context` to see your memberships."
"Call `get_default_workspace_context` to see your memberships."
),
context={
"organization_ids": list(organization_ids),
Expand Down Expand Up @@ -1350,7 +1350,7 @@ def get_organization(
raise exc.AirbyteLibInputError(
message="Organization ID or organization name is required.",
guidance=(
"Provide an organization ID or name, or call `get_default_cloud_context` "
"Provide an organization ID or name, or call `get_default_workspace_context` "
"to discover your organizations."
),
)
Expand Down
8 changes: 5 additions & 3 deletions airbyte/cloud/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def run_sync(
guidance=(
"Re-enable the connection first (e.g. "
"`connection.set_enabled(enabled=True)`, or the "
"`update_cloud_connection` MCP tool with `enabled=True`), then retry."
"`update_connection` MCP tool with `enabled=True`), then retry."
),
context={"connection_id": self.connection_id},
) from ex
Expand Down Expand Up @@ -599,7 +599,7 @@ def get_sync_result(
"or you don't have access to it."
),
guidance=(
"Use `list_cloud_sync_jobs` to find valid job IDs for this connection."
"Use `list_connection_sync_jobs` to find valid job IDs for this connection."
),
context={"connection_id": self.connection_id, "job_id": job_id},
) from ex
Expand All @@ -612,7 +612,9 @@ def get_sync_result(
message=(
f"Job {job_id} belongs to a different connection, not {self.connection_id}."
),
guidance="Use `list_cloud_sync_jobs` to find valid job IDs for this connection.",
guidance=(
"Use `list_connection_sync_jobs` to find valid job IDs for this connection."
),
context={"connection_id": self.connection_id, "job_id": job_id},
)

Expand Down
2 changes: 1 addition & 1 deletion airbyte/cloud/workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def __init__(
raise exc.AirbyteLibInputError(
message="Workspace ID is required.",
guidance=(
"Provide a workspace ID, or call `get_default_cloud_context` to discover "
"Provide a workspace ID, or call `get_default_workspace_context` to discover "
"available workspaces."
),
)
Expand Down
6 changes: 3 additions & 3 deletions airbyte/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,12 @@ def __post_init__(self) -> None:
if is_mcp_mode():
self.guidance = (
"The authenticated user's default workspace was checked and none was "
"available. `list_cloud_workspaces` returns direct workspace memberships "
"available. `list_workspaces` returns direct workspace memberships "
"by default; pass `organization_id`/`organization_name` or a broader "
"`privilege_scope` for organization-wide discovery, or call "
"`list_cloud_organizations` to search organizations by name. If exactly "
"`list_organizations` to search organizations by name. If exactly "
"one workspace is found, use it; otherwise ask the user to choose. Call "
"`get_default_cloud_context` to inspect your memberships."
"`get_default_workspace_context` to inspect your memberships."
)
else:
self.guidance = (
Expand Down
2 changes: 1 addition & 1 deletion airbyte/mcp/_docs_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class CloudConnectorDocsResult(BaseModel):
"""Connector docs rendered for agent consumption by the Cloud MCP tools.

Returned by `describe_cloud_connector`.
Returned by `describe_connector`.
"""

model_config = ConfigDict(extra="allow")
Expand Down
2 changes: 1 addition & 1 deletion airbyte/mcp/_user_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
class AirbyteUser:
"""Canonical Airbyte user identity and its default workspace, when available.

Cached without expiry (evicted when `set_default_cloud_workspace` changes it), so
Cached without expiry (evicted when `set_default_workspace` changes it), so
`default_workspace_id` may be stale. It is only used to derive the organization
recorded in telemetry; tools resolve the default workspace live.
"""
Expand Down
Loading
Loading