Skip to main content
Glama

MCP Server Airflow Token

test_connection

Test connectivity to external systems by validating connection parameters such as host, port, and credentials before deploying workflows.

Instructions

Test a connection

Input Schema

NameRequiredDescriptionDefault
conn_typeYes
extraNo
hostNo
loginNo
passwordNo
portNo
schemaNo

Input Schema (JSON Schema)

{ "properties": { "conn_type": { "title": "Conn Type", "type": "string" }, "extra": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Extra" }, "host": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Host" }, "login": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Login" }, "password": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Password" }, "port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Port" }, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Schema" } }, "required": [ "conn_type" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'test_connection' tool. It accepts connection parameters, builds a connection_request dictionary, calls the underlying Airflow ConnectionApi.test_connection, and returns the response as MCP TextContent.
    async def test_connection( conn_type: str, host: Optional[str] = None, port: Optional[int] = None, login: Optional[str] = None, password: Optional[str] = None, schema: Optional[str] = None, extra: Optional[str] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: connection_request = { "conn_type": conn_type, } if host is not None: connection_request["host"] = host if port is not None: connection_request["port"] = port if login is not None: connection_request["login"] = login if password is not None: connection_request["password"] = password if schema is not None: connection_request["schema"] = schema if extra is not None: connection_request["extra"] = extra response = connection_api.test_connection(connection_request=connection_request) return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The get_all_functions() in connection.py includes the registration tuple for 'test_connection' (handler, name, description, read_only=True), which is imported and used in src/main.py for overall tool registration.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (list_connections, "list_connections", "List all connections", True), (create_connection, "create_connection", "Create a connection", False), (get_connection, "get_connection", "Get a connection by ID", True), (update_connection, "update_connection", "Update a connection by ID", False), (delete_connection, "delete_connection", "Delete a connection by ID", False), (test_connection, "test_connection", "Test a connection", True), ]
  • Initialization of the connection_api instance used by the test_connection handler.
    connection_api = ConnectionApi(api_client)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikhil-ganage/mcp-server-airflow-token'

If you have feedback or need assistance with the MCP directory API, please join our Discord server