update_customer
Referência da tool update_customer do MCP Server do bitERP (Clientes).
Update Customer · Clientes
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Não | Sim | Sim | Não |
Descrição
A descrição abaixo é a que o servidor publica, em inglês, e é o texto que o agente lê para decidir quando usar a tool.
Updates one customer record. Only the provided fields are changed.
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
tenant | string | Sim | Defines which tenant will have data read or changed. Use list_tenants first and prefer the returned tenant slug. Writes are permanent, so when the user has more than one tenant you must confirm the tenant before any write and never assume or reuse a previous choice without confirmation. UUID is accepted only when already known safely. |
id | string (UUID) | Sim | The UUID of the customer to update |
type | string | Não | Customer type Valores: individual, company. |
legal_name | string | Não | New legal name |
tax_id | string | Não | Tax identification number of the party: CPF or CNPJ in Brazil, SSN or EIN in the United States. Unique per organization. |
tax_id_type | string | Não | Type of the tax identification number: CPF, CNPJ, EIN or SSN (uppercase) Valores: CPF, CNPJ, EIN, SSN. |
trade_name | string | Não | New trade name |
website | string | Não | New website URL |
address_street | string | Não | New street name, without the number (logradouro) |
address_number | string | Não | New street number, up to 10 characters (numero) |
address_complement | string | Não | New unit, suite, floor or building (complemento) |
address_district | string | Não | New neighborhood (bairro) |
country_code | string | Não | New country: ISO 3166-1 alpha-2 (BR), alpha-3 (BRA), numeric code (076) or name. Omit to keep the current country; state and city are then resolved within it. |
state | string | Não | State: code (e.g. SP), name (e.g. São Paulo) or, for Brazil, the 2-digit IBGE state code |
state_id | integer | Não | bitERP states catalog id (alternative to state) |
city | string | Não | City name (e.g. Campinas). Resolved within the given state; without a state, within the country. Ambiguous names return an error. |
city_id | integer | Não | bitERP cities catalog id, or the 7-digit IBGE municipality code for Brazil (alternative to city) |
postal_code | string | Não | New postal code |
is_blocked | boolean | Não | Whether the customer is blocked |
reference_code | string ou null | Não | New customer reference code (null to clear) |
emails | array de string | Não | New array of email addresses |
phones | array de string | Não | New array of phone numbers |
tags | array de string | Não | New array of tags |
br_data | object | Não | Brazil-specific data. Only accepted when the organization is in Brazil. |
br_data.ie | string | Não | State tax registration (inscricao estadual) |
br_data.ie_exempt | boolean | Não | Whether the party is exempt from the state tax registration |
br_data.im | string | Não | Municipal tax registration (inscricao municipal) |
br_data.suframa | string | Não | SUFRAMA registration (Manaus free trade zone) |
br_data.tax_regime | string | Não | Tax regime: individual (natural person), simples_nacional, mei, lucro_presumido, lucro_real or outros Valores: individual, simples_nacional, mei, lucro_presumido, lucro_real, outros. |
br_data.cnae_primary | string | Não | Primary CNAE activity code |
br_data.cnae_secondary | array de string | Não | Secondary CNAE activity codes |
br_data.nire | string | Não | Company registry number at the state board of trade (NIRE) |
br_data.pix_key | string | Não | PIX key used to pay or receive from the party |
br_data.pix_key_type | string | Não | Type of the PIX key Valores: cpf, cnpj, email, phone, random. |
us_data | object | Não | United States-specific data. Only accepted when the organization is in the United States. |
us_data.w9_on_file | boolean | Não | Whether a signed W-9 form is on file |
us_data.w9_received_date | string (date) | Não | Date the W-9 was received (YYYY-MM-DD) |
us_data.naics_code | string | Não | NAICS industry code |
us_data.sic_code | string | Não | SIC industry code |
us_data.tax_classification | string | Não | Federal tax classification (e.g. c_corp, s_corp, llc, individual) |
us_data.sales_tax_exempt | boolean | Não | Whether the party is exempt from sales tax |
us_data.sales_tax_exempt_certificate | string | Não | Sales tax exemption certificate number |
us_data.sales_tax_exempt_expiry | string (date) | Não | Expiry date of the sales tax exemption (YYYY-MM-DD) |
us_data.resale_certificate | string | Não | Resale certificate number |
us_data.state_tax_id | string | Não | State tax ID |
us_data.state_of_incorporation | string | Não | Two-letter code of the state of incorporation |
us_data.duns_number | string | Não | D-U-N-S number |
us_data.cage_code | string | Não | CAGE code |
us_data.bank_name | string | Não | Name of the bank of the party |
us_data.routing_number | string | Não | ABA routing number of the bank account of the party |
us_data.ach_authorized | boolean | Não | Whether ACH payments are authorized |
us_data.ach_authorization_date | string (date) | Não | Date the ACH authorization was given (YYYY-MM-DD) |
Resposta
O structuredContent da resposta traz os campos abaixo (até dois níveis; o schema completo está no outputSchema publicado no tools/list).
| Campo | Tipo | Descrição |
|---|---|---|
id | string (UUID) | — |
tenant_id | string (UUID) | — |
type | string | — |
tax_id | string ou null | — |
tax_id_type | string ou null | Valores: CPF, CNPJ, EIN, SSN. |
legal_name | string | — |
trade_name | string ou null | — |
website | string ou null | — |
address_street | string ou null | — |
address_number | string ou null | — |
address_complement | string ou null | — |
address_district | string ou null | — |
state_id | integer ou null | — |
city_id | integer ou null | — |
postal_code | string ou null | — |
country_code | string | — |
reference_code | string ou null | — |
bank_code | string ou null | — |
branch_number | string ou null | — |
account_number | string ou null | — |
account_type | string ou null | — |
emails | array de string | — |
phones | array de string | — |
tags | array de string | — |
is_blocked | boolean | — |
metadata | object ou null | — |
created_at | string (date-time) | — |
updated_at | string (date-time) | — |
deleted_at | string (date-time) ou null | — |
country | object ou null | — |
country.id | integer | — |
country.iso2 | string | — |
country.iso3 | string | — |
country.name | string | — |
state | object ou null | — |
state.id | integer | — |
state.state_code | string ou null | — |
state.name | string | — |
city | object ou null | — |
city.id | integer | — |
city.name | string | — |
br_data | object ou null | — |
br_data.customer_id | string (UUID) | — |
br_data.ie | string ou null | — |
br_data.ie_exempt | boolean | — |
br_data.im | string ou null | — |
br_data.suframa | string ou null | — |
br_data.tax_regime | string ou null | — |
br_data.cnae_primary | string ou null | — |
br_data.cnae_secondary | array de string ou null | — |
br_data.nire | string ou null | — |
br_data.pix_key | string ou null | — |
br_data.pix_key_type | string ou null | — |
us_data | object ou null | — |
us_data.customer_id | string (UUID) | — |
us_data.w9_on_file | boolean | — |
us_data.w9_received_date | string (date) ou null | — |
us_data.naics_code | string ou null | — |
us_data.sic_code | string ou null | — |
us_data.tax_classification | string ou null | — |
us_data.sales_tax_exempt | boolean | — |
us_data.sales_tax_exempt_certificate | string ou null | — |
us_data.sales_tax_exempt_expiry | string (date) ou null | — |
us_data.resale_certificate | string ou null | — |
us_data.state_tax_id | string ou null | — |
us_data.state_of_incorporation | string ou null | — |
us_data.duns_number | string ou null | — |
us_data.cage_code | string ou null | — |
us_data.bank_name | string ou null | — |
us_data.routing_number | string ou null | — |
us_data.ach_authorized | boolean | — |
us_data.ach_authorization_date | string (date) ou null | — |
_tenant | object | — |
_tenant.id | string (UUID) | — |
_tenant.slug | string | — |
_tenant.company_name | string | — |
Exemplo de chamada
Requisição tools/call com os parâmetros obrigatórios. Os valores são ilustrativos: troque minha-empresa pelo tenant devolvido por list_tenants e cada <...> por um valor real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "update_customer",
"arguments": {
"tenant": "minha-empresa",
"id": "<uuid>"
}
}
}
