airbyte_ops_mcp.mcp.prompts

MCP prompt definitions for the Airbyte Ops MCP server.

This module defines prompts that can be invoked by MCP clients to perform common workflows.

MCP reference

MCP primitives registered by the prompts module of the airbyte-internal-ops server: 0 tool(s), 1 prompt(s), 0 resource(s).

Prompts (1)

test-my-tools

Test all available MCP tools to confirm they are working properly

Arguments:

Name Required Description
scope no Optional free-form text to focus or constrain testing. This can be a single word, a sentence, or a paragraph describing the desired scope or constraints. Provide as a JSON string matching the following schema: {"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional free-form text to focus or constrain testing. This can be a single word, a sentence, or a paragraph describing the desired scope or constraints."}
  1# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
  2"""MCP prompt definitions for the Airbyte Ops MCP server.
  3
  4This module defines prompts that can be invoked by MCP clients to perform
  5common workflows.
  6
  7## MCP reference
  8
  9.. include:: ../../../docs/mcp-generated/prompts.md
 10    :start-line: 2
 11"""
 12
 13from __future__ import annotations
 14
 15__all__: list[str] = []
 16
 17from typing import Annotated
 18
 19from fastmcp import FastMCP
 20from fastmcp_extensions import mcp_prompt, register_mcp_prompts
 21from pydantic import Field
 22
 23TEST_MY_TOOLS_GUIDANCE = """
 24Test all available tools in this MCP server to confirm they are working properly.
 25
 26Guidelines:
 27- Iterate through each tool systematically
 28- Use read-only operations whenever possible
 29- For tools that modify data, use test/safe modes or skip if no safe testing method exists
 30- Avoid creating persistent side effects (e.g., don't create real resources, connections, or data)
 31- Document which tools were tested and their status
 32- Report any errors or issues encountered
 33- Provide a summary of the test results at the end
 34
 35Focus on validating that tools:
 361. Accept their required parameters correctly
 372. Return expected output formats
 383. Handle errors gracefully
 394. Connect to required services (if applicable)
 40
 41Test Environment:
 42- If declared, use the `AIRBYTE_CLOUD_TEST_WORKSPACE_ID` env var to identify the test workspace.
 43- If the env var is not declared (and if you have access), you may use the designated test
 44  workspace "19d7a891-8e0e-40ac-8a8c-5faf8d11e47c" for your tests.
 45- Always describe to your user exactly which workspace you are using for testing, and how you
 46  determined the workspace to use.
 47
 48Testing git ops that require an airbyte repo checkout (e.g. "list connectors in repo"):
 49- Assume you have the airbyte repo checked out at `../airbyte`.
 50
 51Testing Version Pinning:
 52- A persistent test connector is available in the test workspace for version override testing:
 53  - **Source ID:** `e465c30e-e1c1-4713-866c-fa503109c06c`
 54  - **Type:** source-faker
 55  - **Name:** "DO-NOT-DELETE mcp-testing source-faker for version override tests"
 56  - **URL:** https://cloud.airbyte.com/workspaces/19d7a891-8e0e-40ac-8a8c-5faf8d11e47c/source/e465c30e-e1c1-4713-866c-fa503109c06c
 57- Use this connector ID if it exists for faster testing. If it doesn't exist or you need a fresh
 58  connector, you can deploy a new one using the Airbyte (Coral) MCP server with source-faker
 59  and config `{"count":100,"seed":123,"parallelism":1}`.
 60- Between setting and unsetting version pinning, print the url of the deployed connector to the user
 61  so they can verify the version pinning took effect if they wish.
 62
 63Be efficient and practical in your testing approach.
 64""".strip()
 65
 66
 67@mcp_prompt(
 68    name="test-my-tools",
 69    description="Test all available MCP tools to confirm they are working properly",
 70)
 71def test_my_tools_prompt(
 72    scope: Annotated[
 73        str | None,
 74        Field(
 75            description=(
 76                "Optional free-form text to focus or constrain testing. "
 77                "This can be a single word, a sentence, or a paragraph "
 78                "describing the desired scope or constraints."
 79            ),
 80        ),
 81    ] = None,
 82) -> list[dict[str, str]]:
 83    """Generate a prompt that instructs the agent to test all available tools.
 84
 85    Returns:
 86        List containing a single message dict with the guidance text
 87    """
 88    content = TEST_MY_TOOLS_GUIDANCE
 89
 90    if scope:
 91        content = f"{content}\n\n---\n\nAdditional scope or constraints:\n{scope}"
 92
 93    return [
 94        {
 95            "role": "user",
 96            "content": content,
 97        }
 98    ]
 99
100
101def register_prompts(app: FastMCP) -> None:
102    """Register all prompts with the FastMCP app.
103
104    Args:
105        app: FastMCP application instance
106    """
107    register_mcp_prompts(app, mcp_module=__name__)