Skip to main content
Glama

Consultar cadastro de contribuinte (consultaCadastro)

bpe_consultar_cadastro

Queries ICMS taxpayer registration data by UF, CPF/CNPJ, or IE through the NF-e Web Service for validation or diagnostics outside the normal invoice issuance flow.

Instructions

Consulta o cadastro de contribuintes do ICMS da UF (Web Service da NF-e). Não use no fluxo normal de emissão.

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": {
      "uf": "<uf>"
    },
    "name": "bpe_consultar_cadastro"
  }
}

Input Schema

NameRequiredDescriptionDefault
IENo
ufYes
CPFNo
urlNoURL do CadConsultaCadastro4 da UF
CNPJNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden and does not meet it. It discloses that this hits a SEFAZ Web Service, implying a network call and per-UF endpoint availability, but says nothing about certificate/authentication requirements, throttling, or what happens on failure — all material for a remote government lookup.

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?

Two tight sentences, front-loaded with the resource and ending on the exclusion; nothing is padded. It is arguably too terse rather than too long, but there is no wasted wording to cut.

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

Completeness2/5

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

A five-parameter, unannotated tool with no output schema and no auth or identifier-combination guidance is under-described for the complexity involved. An agent knows roughly what the tool is for but not how to construct a valid, successful call.

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

Parameters2/5

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

Schema description coverage is only 20%: only the url parameter is documented in the schema. The description adds no meaning to uf, IE, CPF, or CNPJ, and critically never states the likely constraint that at least one of IE/CPF/CNPJ must accompany the UF — an agent could call it with only uf and receive an error.

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 concrete verb and resource: queries the ICMS taxpayer registry of a UF via the NF-e Web Service. That is specific enough to separate it from the emission-flow siblings such as bpe_autorizar, though it never names an alternative directly.

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?

"Não use no fluxo normal de emissão" is a genuine when-not exclusion, which is more than most definitions offer. However, there is no positive guidance on when the out-of-band lookup is appropriate (e.g., validating a counterparty before issuing) and no alternative is named.

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