Skip to main content
Glama

create_client

Add new clients to FreshBooks by entering their contact information and currency preferences for billing and invoicing.

Instructions

Create a new client.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYes
first_nameNo
last_nameNo
organizationNo
phoneNo
currency_codeNoUSD

Implementation Reference

  • The `create_client` tool handler function, which takes client details, builds the request payload, and calls `client.accounting_create` to interact with the FreshBooks API.
    async def create_client(
        email: str,
        first_name: str = "",
        last_name: str = "",
        organization: str = "",
        phone: str = "",
        currency_code: str = "USD",
    ) -> str:
        """Create a new client."""
        data = {"email": email, "currency_code": currency_code}
        if first_name:
            data["fname"] = first_name
        if last_name:
            data["lname"] = last_name
        if organization:
            data["organization"] = organization
        if phone:
            data["mob_phone"] = phone
        result = await client.accounting_create("users/clients", "client", data)
        c = result.get("client", result)
        return f"Client created: {c.get('fname', '')} {c.get('lname', '')} (ID: {c.get('id')})"

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/AlexlaGuardia/MCP-Freshbooks'

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