list_customer_credit_notes
Referência da tool list_customer_credit_notes do MCP Server do bitERP (Notas de crédito do cliente).
List Customer Credit Notes · Notas de crédito do cliente
| 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 customer credit notes of one organization. A customer credit note is a financial credit the tenant owes the customer. It is not a fiscal invoice (nota fiscal) and it does not move money. The list includes balance and status and omits the offset history.
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 by customer name, description, notes, reference code or the record number |
status | string | Não | Filter by status Valores: open, partial, used, cancelled. |
customer_id | string (UUID) | Não | Filter by customer ID |
issue_date_from | string (date) | Não | Notes issued on or after this date (YYYY-MM-DD) |
issue_date_to | string (date) | Não | Notes issued on or before this date (YYYY-MM-DD) |
cursor | string | Não | Cursor for pagination. Use next_cursor from the previous response. |
limit | integer | Não | Max results 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[].record_number | integer | — |
data[].customer_id | string (UUID) | — |
data[].customer | object ou null | — |
data[].financial_category_id | string (UUID) | — |
data[].source_invoice_id | string (UUID) ou null | — |
data[].origin | string | Valores: manual, overpayment, stripe_customer_balance. |
data[].status | string | Valores: open, partial, used, cancelled. |
data[].amount | string | — |
data[].cancelled_amount | string | — |
data[].used_amount | string | — |
data[].balance | string | — |
data[].has_usage | boolean | — |
data[].issue_date | string (date) | — |
data[].description | string ou null | — |
data[].reference_code | string ou null | — |
data[].notes | string ou null | — |
data[].cancelled_at | string (date-time) ou null | — |
data[].cancellation_reason | string ou null | — |
data[].created_at | string (date-time) | — |
data[].updated_at | string (date-time) | — |
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_customer_credit_notes",
"arguments": {
"tenant": "minha-empresa"
}
}
}
