list_sales_orders
Referência da tool list_sales_orders do MCP Server do bitERP (Pedidos de venda).
List Sales Orders · Pedidos de venda
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Sim | Não | 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.
Lists sales order records for one organization with optional filters and cursor-based pagination.
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. |
search | string | Não | Optional search term to filter orders by reference code, salesperson name, description, or the record code (PED-1042 for Brazilian companies; prefix depends on the tenant country; older SORD-1042 still matches, or just 1042) |
operation_type | string | Não | Optional filter by document operation type Valores: sale, return. |
product_type | string | Não | Optional filter by document product type Valores: goods, service, mixed. |
status | string | Não | Optional filter by order status Valores: confirmed, cancelled. |
customer_id | string (UUID) | Não | Optional filter by customer UUID |
quote_id | string (UUID) | Não | Optional filter by originating quote UUID |
include_details | boolean | Não | When true, include inline items and receivables in each listed order. Defaults to false for lighter responses. |
cursor | string | Não | Opaque cursor for pagination. Omit on first call, then use next_cursor from previous response. |
limit | integer | Não | Number of items per page (default: 10, max: 100) |
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 |
|---|---|---|
data | array de objetos | — |
data[].id | string (UUID) | — |
data[].tenant_id | string (UUID) | — |
data[].record_number | integer | — |
data[].customer_id | string (UUID) | — |
data[].quote_id | string (UUID) ou null | — |
data[].subscription_id | string (UUID) ou null | — |
data[].quote | object ou null | — |
data[].reference_code | string ou null | — |
data[].operation_type | string | — |
data[].product_type | string | Valores: goods, service, mixed. |
data[].status | string | Valores: draft, confirmed, cancelled. |
data[].order_date | string (date) | — |
data[].delivery_date | string (date) ou null | — |
data[].salesperson_name | string ou null | — |
data[].description | string ou null | — |
data[].notes | string ou null | — |
data[].subtotal | string | — |
data[].items_discount | string | — |
data[].discount_amount | string | — |
data[].discount_rate | string | — |
data[].total_discount | string | — |
data[].total | string | — |
data[].metadata | object | — |
data[].pending_receivables | array de objetos ou null | — |
data[].br_data | object ou null | — |
data[].created_by_user_id | string (UUID) ou null | — |
data[].updated_by_user_id | string (UUID) ou null | — |
data[].deleted_by_user_id | string (UUID) ou null | — |
data[].created_at | string (date-time) | — |
data[].updated_at | string (date-time) | — |
data[].deleted_at | string (date-time) ou null | — |
data[].customer | object ou null | — |
data[].invoice | object ou null | — |
data[].has_active_invoice | boolean | — |
data[].is_imported | boolean | — |
data[].financial_status | string ou null | Valores: open, partial, overdue, paid. |
has_next_page | boolean | — |
has_previous_page | boolean | — |
next_cursor | string ou null | — |
previous_cursor | string ou null | — |
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": "list_sales_orders",
"arguments": {
"tenant": "minha-empresa"
}
}
}
