sync_connection
Trigger synchronization of a Fivetran connection by specifying its ID. Use this tool to ensure data pipelines stay updated and operational within the MCP Fivetran server environment.
Instructions
Tool for syncing a fivetran connection by ID.
Parameters:
id (str): id of the connection
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/mcp_fivetran/main.py:94-113 (handler)The handler function for the 'sync_connection' tool. It first unpauses the connector by PATCHing /v1/connectors/{id} with paused=False, then triggers a forced sync by POSTing to /v1/connections/{id}/sync, and returns the JSON response from the sync request.@mcp.tool() def sync_connection(id: str) -> str: """ Tool for syncing a fivetran connection by ID. Parameters: id (str): id of the connection """ url = f"https://api.fivetran.com/v1/connectors/{id}" data = { 'paused': False } requests.request("PATCH", url, json=data, headers=headers) url = f"https://api.fivetran.com/v1/connections/{id}/sync" payload = {"force": True} response = requests.request("POST", url, json=payload, headers=headers) return response.json()