list_connections
Retrieve all connection IDs from your Fivetran account to manage data pipelines and monitor integration status.
Instructions
Tool for listing all connections' IDs in the Fivetran account.
This tool retrieves all connection IDs from the Fivetran account by making a GET request
to the Fivetran API. It requires an authentication token stored in the auth_token variable.
Returns:
str: A comma-separated string of all connection IDs in the account.
Note:
The auth_token must be set before calling this function.
The function does not handle exceptions that might occur during the API request.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_fivetran/main.py:68-91 (handler)The handler function decorated with @mcp.tool() that implements the list_connections tool. It makes a GET request to the Fivetran API to retrieve all connections and returns a comma-separated string of connection IDs.@mcp.tool() def list_connections() -> str: """Tool for listing all connections' IDs in the Fivetran account. This tool retrieves all connection IDs from the Fivetran account by making a GET request to the Fivetran API. It requires an authentication token stored in the auth_token variable. Returns: str: A comma-separated string of all connection IDs in the account. Note: The auth_token must be set before calling this function. The function does not handle exceptions that might occur during the API request. """ url = "https://api.fivetran.com/v1/connections" response = requests.request("GET", url, headers=headers) data = json.loads(response.text) item_ids = [item["id"] for item in data["data"]["items"]] return ", ".join(item_ids)