Repository navigation
feat(mcp)!: split manifest_yaml into manifest_yaml_text and manifest_yaml_file - #1374
Conversation
…yaml_file Co-Authored-By: AJ Steers <aj@airbyte.io>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1791951262-split-manifest-yaml-args' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1791951262-split-manifest-yaml-args'PR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesCommunity SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
There was a problem hiding this comment.
🟢 Approval recommended
The implementation matches the described contract and includes focused resolver, schema, and telemetry coverage.
0 open findings
What changed in this PR
Splits custom connector manifest input into explicit text and trusted local-file arguments.
Changes:
- Adds separate
manifest_yaml_textandmanifest_yaml_fileinputs. - Hides file inputs when trusted execution is disabled.
- Updates resolver, schema, and tracing tests.
| File | Description |
|---|---|
airbyte/mcp/cloud.py |
Updates tool arguments, validation, and schema registration. |
airbyte/mcp/_arg_resolvers.py |
Resolves explicit text or trusted file inputs. |
tests/unit_tests/test_mcp_trusted_execution.py |
Tests resolver and trust-dependent schemas. |
tests/unit_tests/test_mcp_arg_trace_parity.py |
Handles trust-dependent trace inventories. |
tests/unit_tests/fixtures/arg_trace_plan.json |
Records tracing policies for both new arguments. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code Coverage OverviewLanguages: Python Python / code-coverage/pytest-no-credsThe overall line coverage in commit d3c8cc1 in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytestThe overall line coverage in commit d3c8cc1 in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytest-unitThe overall line coverage in commit d3c8cc1 in the Show a line coverage summary of the most covered files.
Updated |
…ile description Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
f54527f
into
release-candidate/v1
Overview
👉 TL;DR: The tools for publishing and updating custom connectors now take the connector definition through two separate inputs: one for the text itself, and one for a file location that only appears on servers allowed to read local files. Before this, hosted agents passed a file location in the text input and got back a confusing error.
Specifically,
publish_custom_source_definitionandupdate_custom_source_definitionreplacemanifest_yamlwithmanifest_yaml_textandmanifest_yaml_file, andmanifest_yaml_fileis excluded from the tool schema whenAIRBYTE_MCP_TRUSTED_EXECUTIONis off.Builds on:
extra_help_textfastmcp-extensions#150 (callableextra_help_text, released in 0.35.0)Changes
manifest_yaml(str | Path | None, described as "inline YAML or a file path") is replaced by two args, and each description covers only its own arg:manifest_yaml_text: str | None: the full YAML contents, never treated as a path.manifest_yaml_file: str | None: an absolute path on the machine running the MCP server. It requires trusted execution.register_cloud_toolsaddsmanifest_yaml_filetoexclude_argswhen trusted execution is disabled. This is the same mechanism that already hidesworkspace_id. The hosted Cloud MCP runs untrusted, so it no longer advertises a file input. The gate is evaluated at registration time, not at import.extra_help_text=_manifest_yaml_source_hint, a zero-arg callable that fastmcp-extensions resolves at registration. Only when both args are exposed does it append "Provide the manifest as eithermanifest_yaml_textormanifest_yaml_file, not both." Themcp_toolwrapper in_tool_utils.pynow accepts the callable type.fastmcp-extensionsis bumped to>=0.35.0,<1.0.0.resolve_manifest_yaml(*, manifest_yaml_text, manifest_yaml_file):AirbyteTrustedExecutionRequiredError);manifest_yaml_fileonly when it's exposed.update_custom_source_definition, the manifest args are now keyword-only.Review Spotlight
Reviewers with limited time, please review first:
cloud.pyregister_cloud_tools: the trust-gatedexclude_argsand_manifest_yaml_source_hint._arg_resolvers.pyresolve_manifest_yaml: the new resolver contract.Breaking changes
manifest_yamlto either tool now fail FastMCP validation withUnexpected keyword argument. They must switch tomanifest_yaml_text, or tomanifest_yaml_fileon trusted local servers.AIRBYTE_MCP_TRUSTED_EXECUTIONenabled no longer show a file input. Path reads were already rejected there.manifest_yaml_textis never read as a path, even in trusted mode. Usemanifest_yaml_fileinstead.CloudWorkspace.publish_custom_source_definition(manifest_yaml=...),update_definition(manifest_yaml=...)) is unchanged.Test plan
tests/unit_tests/test_mcp_trusted_execution.pycovers:manifest_yaml_fileand the "not both" hint appear only when trusted, andmanifest_yamlnever appears;tests/unit_tests/test_mcp_arg_trace_parity.pyand its fixture are updated for both new args.Link to Devin session: https://app.devin.ai/sessions/759182bd74904028a5c714645866125e
Open in Devin Desktop: https://app.devin.ai/desktop/session/759182bd74904028a5c714645866125e?variant=devin
Requested by: Aaron ("AJ") Steers (@aaronsteers)