Skip to main content
Glama

Checar CNPJs em lote

consulta_lote
Idempotent

Supplier screening report with source dates, evidence and federal tax debt states, one row per CNPJ. The service validates and deduplicates the list, joins the prepared records and formats the report. No per-company response parsing or spreadsheet assembly is needed for this screening. MCP returns JSON. For a CSV file, download POST /api/consulta/lote?formato=csv through HTTP. Read fontes and evidencias per row, including PGFN debt states and truncation flags. CNIA is stored by default; cnia_atual=true requires a source check for at most four distinct numeric CNPJs. A required failure refuses the group without charging. Sources keep their own dates; missing metadata cannot support a clean conclusion.

Input Schema

NameRequiredDescriptionDefault
cnpjsYesThe CNPJs, with or without punctuation (numeric or alphanumeric), up to 200 valid ones per request.
cnia_atualNoRequire a CNIA source check during this request. At most 4 distinct numeric CNPJs in this mode. If any required check fails, return 503 without charging the group or using stored CNIA. Without this requirement, use stored CNIA. Other sources keep their own reference dates.
credit_tokenNoPrepaid credit token (`cred_…`) with the lookup balance.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / cnia_atual
      Added value: +{
      +  "default": false,
      +  "description": "Require a CNIA source check during this request. At most 4 distinct numeric CNPJs in this mode. If any required check fails, return 503 without charging the group or using stored CNIA. Without this requirement, use stored CNIA. Other sources keep their own reference dates.",
      +  "type": "boolean"
      +}
  2. Added
  3. Removed
  4. Changed1 schema field changed
    • removedInput schema / properties / credit_token
      Removed value: -{
      -  "description": "Token do crédito pré-pago (cred_…) com o saldo",
      -  "type": "string"
      -}
  5. Added

TDQS

A3.8/5.0
Behavior5/5

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

Rich disclosure beyond the annotations: credit consumption ('without charging the group'), 503 failure semantics for required source checks, default stored-CNIA vs live-check behavior, deduplication and validation done server-side, and truncation flags. Annotations only say readOnlyHint=false / idempotent=true; the description supplies the cost and failure contract the agent actually needs.

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

Conciseness3/5

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

Seven sentences with the key payload (one row per CNPJ, JSON vs CSV) reasonably front-loaded, but there is redundancy — the cnia_atual rule is largely repeated from the schema — plus stray phrasing ('missing metadata cannot support a clean conclusion') and mixed English prose with Portuguese field names that loosens precision.

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?

No output schema exists, and the description does name the key returned material (per-row fontes, evidencias, PGFN debt states, source dates, truncation flags) and the one-row-per-CNPJ shape, so an agent can reason about results. It stops short of describing the top-level envelope or error payload, but the substantive gaps are small.

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?

Schema coverage is 100%, so the baseline is 3. The description does add output-oriented meaning ('read fontes and evidencias per row') and restates the cnia_atual live-check cap, but it also conflicts with the schema: schema maxItems is 100, while the text says 'up to 200 valid ones per request', which can mislead on the actual batch ceiling.

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?

Concrete verb+resource: it produces a supplier screening report with one row per CNPJ, and it states what the service does internally (validates, deduplicates, joins, formats). It implicitly distinguishes batch from single-company lookups ('no per-company response parsing'), but never names a sibling tool such as consulta_cnpj or dossier_cnpj, so the differentiation is left implicit.

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?

It gives an internal alternative route (use POST /api/consulta/lote?formato=csv over HTTP for CSV instead of the MCP JSON response), which is genuine routing guidance. But it never says when to use this batch tool instead of the obvious single-CNPJ siblings, nor any prerequisite beyond the cnia_atual constraint.

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.