update_company
Fill in or fix the company's own address and fiscal fields — what get_company_readiness reports missing.
Before calling it: read the company's own registry row with lookup_taxpayer (its CNPJ), show the user the address you are about to write, and call only after they confirm it. Never invent or guess a field; leave out what neither the registry nor the user gave. The state cannot change here.
The registry row keeps street_type, street, number and neighborhood under metadata.address and the CEP as postal_code. Its city_code is the Receita's code (4 digits), not IBGE, and it has no city name: get the name with lookup_fiscal_code(kind="city", code=<city_code>) and send it as municipality_name, or send search_cities' 7-digit code as municipality_code.
The fiscal fields (tax_regime, simples_nacional, simples_apuracao, simples_apuracao_ibs_cbs, state_registration, service_code, municipal_registration, special_tax_regime, iss_rate and the approximate_tax_*percent ones) decide what every future document declares and owes: send them only when the user states them, never from a registry suggestion alone. They are the company owner's alone. An empty string clears municipal_registration, iss_rate and the approximate_tax*_percent ones.
Only what is sent changes. Answers with the readiness fields plus the address and fiscal fields as stored: when ready is true the company can issue, with no need to ask get_company_readiness again. Needs company:write.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "update_company"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | No | Street number, or SN when there is none. | |
| street | No | Street (logradouro). | |
| iss_rate | No | ISSQN rate in percent, above 0 and at most 5. | |
| zip_code | No | CEP, 8 digits; the mask is fine. | |
| company_id | No | UUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both. | |
| tax_regime | No | CRT: 1 Simples, 2 Simples excesso, 3 normal, 4 MEI. | |
| neighborhood | No | Neighborhood (bairro). | |
| service_code | No | Default NFS-e service code (cTribNac), e.g. 01.07.00. | |
| company_tax_id | No | CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit for a single company; else see list_authorized_companies. Send one, never both. | |
| simples_apuracao | No | NFS-e regApTribSN of an ME/EPP: 1, 2 or 3. | |
| simples_nacional | No | NFS-e Simples Nacional option (opSimpNac): 1 no, 2 MEI, 3 ME/EPP. | |
| municipality_code | No | The 7-digit IBGE code of a city in the company's state (search_cities finds it). Never the registry's 4-digit city_code, padded or not. Leave it out to send municipality_name. | |
| municipality_name | No | The city's name; the IBGE code is found from it in the company's state. Send it or municipality_code; both must agree. | |
| special_tax_regime | No | NFS-e regEspTrib: 0 none, 1 cooperative, 2 estimativa, 3 municipal microempresa, 4 notario/registrador, 5 autonomo, 6 sociedade de profissionais, 9 other. An MEI, and an ME/EPP with simples_apuracao 1, take only 0. | |
| state_registration | No | State registration (IE), digits or ISENTO; an NF-e needs it. | |
| municipal_registration | No | Inscricao municipal (provider IM), up to 15 letters or digits. | |
| block_activity_mismatch | No | Owner only. True refuses, False only warns. | |
| simples_apuracao_ibs_cbs | No | How an ME/EPP pays IBS/CBS: 1 in the DAS, 3 outside it; only 3 lets its NFS-e carry the IBS/CBS group in production. | |
| approximate_tax_state_percent | No | Lei 12.741 approximate tax percentage, 0 to 100. | |
| approximate_tax_federal_percent | No | Lei 12.741 approximate tax percentage, 0 to 100. | |
| approximate_tax_simples_percent | No | ME/EPP Simples approximate tax percentage (Lei 12.741), 0 to 99.99. | |
| approximate_tax_municipal_percent | No | Lei 12.741 approximate tax percentage, 0 to 100. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| ready | No | At least one document type can be issued. | |
| state | No | ||
| tax_id | No | ||
| address | No | The issuer address as stored. | |
| fix_url | No | The dashboard screen that fixes the first blocker. Null when nothing blocks. | |
| missing | No | Why not: certificate, certificate_expired, certificate_unreadable, address, state_registration, plan. Empty when ready. | |
| company_id | No | ||
| tax_regime | No | CRT: 1 Simples, 2 Simples excesso, 3 normal, 4 MEI. | |
| environment | No | homologation or production. | |
| fiscal_fields | No | The fiscal fields as stored, where set. | |
| default_series | No | The série used per document type when none is sent. | |
| has_certificate | No | ||
| by_document_type | No | Per nfe/nfse: ready, missing [{code, fields}] with the fields at fault, and warnings [{code}] for a default being declared (tax_regime_default, simples_nacional_default, service_code_default). | |
| certificate_expires_at | No | ||
| suggested_fiscal_fields | No | What the CNPJ registry suggests for tax_regime and simples_nacional. A suggestion for the user to confirm, never applied. |