Skip to main content
Glama
norman-finance

Norman Finance MCP Server

Official

create_client

Generate a new client record in the Norman Finance MCP Server by providing essential details such as name, type, address, and contact information, streamlining client management for accounting and tax services.

Instructions

Create a new client.

Args:
    name: Client name or business name
    client_type: Type of client (defaults to "business"), Options: "business", "private"
    address: Client physical address
    zip_code: Client postal/zip code
    email: Client email address
    country: Client country code (e.g. "DE")
    vat_number: Client VAT number
    city: Client city
    phone: Client phone number
    
Returns:
    Newly created client record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressNo
cityNo
client_typeNobusiness
countryNo
emailNo
nameYes
phoneNo
vat_numberNo
zip_codeNo

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the core logic for creating a new client by making a POST request to the Norman Finance API endpoint.
    @mcp.tool()
    async def create_client(
        ctx: Context,
        name: str,
        client_type: str = "business",
        address: Optional[str] = None,
        zip_code: Optional[str] = None,
        email: Optional[str] = None,
        country: Optional[str] = None,
        vat_number: Optional[str] = None,
        city: Optional[str] = None,
        phone: Optional[str] = None
    ) -> Dict[str, Any]:
        """
        Create a new client.
        
        Args:
            name: Client name or business name
            client_type: Type of client (defaults to "business"), Options: "business", "private"
            address: Client physical address
            zip_code: Client postal/zip code
            email: Client email address
            country: Client country code (e.g. "DE")
            vat_number: Client VAT number
            city: Client city
            phone: Client phone number
            
        Returns:
            Newly created client record
        """
        api = ctx.request_context.lifespan_context["api"]
        company_id = api.company_id
        
        if not company_id:
            return {"error": "No company available. Please authenticate first."}
        
        if client_type not in ["business", "private"]:
            return {"error": "client_type must be either 'business' or 'private'"}
        
        clients_url = urljoin(
            config.api_base_url, 
            f"api/v1/companies/{company_id}/clients/"
        )
        
        client_data = {
            "name": name,
            "clientType": client_type
        }
    
        if email:
            client_data["email"] = email
        if phone:
            client_data["phone"] = phone
        if vat_number:
            client_data["vatNumber"] = vat_number
        if address:
            client_data["address"] = address
        if zip_code:
            client_data["zipCode"] = zip_code
        if country:
            client_data["country"] = country
        if city:
            client_data["city"] = city
            
        return api._make_request("POST", clients_url, json_data=client_data)
  • The registration block in the MCP server setup where register_client_tools(server) is called, which in turn registers the 'create_client' tool among other client tools.
    # Register all tools
    register_client_tools(server)
    register_invoice_tools(server)
    register_tax_tools(server)
    register_transaction_tools(server)
    register_document_tools(server)
    register_company_tools(server)
    register_prompts(server)
    register_resources(server)

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/norman-finance/norman-mcp-server'

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