Skip to main content
Glama

bulk_lookup_cnpj

Cria um lote assíncrono de até 10.000 CNPJs na CPFHub.io, como POST /cnpj/bulk, e devolve o jobId na hora. CNPJs inválidos e repetidos são descartados. Reserva no envio os créditos do lote inteiro e cobra só os CNPJs encontrados. Com a fila de lotes ligada, o envio não conta no limite por minuto: vale o limite de lotes pendentes por cliente (429, retry_after 60); sem a fila, cada envio conta como 1 requisição no limite por minuto. Acompanhe com get_bulk_job (type cnpj). Requer autenticação via API key.

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": {
      "cnpjs": "<cnpjs>"
    },
    "name": "bulk_lookup_cnpj"
  }
}

Input Schema

NameRequiredDescriptionDefault
cnpjsYesLista de CNPJs, com ou sem formatação
api_keyNoSua API key da CPFHub.io (opcional se já enviada no header x-api-key da conexão)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: invalid and duplicate CNPJs are discarded, credits for the whole batch are reserved at submission but only found CNPJs are charged, and the rate-limit behavior is spelled out for both queue modes including the 429 and retry_after 60. It also specifies API key authentication, which is essential for a credentialed write-like operation.

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?

Information is front-loaded: what it does and the jobId return come first, followed by credit and rate-limit behavior, then the tracking hint and auth requirement. It is dense but nearly every clause adds operational value; the billing and queue details could be tightened slightly.

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?

For a tool with no annotations and no output schema, the description covers the return value (jobId), the follow-up tool, billing implications, rate limits, and auth. Nothing an agent needs in order to invoke it correctly appears to be 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?

Schema coverage is 100%, so both parameters are already documented, but the description adds real meaning not present in the schema: the 10,000-item cap on the cnpjs array and the fact that invalid and duplicate entries are dropped rather than rejected. That is useful semantics beyond the structured fields.

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?

States a specific verb and resource: creates an asynchronous batch of up to 10,000 CNPJs and returns a jobId immediately, and it maps to the POST /cnpj/bulk endpoint. This clearly distinguishes it from the single-record lookup_cnpj and from the CPF sibling bulk_lookup_cpf.

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?

Names get_bulk_job (type cnpj) as the follow-up mechanism and explains the queue-enabled vs. queue-disabled trade-off, so the agent knows when it is appropriate instead of a synchronous lookup. It does not explicitly say to use lookup_cnpj for a single CNPJ, but the 'batch' framing and the tracking sibling provide adequate context for routing.

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