Skip to main content
Glama

Arquivix Notas · NFS-e

nfse_issue

Destructive

Emits a new NFS-e (Nota Fiscal de Serviços Eletrônica). The issuing company is identified by company_tax_id (its CNPJ) or company_id. Minimal call: company_tax_id + amount. The customer is optional (omit it for an anonymous consumer invoice), and the competence date, service code and municipality default to today and to the company settings. Returns immediately with the queued status; the final status comes later. With emission_type SCHEDULE or RECURRING nothing is issued yet: it returns the schedule (schedule_id) instead. Without credits it fails with an insufficient credits error. With type "nfe" it emits an NF-e (goods, model 55, homologação only) instead: it takes company_id, the nfe object and a required idempotency_key, and its final status is read with type "nfe". An NF-e can also be scheduled: with emission_type SCHEDULE or RECURRING (and competence_date, recurrence_frequency like an NFS-e) the nfe object is checked now and stored as it is; each run issues it on its day, with the items and prices as they were saved (Arquivix Notas does not control stock). It returns schedule_id. With type "nfce" it emits a NFC-e (sale to the consumer, model 65, homologação only): same fields, the NFC-e body goes in the nfe object (no natOp; the consumer CPF is optional; it cannot be scheduled: it is a sale at the counter); its final status is read with type "nfce".

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "nfse_issue"
  }
}

Input Schema

NameRequiredDescriptionDefault
nfeNoThe NF-e as in POST /v1/invoices (camelCase, without companyId and type): recipient {taxId, name, indIeDest, stateRegistration?, email?, address{street, number, district, zip, cityCode, city, state}}, items[] {code, description, ncm, cfop, unit, quantity, unitPrice, tax? {csosn}}, payments[] {tPag, amount, card? {tpIntegra?, cnpj?, tBand?, cAut?}: left out, tPag 03, 04 and 17 go with tpIntegra 2}, natOp?, change?, additionalInfo?. The customer informs CFOP, NCM and CSOSN; Arquivix Notas calculates an estimate (Simples credit and approximate taxes). Phase 1: homologação only, Simples Nacional (CSOSN 102 or 400). For type "nfce" (consumer sale, model 65) put the NFC-e here instead: recipient? {taxId?, name?, email?, address? (needed for indPres 4)}, indPres? (1 in person, 4 delivery, 5 in person outside the store), items[], payments[] {tPag, amount, card? {tpIntegra?, cnpj?, tBand?, cAut?}}, change?, additionalInfo?; no natOp. The CPF/CNPJ of the consumer is optional but required above the limit of the state (R$ 10.000,00 by default). The NFC-e uses QR Code v3 (no CSC), has no correction letter and can be cancelled within 30 minutes.
typeNoKind of invoice: "nfse" (default, services), "nfe" (goods, model 55) or "nfce" (sale to the consumer, model 65). NF-e and NFC-e are homologação only and need their own release for the account. With "nfe" or "nfce" use invoice_id, not access_key.nfse
notesNoFree text printed on the invoice as complementary information. Does not change any tax.
amountNoTotal value of the service in BRL. Either this or services, not both.
customerNoTomador. Optional: omit it for an invoice without tomador. When sent with any data, tax_id (CPF or CNPJ) is required.
discountNoUnconditional discount in BRL (>= 0, at most the amount).
servicesNoItemized alternative to amount: the total is the sum of quantity x unit_price.
deductionNoDeduction from the ISS tax base in BRL, declared by the issuer (> 0 and less than amount minus discount). The issuer is responsible for the declared value; Arquivix Notas does not check whether the deduction is allowed.
company_idNoUUID of the issuing company. Wins over company_tax_id when both are sent.
send_emailNoEmail the authorized invoice to the customer.
descriptionNoOptional service description (used with amount). When omitted, the name of the service code is used.
external_idNoYour own reference for this invoice.
service_codeNoOptional national service code (6 digits). Inherits company.defaultServiceCode when omitted, then 100901 (LC 116 item 10.09).
emission_typeNoIMMEDIATE (default) issues now. SCHEDULE issues once on competence_date; RECURRING issues repeatedly starting on competence_date (needs recurrence_frequency). Both create a schedule and return its id: runs happen at 09:00 America/Sao_Paulo on business days, a weekend date runs on Monday, and each note takes the competence of the day it runs. Manage schedules with the schedule_* tools.
company_tax_idNoCNPJ of the issuing company (punctuation optional). Alternative to company_id.
purchase_orderNoPurchase order, service order or project number the customer asked to see on the invoice. Does not change any tax.
competence_dateNoYYYY-MM-DD. Defaults to today (America/Sao_Paulo). With emission_type SCHEDULE or RECURRING it is required and is the date of the first run (from tomorrow on).
idempotency_keyNoRepeat the same key to avoid issuing twice.
municipality_codeNoOptional IBGE place of service (7 digits). Inherits company.municipalityCode when omitted.
recurrence_ends_onNoYYYY-MM-DD, optional. Last day the recurrence may run. Without it, it runs until paused or cancelled.
service_profile_idNoOptional service tax profile id (UUID).
recurrence_frequencyNoRequired with emission_type RECURRING.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag this as a destructive, open-world, non-idempotent write, so the bar is lower, yet the description adds real substance: it returns immediately with a queued status and the final status is fetched later, schedules return schedule_id instead of an invoice, runs happen at 09:00 America/Sao_Paulo on business days, NF-e line items and prices are frozen at schedule time, and NFC-e can be cancelled within 30 minutes. The idempotency_key note is consistent with idempotentHint=false because idempotency is opt-in rather than default.

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

Conciseness2/5

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

It is effectively one long undifferentiated paragraph that crams three invoice models, scheduling rules and credit behavior together, so an agent skimming it can lose the main NFS-e path. Significant portions restate the nfe property's schema documentation (NFC-e recipient/payments/QR Code details), which is duplication rather than added value.

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

Completeness4/5

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

For a 22-parameter, nested-object, multi-mode emission tool with no output schema, the description covers the essential decision points: which company identifier wins, minimal payload, defaulting behavior, scheduling semantics, credit failure, and post-issue lifecycle for each invoice kind. It stops short of describing the shape of the immediate/queued response or other error conditions, which matters given no output schema exists.

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 100%, so the baseline would be 3, but the description adds conditional requirements the schema does not express: idempotency_key is required specifically for type "nfe", and nfe/nfce invoice bodies go into the nfe object, which shares the NFS-e emission type field. It also clarifies the either/or between amount and services and the defaulting chain for competence date, service code and municipality.

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?

The description opens with a specific verb and resource ("Emits a new NFS-e") and expands into the three invoice kinds it can emit (nfse, nfe, nfce), making the scope clear. It also hints at separation from the schedule management family ("Manage schedules with the schedule_* tools"). It does not distinguish itself from nfse_issue_batch, nfse_repeat or cte_issue, so sibling differentiation is incomplete.

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?

It gives a concrete minimal call (company_tax_id + amount), states when the customer can be omitted, when nested fields default to today/company settings, and when to pick IMMEDIATE vs SCHEDULE/RECURRING. It also states precondition-style behavior (insufficient credits error, homologação-only for NF-e/NFC-e, NFC-e cannot be scheduled). It does not explicitly say when to use this tool rather than a batch/repeat variant.

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