Skip to main content
Glama

Consultar cliente/destinatario por CNPJ, CPF, IE ou nome

cliente_consultar
Read-onlyIdempotent

Pesquisa unificada de cliente/fornecedor. Tenta primeiro o cadastro local da empresa logada e, se nao achar e o termo for um CNPJ valido, consulta a BrasilAPI (Receita Federal) - razao social, endereco, situacao cadastral. E a tool CORRETA pra saber se um CNPJ esta ativo e pegar seus dados (razao social, endereco) - nao confunda com cadastro_consultar, que so traz Inscricao Estadual (IE) da SEFAZ. Use ANTES de pedir CNPJ ao usuario; geralmente o usuario informa nome ou apelido (ex: 'TNT', 'Correios'). Obs: consulta na Receita so funciona por CNPJ - CPF nao tem base publica. Para obter a Inscricao Estadual (operacao com ICMS), use cadastro_consultar. PAGINACAO: Limite default 10 (max 50). Use Offset pra ir alem - o retorno traz TotalGeral. Se TotalGeral > matches retornados, peça mais paginas em vez de inventar/agrupar.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
UfNo
TermoNo
FontesNo
LimiteNo
OffsetNo
TipoBuscaNo
IncluirInativasNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
AvisosNo
LimiteNo
OffsetNo
MatchesNo
TotalGeralNo
TotalLocalNo
TipoDetectadoNo
TermoNormalizadoNo
ConsultouBrasilApiNo

TDQS

A4.5/5.0
Behavior5/5

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

Disclosures beyond annotations: explains search order (local then BrasilAPI), that CPF has no public base, and pagination details (return includes TotalGeral). Annotations already indicate read-only, open-world, idempotent; description adds valuable context without contradiction.

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?

Description is informative but somewhat lengthy; includes essential details and front-loads the main purpose. Slightly verbose but maintains clarity.

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?

Covers key aspects: search logic, pagination, and tool distinction. Output schema exists so return values are not needed. Sufficient for an AI agent to use correctly, though could explicitly mention that local search may work for CPF.

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?

Input schema has 7 parameters with 0% description coverage. Description adds meaning for 'Termo' (search term), 'Limite' (default 10, max 50), and 'Offset', but omits 'Fontes', 'TipoBusca', 'IncluirInativas', and 'Uf'. Partial coverage; could be more thorough.

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 it performs a unified search for client/supplier, first checking local database then BrasilAPI for CNPJ. It distinguishes from sibling 'cadastro_consultar' which only retrieves IE, making the purpose specific and unambiguous.

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?

Explicitly advises when to use (to check CNPJ status and get data), when not to confuse with cadastro_consultar, and provides pagination instructions (default limit 10, max 50, use offset). Also recommends using before asking user for CNPJ.

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.

TDQS

A3.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, with thorough descriptions that clarify overlaps (e.g., cliente_consultar vs cadastro_consultar). Even similar operations like arquivo_baixar variants have explicit scope differences.

Naming Consistency4/5

Most tools follow a noun_verb pattern (e.g., cliente_consultar, evento_cancelar, produto_criar), but a few deviate (e.g., 'health', 'cte_desacordo'). Overall consistent enough for easy recognition.

Tool Count4/5

34 tools is high but justified given the complexity of fiscal document management across multiple document types (NF-e, NFS-e, CT-e, MDF-e, etc.) and required CRUD, events, and auxiliary operations.

Completeness4/5

The tool set covers create/read/update/delete for clients, products, and tax rules, plus emission, cancellation, correction, and status checks for various documents. Minor gaps like dedicated NFS-e cancellation are handled by generic event tools.