Created
May 9, 2025 07:23
-
-
Save DavideTodorov/db893524ab2f31cd5c28380297447f89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment