update_quote
Referência da tool update_quote do MCP Server do bitERP (Orçamentos).
Update Quote · Orçamentos
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Não | Sim | 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.
Updates one quote record and can replace or reconcile its line items.
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 quote to update |
customer_id | string (UUID) | Não | New customer UUID |
reference_code | string ou null | Não | New reference code (null to clear, must be unique per tenant) |
status | string | Não | New status Valores: pending, approved, rejected, expired. |
quote_date | string | Não | New quote date in ISO 8601 format |
valid_until | string | Não | New expiration date in ISO 8601 format |
salesperson_name | string | Não | New salesperson name |
estimated_delivery_date | string | Não | New estimated delivery date in ISO 8601 format |
description | string | Não | New description |
tax_notes | string | Não | New tax notes |
payment_notes | string | Não | New payment notes |
discount_amount | decimal (string ou number) | Não | New 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_rate | decimal (string ou number) | Não | New 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 |
items | array de objetos | Não | Array of items to reconcile |
items[].id | string (UUID) | Não | Existing item UUID to update. Omit to create a new item. |
items[].product_id | string (UUID) | Não | Product UUID |
items[].item_description | string | Não | Item description |
items[].quantity | decimal (string ou number) | Não | Quantity 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_price | decimal (string ou number) | Não | Unit 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_amount | decimal (string ou number) | Não | Discount 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[].position | integer | Não | Item 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).
| Campo | Tipo | Descrição |
|---|---|---|
id | string (UUID) | — |
tenant_id | string (UUID) | — |
record_number | integer | — |
reference_code | string ou null | — |
product_type | string | Valores: goods, service, mixed. |
status | string | Valores: pending, approved, rejected, expired. |
customer_id | string (UUID) | — |
quote_date | string (date) | — |
valid_until | string (date) ou null | — |
salesperson_name | string ou null | — |
estimated_delivery_date | string (date) ou null | — |
description | string ou null | — |
tax_notes | string ou null | — |
payment_notes | string ou null | — |
subtotal | string | — |
discount_amount | string | — |
discount_rate | string | — |
total_discount | string | — |
total | string | — |
metadata | object | — |
created_by_user_id | string (UUID) ou null | — |
updated_by_user_id | string (UUID) ou null | — |
deleted_by_user_id | string (UUID) ou null | — |
created_at | string (date-time) | — |
updated_at | string (date-time) | — |
deleted_at | string (date-time) 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_quote",
"arguments": {
"tenant": "minha-empresa",
"id": "<uuid>"
}
}
}
