Skip to main content
Glama
andrewkkchan

MCP Fivetran

by andrewkkchan

invite_fivetran_user

Send invitations to join a Fivetran account by providing user details including email, name, and phone number.

Instructions

Tool for inviting users to Fivetran.

This tool sends an invitation to a specified email address to join a Fivetran account.
It requires four parameters and returns the API response as a JSON object.

Parameters:
    email (str): Email address of the user to invite. Must be a valid email format.
    given_name (str): First name of the user. Cannot be empty.
    family_name (str): Last name of the user. Cannot be empty.
    phone (str): Phone number of the user. Should include country code (e.g., +1 for US).

Returns:
    Dict[Any, Any]: JSON response from the Fivetran API containing status and user information.

Example:
    invite_fivetran_user(
        email="user@example.com",
        given_name="John",
        family_name="Doe",
        phone="+15551234567"
    )

Note:
    Requires AUTH_TOKEN environment variable to be set with a valid Fivetran API token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYes
given_nameYes
family_nameYes
phoneYes

Implementation Reference

  • The handler function for the 'invite_fivetran_user' tool, decorated with @mcp.tool() for registration. It calls the helper function and returns the API response as JSON.
    @mcp.tool()
    def invite_fivetran_user(email: str, given_name: str, family_name: str, phone: str) -> Dict[Any, Any]:
        """Tool for inviting users to Fivetran.
    
        This tool sends an invitation to a specified email address to join a Fivetran account.
        It requires four parameters and returns the API response as a JSON object.
    
        Parameters:
            email (str): Email address of the user to invite. Must be a valid email format.
            given_name (str): First name of the user. Cannot be empty.
            family_name (str): Last name of the user. Cannot be empty.
            phone (str): Phone number of the user. Should include country code (e.g., +1 for US).
    
        Returns:
            Dict[Any, Any]: JSON response from the Fivetran API containing status and user information.
    
        Example:
            invite_fivetran_user(
                email="user@example.com",
                given_name="John",
                family_name="Doe",
                phone="+15551234567"
            )
    
        Note:
            Requires AUTH_TOKEN environment variable to be set with a valid Fivetran API token.
        """
        response = invite_user(email, given_name, family_name, phone)
        return response.json()
  • Supporting helper function that performs the core logic: constructs the payload and makes the POST request to Fivetran's /v1/users endpoint to invite the user.
    def invite_user(email, given_name, family_name, phone) -> str:
        """Invites a user to join a Fivetran account.
    
        This function sends an invitation to a new user by making a POST request to the
        Fivetran API. It requires an authentication token stored in the AUTH_TOKEN
        environment variable.
    
        Args:
            email (str): The email address of the user to invite.
            given_name (str): The first name (given name) of the user.
            family_name (str): The last name (family name) of the user.
            phone (str): The phone number of the user.
    
        Returns:
            requests.Response: The response object from the Fivetran API containing
            status code, headers, and response body. Note that despite the type hint
            indicating str, the actual return type is a Response object.
    
        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/users"
    
        payload = {
            "email": email,
            "given_name": given_name,
            "family_name": family_name,
            "phone": phone,
        }
    
        response = requests.request("POST", url, json=payload, headers=headers)
        return response
  • The @mcp.tool() decorator registers the invite_fivetran_user function as an MCP tool.
    @mcp.tool()

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