Skip to main content
Glama
nikolasdehor

mcp-fiscal-brasil

by nikolasdehor

validar_chave_nfe

Validate the format and check digit of an NFe access key using modulo 11 calculation. Extract UF, issue date, CNPJ, and invoice number from the key.

Instructions

Valida o formato e o dígito verificador de uma chave de acesso de NFe. Não consulta APIs - apenas verifica o cálculo matemático (módulo 11). Também extrai informações da chave: UF, data de emissão, CNPJ emitente e número da nota.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chave_acessoYesChave de acesso com 44 digitos (aceita com ou sem espacos).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full burden and does an excellent job. It clearly states the tool performs only mathematical validation (modulo 11) without making API calls, and describes what information is extracted. No side effects or security concerns exist, and the behavior is fully disclosed.

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

Conciseness5/5

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

The description is two sentences: the first states the core function, and the second adds clarifying details (no APIs, extraction). Every word serves a purpose. There is no redundancy or unnecessary content. The most critical information (what it does, how it works) is front-loaded.

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?

Given the tool's simplicity (one input, no required authentication, no side effects), the description is complete. It explains the validation algorithm (modulo 11), the offline nature, and the extracted details. An output schema exists, so return values do not need to be described. No important aspects are 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?

The schema already describes the parameter format ('44 dígitos, aceita com ou sem espaços'), which covers 100% of the parameter. The description adds value beyond the schema by stating that the tool extracts additional information (UF, date, CNPJ, invoice number) from the key, giving the user a fuller understanding of what the tool does with the input.

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 clearly states the tool validates the format and check digit of an NFe access key using modulo 11, and also extracts key information (UF, date, CNPJ, invoice number). It explicitly says it does not consult APIs, distinguishing it from siblings like consultar_nfe. The verb 'valida' and specific resource 'chave de acesso de NFe' leave no ambiguity.

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?

The description explicitly says 'Não consulta APIs' (does not consult APIs), indicating when to use this offline mathematical validation. It implies that for live verification against SEFAZ, alternative tools like consultar_nfe should be used. However, it does not provide explicit exclusion criteria or name specific alternatives, leaving some ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikolasdehor/mcp-fiscal-brasil'

If you have feedback or need assistance with the MCP directory API, please join our Discord server