Add customer from ARES
add_customerSaves a Czech company to the customer address book by IČO, fetching its name, address, VAT ID and VAT status from ARES; requires a unique customer_id and never overwrites existing entries.
Instructions
Save a Czech company to the customer address book (~/.ucetka/customers.yaml) under customer_id, with name, address, DIČ (VAT ID) and VAT status fetched from the ARES registry by IČO (company ID).
Side effects: one HTTPS request to ares.gov.cz, then appends to customers.yaml. Not idempotent: if customer_id already exists it raises an error and changes nothing (existing entries are never overwritten or updated). Fails if the IČO is unknown in ARES or ARES is unreachable. Use lookup_company to only check a company, list_customers to see saved ones. Foreign customers without an IČO cannot be added here; pass their details directly to issue_invoice. Returns a one-line summary of the saved customer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customer_id": "<customer_id>",
"ico": "<ico>"
},
"name": "add_customer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ico | Yes | Customer's IČO (company ID), exactly 8 digits, e.g. '27082440'. Name, address, DIČ and VAT status are filled in from ARES. | |
| No | Address that invoices are e-mailed to; draft_invoice_email uses it as the default recipient. Omitted = no e-mail stored. | ||
| customer_id | Yes | New short key for the address book, later passed to issue_invoice as customer_id, e.g. 'vzorova-firma'. Must not exist yet. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |