sync_connection
Trigger data synchronization for a Fivetran connection using its ID to update datasets and maintain current information.
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 is decorated with @mcp.tool() for registration in FastMCP. The function unpauses the specified Fivetran connector and triggers a forced sync on the connection, returning the JSON response from the API.@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()