Skip to main content
Glama

Arquivix Notas · NFS-e

nfse_issue_batch

Destructive

Emits up to 50 NFS-e in one call, for one company or several (for example the rows of a spreadsheet). Longer lists go in several batches of 50. Each item takes the same fields as a single NFS-e (company_tax_id or company_id, plus amount or services; customer, competence_date, service_code etc. are optional). With a stable idempotency_key per item (for example "-row-"), repeating the same batch after a timeout issues nothing twice. Items are checked one by one: invalid items come back rejected with an error and are not saved, the valid ones are saved together. Results are keyed by index (the item position, starting at 0); each rejected row carries its error.message. Accepted items are already saved, and sending them again without the same idempotency_key creates new invoices. Items with replayed true were already saved by an earlier call with the same idempotency_key. Issuance is asynchronous: each invoice starts queued and gets its final status later. Without confirm: true it changes nothing and returns a preview; with confirm: true it runs. The preview shows the number of invoices, the total amount, the companies and how many e-mails go out; items that would be rejected are listed with their error.

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": {
      "invoices": "<invoices>"
    },
    "name": "nfse_issue_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNotrue runs the action. Without it nothing changes and only a preview is returned.
invoicesYesInvoices to issue (1 to 50). Each item has the same fields as a single NFS-e; items may belong to different companies.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: per-item validation with partial success, rejected items not saved, results keyed by index with error.message, a 'replayed' flag for idempotency-key hits, and a warning that re-sending accepted items without the key creates duplicates — consistent with idempotentHint=false and destructiveHint=true. It also discloses asynchronous issuance (queued, final status later) and that omitting confirm:true changes nothing and returns a preview of counts, amounts, companies and e-mail volume.

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: capacity and scope first, then per-item semantics, then idempotency, then the confirm/preview gate. Nearly every sentence carries operational information, though the preview sentence is a little sprawling and repeats the confirm gate already stated in the schema.

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 complex, high-blast-radius batch mutation with no output schema, the description covers what an agent needs: partial-failure behavior, result keying, idempotency replay, async status lifecycle, and the dry-run preview contents. Nothing material about calling it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: it recommends a per-item idempotency_key convention ('<file>-row-<n>') and explains that index position (starting at 0) keys the results, which the schema does not convey. It also frames the required fields (company_tax_id or company_id, plus amount or services) as the minimum per item.

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

Purpose5/5

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

Opens with a specific verb and resource plus an explicit capacity bound: 'Emits up to 50 NFS-e in one call, for one company or several'. The batching scope and the 'same fields as a single NFS-e' framing let an agent distinguish this from a single-issuance sibling without opening either schema.

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

Usage Guidelines4/5

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

Gives clear selection context: use this for lists (e.g. spreadsheet rows), split longer lists into batches of 50, and it works across companies. It also states the confirm/preview gate, which is a usage precondition. It never names a single-invoice alternative explicitly, so routing to the non-batch sibling is left implicit.

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.

Resources