Skip to main content
Glama

Brazil CNPJ company registry

search_companies

Find companies/establishments matching filters. Filters (all optional, combined with AND): cnae (CNAE code or prefix, e.g. '4711' or '47', list ok; add include_secondary to also match secondary activities), cnae_secao (letter A-U), uf, municipio (name as in Receita, accents ignored), municipio_codigo, situacao (ativa, baixada, suspensa, inapta, nula), matriz_only, porte (micro = ME, pequeno = EPP, demais, nao_informado), natureza_juridica (code prefix like '2062' or text like 'sociedade limitada'), capital_min/capital_max (BRL), opened_from/opened_to (data_inicio_atividade, YYYY-MM or YYYY-MM-DD), closed_from/closed_to (data da baixa), mei, simples (true/false), name_contains (razao social or nome fantasia; 3-256 characters and uf required), cep, partner_name (a partner's name contains this text). Returns up to 100 rows per page, ordered by opening date (newest first) unless order_by is capital_social or razao_social. Use count_companies for 'how many' questions. Set include_contacts to add email, phones, full address and a registry_contact_quality block (0-100 score of how likely the REGISTERED email/phone from Receita is a real direct contact, with the signals behind it; it says nothing about the website) and, when the company's own website was crawled, a separate website_contacts block (WhatsApp, phones, emails, social profiles found on its public pages, each with source_url). A whatsapp_business block appears only when a WhatsApp Business account was found on one of the registered phones (display name, account type, name_match score, checked_at); phones are checked in the background after a query shows them, so a result can appear on a later call, and its absence says nothing about whether the number is on WhatsApp. min_contact_score keeps only companies whose REGISTERED contact (the email and phones on the Receita record, not the website) scores at or above it. Pass an integer 0-100, or a tier name: 'high' = 85, 'medium' = 50, 'low' = 0 (e.g. min_contact_score=50 or 'medium' for medium and high). The filter is applied after the page is read, so a call scans at most 2000 candidates and returns pagination.next_offset to continue.

Input Schema

NameRequiredDescriptionDefault
ufNo
cepNo
meiNo
cnaeNo
limitNo
porteNo
offsetNo
simplesNo
order_byNodata_inicio_atividade
situacaoNo
closed_toNo
municipioNo
opened_toNo
cnae_secaoNo
capital_maxNo
capital_minNo
closed_fromNo
matriz_onlyNo
opened_fromNo
partner_nameNo
name_containsNo
include_contactsNo
municipio_codigoNo
include_secondaryNo
min_contact_scoreNo
natureza_juridicaNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / min_contact_score / anyOf
      Previous value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "items": {
      -        "additionalProperties": true,
      -        "type": "object"
      -      },
      -      "title": "Result",
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "search_companiesOutput",
      -  "type": "object"
      -}New value: +null
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations present the description carries the full burden, and it does so unusually well: it discloses background phone checking ('a result can appear on a later call, and its absence says nothing'), the 2000-candidate scan cap, post-page filtering of min_contact_score, default ordering, and the exact conditions under which whatsapp_business and website_contacts blocks appear. These are non-obvious behaviors an agent could not infer.

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?

The text is long but nearly every clause earns its place given zero schema coverage and 26 parameters, and it is front-loaded with the filter contract before the return/behavior detail. It would benefit from list formatting and has minor redundancy (the contact-score explanation is restated twice), keeping it short of a 5.

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 26-parameter search tool with no annotations and no output schema, the description covers return shape (100 rows/page, ordering), pagination continuation via next_offset, the optional contacts/whatsapp blocks, and the post-filter caveat. Nothing an agent needs in order to call 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.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there are 26 parameters, so the description must compensate, which it largely does: it documents value formats and semantics for cnae/cnae_secao, uf, municipio, municipio_codigo, situacao (with enum values), porte, natureza_juridica, capital bounds, date windows, mei, simples, name_contains, cep, partner_name, include_secondary, include_contacts, and min_contact_score (including the integer/tier duality). Only limit/offset defaults and the full order_by option set are left to the bare schema.

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 ('Find companies/establishments matching filters') and explicitly distinguishes itself from one sibling by routing 'how many' questions to count_companies. It does not, however, differentiate itself from search_partners or get_company, so the differentiation is incomplete for a family of eight tools.

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?

Provides clear conditional guidance ('Use count_companies for how many questions'), tells the agent that all filters are optional and ANDed, and explains when include_contacts vs min_contact_score apply. It never states when NOT to use this tool versus siblings like get_company or search_partners.

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.