Skip to main content
Glama
leorochasf

cnpj-mcp

by leorochasf

buscar_empresa_por_nome

Find Brazilian companies by corporate or trade name using prefix, exact, or contains matching; returns CNPJ, status, municipality, legal nature, size, and capital.

Instructions

Procura empresas pela razão social (modo contem também procura no nome fantasia da matriz). Devolve CNPJ da matriz, situação, município, natureza jurídica, porte e capital. Modos: prefixo (padrão, rápido), exato e contem. Evite contem: lê ~1 GB na primeira vez da sessão (cerca de 1 min pela internet); use-o só quando o começo do nome não for conhecido.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNo
modoNo
textoYesRazão social ou trecho dela
limiteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it lists returned fields (CNPJ, situação, município, natureza jurídica, porte, capital) and warns that 'contem' reads ~1 GB on first use in a session, taking about 1 minute over the internet. It does not mention pagination, rate limits, or auth, but the performance warning is unusually valuable.

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

Conciseness5/5

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

The description is front-loaded with purpose, then return fields, then modes, then the critical 'contem' warning. Every sentence earns its place, and the structure mirrors the agent's decision order without any redundancy.

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?

Given no annotations, no output schema, and low schema coverage, the description is quite complete: it covers purpose, return values, mode behavior, default, and a key performance caveat. The main gap is the absence of any mention of 'uf' and 'limite', which leaves optional filtering and result-count behavior entirely to the schema.

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 description coverage is low (25%), so the description must compensate. It explains the 'texto' meaning (razão social or trecho) and fully details the 'modo' enum values, default, and trade-offs, but it completely omits the optional 'uf' and 'limite' parameters, leaving half the schema without added meaning.

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 states a specific verb (Procura) and resource (empresas) qualified by 'pela razão social', making the tool's purpose immediately clear. It also distinguishes the 'contem' mode's broader scope (including trade name of the headquarters), which helps separate it from a generic filter search.

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 strong guidance for mode selection: 'prefixo' is default and fast, 'exato' exists, and 'contem' should be avoided unless the beginning of the name is unknown, with a concrete performance cost. However, it gives no guidance on when to use this tool versus siblings like buscar_empresas_por_filtro or consultar_cnpj, leaving tool-level selection implied.

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