Skip to main content
Glama
leorochasf

cnpj-mcp

by leorochasf

rede_societaria

Map corporate ownership networks from a CNPJ or a person's name and CPF, tracing companies, partners, and linked firms up to a chosen depth.

Instructions

Monta o grafo de vínculos societários a partir de uma empresa (cnpj) ou de uma pessoa (nome + cpf): empresas, sócios, empresas desses sócios, e assim por diante até a profundidade pedida. Sócios pessoa física são identificados por nome + CPF mascarado.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cpfNoCPF da pessoa de partida (recomendado para evitar homônimos)
cnpjNoCNPJ de partida
nomeNoNome exato da pessoa de partida
max_nosNoTeto de nós no grafo (padrão 150)
profundidadeNoSaltos a partir da origem (padrão 2)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the recursive traversal behavior and the privacy-relevant detail that individuals are keyed by name + masked CPF. It stays silent on permissions, rate/cost limits, and whether the graph generation is bounded in runtime — a meaningful gap for a potentially large recursive query.

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?

Two sentences, no waste, and the core capability plus its recursion is front-loaded before the identification detail. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description should carry more of the return/payload story. It describes the graph's composition but not its shape, size limits at the payload level, or behavior on ambiguous names, leaving gaps for an agent that must reason about results.

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 100%, so the schema already documents cpf, cnpj, nome, max_nos (cap, default 150) and profundidade (1-3, default 2). The description adds no format or syntax detail beyond what the schema states, which is the expected baseline when the schema does the heavy lifting.

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?

States a specific verb and resource: it builds ('Monta') the corporate-link graph ('grafo de vínculos societários'), and spells out the traversal semantics — companies, partners, partners' companies, recursively to the requested depth. This recursive scope implicitly distinguishes it from single-hop siblings like empresas_do_socio or socios_em_comum, though no sibling is named explicitly.

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?

The description tells the agent the two valid entry modes (company via cnpj, person via nome + cpf) and notes cpf is recommended to disambiguate homônimos. It does not, however, say when to prefer this tool over the several graph-adjacent siblings, nor any exclusions or prerequisites.

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