create_customer
Referência da tool create_customer do MCP Server do bitERP (Clientes).
Create Customer · Clientes
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Não | Não | Não | 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.
Creates one customer record in the organization master data.
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. |
type | string | Sim | Customer type: individual (a natural person) or company (a business entity) Valores: individual, company. |
legal_name | string | Sim | Legal name of the customer (required). For individuals: full name. For companies: razao social. |
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 | Trade name / brand name (nome fantasia) |
website | string | Não | Website URL |
address_street | string | Não | Street name only, without the number (logradouro). Example: "Av. Paulista" |
address_number | string | Não | Street number, up to 10 characters (numero). Example: "1000" or "S/N" |
address_complement | string | Não | Unit, suite, floor or building (complemento). Example: "Conj. 12" |
address_district | string | Não | Neighborhood (bairro). Example: "Bela Vista" |
country_code | string | Não | Country: ISO 3166-1 alpha-2 (BR), alpha-3 (BRA), numeric code (076) or name (Brasil/Brazil). Defaults to the organization's country. |
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 | Postal/ZIP code (CEP) |
is_blocked | boolean | Não | Whether the customer is blocked. Defaults to false. |
reference_code | string | Não | Internal customer reference code |
emails | array de string | Não | Array of email addresses for the customer |
phones | array de string | Não | Array of phone numbers for the customer |
tags | array de string | Não | Array of tags for categorization |
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": "create_customer",
"arguments": {
"tenant": "minha-empresa",
"type": "individual",
"legal_name": "<legal_name>"
}
}
}
