biterp

update_quote

Referência da tool update_quote do MCP Server do bitERP (Orçamentos).

Update Quote · Orçamentos

Somente leituraDestrutivaIdempotenteMundo aberto
NãoSimNãoNã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 quote record and can replace or reconcile its line items.

Parâmetros

ParâmetroTipoObrigatórioDescrição
tenantstringSimDefines 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.
idstring (UUID)SimThe UUID of the quote to update
customer_idstring (UUID)NãoNew customer UUID
reference_codestring ou nullNãoNew reference code (null to clear, must be unique per tenant)
statusstringNãoNew status Valores: pending, approved, rejected, expired.
quote_datestringNãoNew quote date in ISO 8601 format
valid_untilstringNãoNew expiration date in ISO 8601 format
salesperson_namestringNãoNew salesperson name
estimated_delivery_datestringNãoNew estimated delivery date in ISO 8601 format
descriptionstringNãoNew description
tax_notesstringNãoNew tax notes
payment_notesstringNãoNew payment notes
discount_amountdecimal (string ou number)NãoNew global discount amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted
discount_ratedecimal (string ou number)NãoNew global discount rate as decimal string on the 0-100 percentage scale (e.g. "10" = 10%, "0.5" = half a percent); a JSON number on the same scale is also accepted
itemsarray de objetosNãoArray of items to reconcile
items[].idstring (UUID)NãoExisting item UUID to update. Omit to create a new item.
items[].product_idstring (UUID)NãoProduct UUID
items[].item_descriptionstringNãoItem description
items[].quantitydecimal (string ou number)NãoQuantity as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted, must be > 0
items[].unit_pricedecimal (string ou number)NãoUnit price as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted, must be non-negative
items[].discount_amountdecimal (string ou number)NãoDiscount amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted, must be non-negative
items[].positionintegerNãoItem position/order

Resposta

O structuredContent da resposta traz os campos abaixo (até dois níveis; o schema completo está no outputSchema publicado no tools/list).

CampoTipoDescrição
idstring (UUID)—
tenant_idstring (UUID)—
record_numberinteger—
reference_codestring ou null—
product_typestringValores: goods, service, mixed.
statusstringValores: pending, approved, rejected, expired.
customer_idstring (UUID)—
quote_datestring (date)—
valid_untilstring (date) ou null—
salesperson_namestring ou null—
estimated_delivery_datestring (date) ou null—
descriptionstring ou null—
tax_notesstring ou null—
payment_notesstring ou null—
subtotalstring—
discount_amountstring—
discount_ratestring—
total_discountstring—
totalstring—
metadataobject—
created_by_user_idstring (UUID) ou null—
updated_by_user_idstring (UUID) ou null—
deleted_by_user_idstring (UUID) ou null—
created_atstring (date-time)—
updated_atstring (date-time)—
deleted_atstring (date-time) ou null—
_tenantobject—
_tenant.idstring (UUID)—
_tenant.slugstring—
_tenant.company_namestring—

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_quote",
        "arguments": {
            "tenant": "minha-empresa",
            "id": "<uuid>"
        }
    }
}

Nesta página