Skip to main content
Glama

get_bulk_job

Consulta o status e os resultados de um lote criado por bulk_lookup_cpf ou bulk_lookup_cnpj, com os mesmos dados de GET /cpf/bulk/{jobId} e GET /cnpj/bulk/{jobId} (lista em cpfs ou cnpjs). Os resultados vêm em páginas de até 100 itens (padrão 50): pagination.next_offset traz o offset da próxima página e vem null quando não há mais resultados gravados. Chame de novo enquanto status for processing; nesse meio-tempo a lista é só uma prévia do que já foi gravado e uma página pode pular ou repetir um item. Com status done ou failed, leia as páginas a partir do offset 0 para ter a lista completa. Não consome créditos. 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": {
      "type": "<type>",
      "job_id": "<job_id>"
    },
    "name": "get_bulk_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesTipo do lote: cpf (bulk_lookup_cpf) ou cnpj (bulk_lookup_cnpj)
limitNoResultados por página, de 1 a 100 (padrão 50)
job_idYesO jobId devolvido na criação do lote
offsetNoQuantos resultados pular (padrão 0); use o pagination.next_offset da página anterior
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.8/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 burden and does so: cost behavior ("Não consome créditos"), auth requirement, page size and default (max 100, default 50), termination signal (pagination.next_offset null), and an eventual-consistency caveat that a page may skip or duplicate results. This is behavior an agent could not infer from structured fields.

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?

Front-loads what is returned, then paging, then the status-driven call pattern, then cost/auth. Dense and mostly earning its place, with minor overlap between the paging sentence and the schema's offset description.

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?

There is no output schema, yet the description explains the shape of the result (lista em cpfs ou cnpjs), the paging envelope (pagination.next_offset), and the status field driving the call loop. Combined with the fully documented 5-parameter schema, nothing needed to invoke it correctly is 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 the baseline would be 3; however the description adds operational meaning to the paging parameters by tying offset to pagination.next_offset and prescribing a restart at offset 0 once the job is done. It also clarifies that job_id must be the one returned at creation.

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?

It states a specific verb and resource ("Consulta o status e os resultados de um lote") and names the exact sibling tools that create the batch (bulk_lookup_cpf, bulk_lookup_cnpj), plus the REST endpoints it mirrors. An agent can distinguish it from the lookup_* and bulk_lookup_* tools without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit call loop ("Chame de novo enquanto status for processing"), explains what to do in each terminal state ("Com status done ou failed, leia as páginas a partir do offset 0"), and warns that mid-processing pages are only a preview that may skip or repeat items. Prerequisites (API key) are stated too.

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