Skip to content

Commit 1e2d7d8

Browse files
feat(mcp): annotate local tools with requires_client_filesystem (#1052)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 8b89e34 commit 1e2d7d8

3 files changed

Lines changed: 49 additions & 5 deletions

File tree

airbyte/mcp/local.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def _get_mcp_source(
122122
@mcp_tool(
123123
read_only=True,
124124
idempotent=True,
125+
requires_client_filesystem=True,
125126
extra_help_text=_CONFIG_HELP,
126127
)
127128
def validate_connector_config(
@@ -201,6 +202,7 @@ def validate_connector_config(
201202
@mcp_tool(
202203
read_only=True,
203204
idempotent=True,
205+
requires_client_filesystem=True,
204206
)
205207
def list_connector_config_secrets(
206208
connector_name: Annotated[
@@ -230,6 +232,7 @@ def list_connector_config_secrets(
230232
@mcp_tool(
231233
read_only=True,
232234
idempotent=True,
235+
requires_client_filesystem=True,
233236
extra_help_text=_CONFIG_HELP,
234237
)
235238
def list_dotenv_secrets() -> dict[str, list[str]]:
@@ -249,6 +252,7 @@ def list_dotenv_secrets() -> dict[str, list[str]]:
249252
@mcp_tool(
250253
read_only=True,
251254
idempotent=True,
255+
requires_client_filesystem=True,
252256
extra_help_text=_CONFIG_HELP,
253257
)
254258
def list_source_streams(
@@ -315,6 +319,7 @@ def list_source_streams(
315319
@mcp_tool(
316320
read_only=True,
317321
idempotent=True,
322+
requires_client_filesystem=True,
318323
extra_help_text=_CONFIG_HELP,
319324
)
320325
def get_source_stream_json_schema(
@@ -381,6 +386,7 @@ def get_source_stream_json_schema(
381386

382387
@mcp_tool(
383388
read_only=True,
389+
requires_client_filesystem=True,
384390
extra_help_text=_CONFIG_HELP,
385391
)
386392
def read_source_stream_records(
@@ -471,6 +477,7 @@ def read_source_stream_records(
471477

472478
@mcp_tool(
473479
read_only=True,
480+
requires_client_filesystem=True,
474481
extra_help_text=_CONFIG_HELP,
475482
)
476483
def get_stream_previews(
@@ -583,6 +590,7 @@ def get_stream_previews(
583590

584591
@mcp_tool(
585592
destructive=False,
593+
requires_client_filesystem=True,
586594
extra_help_text=_CONFIG_HELP,
587595
)
588596
def sync_source_to_cache(
@@ -692,6 +700,7 @@ class CachedDatasetInfo(BaseModel):
692700
@mcp_tool(
693701
read_only=True,
694702
idempotent=True,
703+
requires_client_filesystem=True,
695704
extra_help_text=_CONFIG_HELP,
696705
)
697706
def list_cached_streams() -> list[CachedDatasetInfo]:
@@ -712,6 +721,7 @@ def list_cached_streams() -> list[CachedDatasetInfo]:
712721
@mcp_tool(
713722
read_only=True,
714723
idempotent=True,
724+
requires_client_filesystem=True,
715725
extra_help_text=_CONFIG_HELP,
716726
)
717727
def describe_default_cache() -> dict[str, Any]:
@@ -763,6 +773,7 @@ def _is_safe_sql(sql_query: str) -> bool:
763773
@mcp_tool(
764774
read_only=True,
765775
idempotent=True,
776+
requires_client_filesystem=True,
766777
extra_help_text=_CONFIG_HELP,
767778
)
768779
def run_sql_query(
@@ -820,6 +831,7 @@ def run_sql_query(
820831

821832
@mcp_tool(
822833
destructive=True,
834+
requires_client_filesystem=True,
823835
)
824836
def destination_smoke_test( # noqa: PLR0913, PLR0917
825837
destination_connector_name: Annotated[

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dependencies = [
4646
"typing-extensions",
4747
"uuid7>=0.1.0,<1.0",
4848
"fastmcp>=3.0,<4.0",
49-
"fastmcp-extensions>=0.5.0,<1.0.0",
49+
"fastmcp-extensions>=0.7.0,<1.0.0",
5050
"starlette",
5151
"uv>=0.5.0,<0.9.0",
5252
"prefab-ui>=0.20.1,<0.21",

uv.lock

Lines changed: 36 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)