Repository navigation
feat(mcp): show search tools in insiders mode - #1375
Aaron ("AJ") Steers (aaronsteers) merged 4 commits into
Conversation
Co-Authored-By: alexandre@airbyte.io <alexandre@airbyte.io>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Note 📝 PR Converted to Draft More info...Thank you for creating this PR. As a policy to protect our engineers' time, Airbyte requires all PRs to be created first in draft status. Your PR has been automatically converted to draft status in respect for this policy. As soon as your PR is ready for formal review, you can proceed to convert the PR to "ready for review" status by clicking the "Ready for review" button at the bottom of the PR page. To skip draft status in future PRs, please include |
|
Runtime check: real server, Requested by AJ. Method
This PR (c703c56)
Base On base, the search tools were hidden and 42 tools were listed in all six HTTP combinations above, whether the server env was unset or Result: by default the advertised tools are exactly the same as on base (42). The two search tools show up only when the env var or the header turns them on, and an explicit |
👋 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/1791951647-search-tools-opt-in' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1791951647-search-tools-opt-in'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. |
Code Coverage OverviewLanguages: Python Python / code-coverage/pytest-no-credsThe overall line coverage in commit dddf984 in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytestThe overall line coverage in commit dddf984 in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytest-unitThe overall line coverage in commit dddf984 in the Show a line coverage summary of the most covered files.
Updated |
Co-Authored-By: alexandre@airbyte.io <alexandre@airbyte.io>
Co-Authored-By: alexandre@airbyte.io <alexandre@airbyte.io>
There was a problem hiding this comment.
🟡 Changes recommended
Configuration precedence documentation is contradictory, and generated documentation omits per-tool insiders availability.
2 open findings
What changed in this PR
Adds per-tool insiders gating so Cloud search tools remain registered but are hidden unless insiders mode is enabled.
Changes:
- Adds
insiders_onlytool policy and filter. - Gates two Cloud search tools.
- Restores and expands related tests and tracing fixtures.
| File | Description |
|---|---|
airbyte/constants.py |
Documents insiders configuration. |
airbyte/mcp/_tool_utils.py |
Adds per-tool insiders policy and filtering. |
airbyte/mcp/cloud.py |
Marks search tools insiders-only. |
airbyte/mcp/server.py |
Registers the insiders filter. |
tests/unit_tests/fixtures/arg_trace_plan.json |
Restores search tracing expectations. |
tests/unit_tests/test_mcp_arg_trace_parity.py |
Tests search argument tracing. |
tests/unit_tests/test_mcp_cloud.py |
Tests search-tool visibility. |
tests/unit_tests/test_mcp_tool_annotations.py |
Restores search annotation expectations. |
tests/unit_tests/test_mcp_tool_filters.py |
Tests insiders filter precedence. |
tests/unit_tests/test_mcp_tool_utils.py |
Verifies registered insiders policies. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… in generated docs Co-Authored-By: alexandre@airbyte.io <alexandre@airbyte.io>
8385aaa
into
release-candidate/v1

Summary
👉 TL;DR: The connector search tools are no longer switched off in code. They are now hidden by default and become visible when the deployment or the caller turns on insiders mode.
Specifically, this replaces the search tools' hard-coded
SEARCH_TOOLS_DISABLED/force_disabledusage from #1348 with a per-toolmcp_tool(insiders_only=True)flag. That flag is enforced by a newairbyte_insiders_tools_filterthat reuses the existingAIRBYTE_MCP_INSIDERSenv var andX-MCP-Insidersheader.Requested by AJ (Aaron ("AJ") Steers (@aaronsteers)) to unblock semantic-search evals while the backend rolls out. Alexandre (Alexandre Girard (@girarda)) plans to enable search globally once the feature is ready.
Changes
ToolPolicygainsinsiders_only: bool = False, andmcp_toolgains a matchinginsiders_onlykwarg: the tool is registered, and whether it is shown is decided per request.force_disabledis kept unchanged (it still skips registration). It is no longer used by the search tools, and now has a unit test.airbyte_insiders_tools_filter, registered inserver.py, behaves asnot policy.insiders_only or _insiders_mode(app) is True.execute_external_search_queryandget_cloud_search_statusare markedinsiders_only=True.scripts/generate_mcp_markdown.pyadds aninsidersOnlyannotation to the report from_TOOL_POLICIES, so the generated docs show an "insiders only" availability badge on the two search tools.AIRBYTE_MCP_INSIDERS/X-MCP-Insidersdocstrings:1on the env var is the default, and a caller can still narrow it with0.Gating:
AIRBYTE_MCP_INSIDERS/X-MCP-Insiders(default off)The rules come from the existing
_insiders_moderesolver and are unchanged:AIRBYTE_MCP_INSIDERS(env, STDIO + HTTP)X-MCP-Insiders(header)0111100The header controls which tools are advertised. It is not an access control: each call is still authorized by the Cloud API, which returns "not enabled" for connectors without search indexing.
Follow-ups
insiders_only=Truearguments.Test plan
pytest tests/unit_tests/test_mcp_cloud.py test_mcp_arg_trace_parity.py test_mcp_tool_utils.py test_mcp_tool_annotations.py test_mcp_tool_filters.py: 253 passed.ruff check .andpyrefly checkare clean.list_toolsagainstrelease-candidate/v1. Details are in the PR comment.Link to Devin session: https://app.devin.ai/sessions/e6965897bf15489380e96ea10d3ee8dd
Open in Devin Desktop: https://app.devin.ai/desktop/session/e6965897bf15489380e96ea10d3ee8dd?variant=devin