validate_tax_number
Validate tax numbers for specific regions using region codes. This tool ensures accurate tax number verification, aiding compliance and financial accuracy for businesses.
Instructions
Validate a tax number for a specific region.
Args:
tax_number: Tax number to validate
region_code: Region code (e.g. "BE" for Belgium)
Returns:
Validation result for the tax number
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region_code | Yes | ||
| tax_number | Yes |
Implementation Reference
- norman_mcp/tools/taxes.py:51-76 (handler)The handler function for the 'validate_tax_number' tool. It is decorated with @mcp.tool() for registration and includes inline schema via Pydantic Field descriptions. Makes a POST request to the backend API to validate the provided tax number for the specified region.@mcp.tool() async def validate_tax_number( ctx: Context, tax_number: str = Field(description="Tax number to validate"), region_code: str = Field(description="Region code (e.g., DE for Germany)") ) -> Dict[str, Any]: """ Validate a tax number for a specific region. Args: tax_number: Tax number to validate region_code: Region code (e.g., DE for Germany) Returns: Validation result """ api = ctx.request_context.lifespan_context["api"] validate_url = urljoin(config.api_base_url, "api/v1/taxes/check-tax-number/") validation_data = { "tax_number": tax_number, "region_code": region_code } return api._make_request("POST", validate_url, json_data=validation_data)
- norman_mcp/server.py:328-335 (registration)The registration block in the main server file where register_tax_tools(server) is called at line 330, which in turn registers the validate_tax_number tool among others.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)
- norman_mcp/server.py:18-18 (registration)Import of register_tax_tools function used to register the tax tools including validate_tax_number.from norman_mcp.tools.taxes import register_tax_tools