Skip to main content
Glama
andrewkkchan

MCP Fivetran

by andrewkkchan

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
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • 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()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andrewkkchan/mcp_fivetran'

If you have feedback or need assistance with the MCP directory API, please join our Discord server