list_connections
Retrieve all connection IDs from a Fivetran account using the MCP Fivetran server. This tool makes a GET request to the Fivetran API, returning a comma-separated string of IDs for streamlined account management.
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-92 (handler)The handler function decorated with @mcp.tool() that implements the list_connections tool. It queries the Fivetran connections endpoint and extracts connection IDs into a comma-separated string.@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)