Skip to main content
Glama

Arquivix Notas · NFS-e

nfe_settings_update

Idempotent

Set the NF-e and NFC-e settings of a company: state registration (IE, validated for the state of the company; leave it out to use the IE the SEFAZ has for the CNPJ when there is exactly one enabled) plus optional defaults (default_series for the NF-e, nfce_default_series for the NFC-e). The CRT follows the tax regime of the company (Simples Nacional 1, MEI 4); send crt only to override it. Returns the settings, what is still missing and registrationWarning when the SEFAZ cadastro says the IE will be refused.

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": {
      "company_id": "<company_id>"
    },
    "name": "nfe_settings_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
crtNoCRT: 1 Simples Nacional, 4 MEI. Só para trocar o que vem do regime da empresa.
company_idYesUUID of the company
default_csosnNoCSOSN padrão: "102" (sem crédito) ou "400" (não tributada).
default_nat_opNoNatureza da operação padrão, ex.: "Venda de mercadoria".
default_originNoOrigem padrão da mercadoria, de 0 a 8; 0 = nacional.
default_seriesNoSérie padrão da NF-e, de 0 a 999.
state_registrationNoIE, digits. Optional: left out, the IE found at the SEFAZ is used (when there is exactly one enabled)
nfce_default_seriesNoSérie padrão da NFC-e, de 0 a 999.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the operation is a non-destructive, idempotent write, so the description is not obligated to restate that; instead it adds genuinely new behavior: IE is validated against the company's state, the operation can succeed partially ('what is still missing'), and a registrationWarning is surfaced when SEFAZ cadastro data indicates the IE will be refused. It does not state whether a rejected IE aborts the whole update or whether permission scopes are required, which is the remaining gap.

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?

The action and resource are front-loaded in the first clause, then conditions follow in decreasing importance. The single dense sentence is efficient, though the parenthetical return-value and warning material packed at the end could be split into its own sentence for readability.

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 an eight-parameter mutation tool with no output schema, the description covers what gets written, the conditional IE fallback, and what the response contains (settings, missing items, registrationWarning). It leaves out failure modes other than the IE warning — such as invalid company_id or missing fiscal prerequisites — which keeps it just short of complete.

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

Parameters3/5

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

With 100% schema description coverage the schema already documents all eight parameters, so the baseline is a 3. The description does add meaning the schema only hints at — the IE fallback rule when state_registration is omitted and the override-only semantics of crt — but it says nothing extra about default_csosn, default_nat_op, or default_origin.

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?

The description opens with a specific verb and resource pair ('Set the NF-e and NFC-e settings of a company') and immediately scopes the two setting families it controls (state registration plus series defaults). The verb 'Set' cleanly separates it from the read counterpart nfe_settings_get without needing to name it.

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 explicit conditional guidance for the trickiest parameter: include state_registration to validate an IE for the company's state, or omit it to inherit the single IE SEFAZ holds for the CNPJ, and send crt only to override the company's regime. It stops short of naming alternatives or exclusions (e.g. directing tax-regime changes to company_update instead), so it is strong context rather than full routing guidance.

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