Skip to main content
Glama

contaazul_sale_write_update

Cria ou atualiza venda. data é o payload da venda em JSON. action=create (POST /venda) — OBRIGATÓRIOS: id_cliente (UUID, via contaazul_list_people), situacao (EM_ANDAMENTO ou APROVADO), data_venda (AAAA-MM-DD), itens[] e condicao_pagamento; numero é obrigatório na API mas, se omitido, usamos o próximo número livre da empresa. action=update (PUT /venda/{id}, substitui a venda) — passe id e os mesmos campos do create; versao (inteiro, controle de concorrência) é obrigatório na API e, se omitido, é lido da venda atual, assim como numero, id_cliente e situacao. situacao de escrita: EM_ANDAMENTO, APROVADO, FATURADO, CANCELADO (valores da busca como approved/invoiced são convertidos).

[Flattened action: update]

Bulk support: accepts ids for batched execution.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "data": "<data>"
    },
    "name": "contaazul_sale_write_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
idsNo
dataYes
accountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / account / description
      Removed value: -"Quando o install tem mais de uma empresa Conta Azul: company_id, label, ou parcial. Ver contaazul_list_accounts."
    • removedInput schema / properties / ids / description
      Removed value: -"Bulk mode: multiple values for id"
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare the generic readOnly/destructive/idempotent profile; the description adds substantive behavior: PUT fully replaces the sale, versao is an optimistic-concurrency guard, omitted numero/versao/id_cliente/situacao are silently read from the current sale, and search-style situacao values are converted. Those fallbacks and the replacement semantics are exactly what an agent needs to avoid data loss and are invisible in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded and clearly segmented by action, with required fields and endpoint paths up front and fallback rules after them. Nearly every clause carries operational information; the one wasted element is the create branch, which does not apply to this flattened update tool and adds noise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter mutation with no output schema and only generic annotations, the definition covers the payload contract, the required-field matrix per action, concurrency handling, value normalization, and batch support. The only material holes are the `account` parameter and error/return behavior, which are minor next to what is provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning, and it does for the required `data` (JSON payload with enumerated mandatory inner fields) and for `id` in the update path. `ids` is only waved at via the bulk sentence and `account` is never explained, so the compensation is strong but incomplete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (create/update a sale) and pins each action to a concrete endpoint (POST /venda, PUT /venda/{id}), which is far beyond a restatement of the name. However, it never mentions the sibling tools contaazul_sale_write_create and contaazul_sale_cancel, so an agent reading only this definition could route a creation to this tool instead of the dedicated create sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is solid in-tool guidance: which fields are API-required per action, the fallback behavior when they are omitted, and an explicit pointer to contaazul_list_people for obtaining id_cliente. But there is no guidance on when to prefer the sibling create tool over action=create here, nor on using contaazul_sale_cancel versus writing situacao=CANCELADO, leaving the main cross-tool choice to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.