PyAirbyte
PyAirbyte copied to clipboard
feat(mcp): Add mcp_smoke_tests_prompt for validating all tools and resources
feat(mcp): Add mcp_smoke_tests_prompt for validating all tools and resources
Summary
Adds a new MCP prompt called mcp_smoke_tests_prompt that provides comprehensive testing instructions for validating all MCP tools and resources in the PyAirbyte MCP server. The prompt:
- Dynamically discovers all registered MCP tools using the existing
get_registered_tools()function - Groups tools by domain (cloud, local, registry) for organized testing
- Supports a
read_onlyparameter (default:True) to filter tools by their read-only status - Generates detailed testing instructions including tool testing, resource testing, and report generation guidelines
- Is registered as an MCP prompt that can be invoked by MCP clients like Claude Desktop
Implementation Details:
- New file:
airbyte/mcp/smoke_tests.pycontaining the prompt function and registration logic - Modified:
airbyte/mcp/server.pyto import and register the smoke test prompt - The prompt generates instructions as text rather than executing tests automatically
Review & Testing Checklist for Human
⚠️ IMPORTANT: Please verify the requirements alignment
-
[ ] Confirm this is what you wanted: This PR implements a prompt that provides testing instructions, not an automated test runner. When invoked, it generates a markdown document with step-by-step guidance for manually testing tools. If you wanted an automated test function that actually calls all tools and reports results, please clarify and I can revise the implementation.
-
[ ] Test the prompt end-to-end: Invoke the
mcp_smoke_tests_promptthrough an MCP client (e.g., Claude Desktop) with bothread_only=Trueandread_only=Falseto verify it generates useful testing instructions -
[ ] Verify read-only filtering: Check that the
readOnlyHintannotation filtering correctly identifies all read-only tools. Some tools might be implicitly read-only but not marked as such in their annotations. -
[ ] Resource testing coverage: Note that the prompt provides generic resource testing instructions but doesn't enumerate specific resources (PyAirbyte MCP doesn't appear to have a resource registry like Connector Builder does). Verify this is acceptable or if resource enumeration should be added.
Notes
- This PR only covers the PyAirbyte MCP server. A separate PR for the Connector Builder MCP server is still pending.
- The prompt was tested locally to confirm it can be imported and called successfully, returning properly formatted instructions.
- Lint checks pass for all changes.
Requested by: AJ Steers ([email protected] / @aaronsteers)
Devin Session: https://app.devin.ai/sessions/1145d85639d849b396b2021ba80433b8
Summary by CodeRabbit
- New Features
- Added comprehensive smoke testing capability for validating MCP tools and resources.
- Supports dual testing modes: read-only tests or comprehensive testing of all available tools.
- New testing interface organizes tools by domain and provides detailed validation procedures with reporting and expected behavior guidance.