Skip to main content
Glama

Buscar empresas com regras verificadas

find_companies_with_rules

Find companies that meet very specific rules, checked one by one with evidence: e.g. "revendas de peças agrícolas no RS" (source: web search "revenda de peças agrícolas" in RS cities, or the Receita by CNAE 4661300; rules: "vende peças agrícolas, não só máquinas", "é revenda, não fabricante"). Each company's own site (or a web search on it) is read and every rule is judged as met, not met or no evidence. Every verified row costs 2 credits, passed or not; a sample is 20 rows by default (30 at most). Returns the funnel (verified, passed, which rule removed the most, credits per company that passed), the companies that passed with each rule's reason and evidence, and a new company sheet with every row and verdict. Sources: the Receita (registry) for an activity the CNAE names; Google Maps (maps: query and cities with the state) for local and small businesses, shops, clinics, resellers; the web when the trait is how the company describes itself; a company sheet the user already has. Manufacturers or brand owners of a kind of product ("fabricantes de bebidas, cosméticos, pet food") come from the Receita by the manufacturing CNAEs; a web search for them returns articles, associations and fairs about the theme. A rule about the CNAE or the Receita is checked against the company's registration, found from its CNPJ, site or exact name. Each rule is one short sentence, 300 characters at most, with one condition. Rules filter: a company missing one is out. A hot signal that makes a company better but not wrong (a recent launch, an ESG or recycling initiative, a hiring, growth) belongs in rankBy, not in rules: it orders the companies that passed, in the same read, at no extra cost. Not meant for a list the user already gave when nothing in it is to be filtered out ("nenhum critério é eliminatório", enrich, score or fill a table about each company). A rule about running ads (on Meta or Google), the Google rating, the Reclame Aqui reputation, site traffic or having an app is checked against that source itself (the ad libraries, Maps, the Reclame Aqui record, a traffic estimate, the app stores). Only companies that passed are listed as passed; rows that did not pass are not padded in. The companies are saved in one new sheet, each as a company without a person yet.

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": {
      "source": "<source>",
      "rules": "<rules>"
    },
    "name": "find_companies_with_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
rulesYesOne to three rules each company must meet, in plain words, e.g. "vende peças agrícolas no site".
rankByNoUp to three signals that order the companies that passed and never remove one, e.g. "lançou produto nos últimos 6 meses", "tem iniciativa de reciclagem ou ESG". Checked in the same read, at no extra cost.
sampleNoRows to verify (default 20, at most 30).
sourceYes
excludeNamesNoNames of companies already delivered that must not come again (with excludeDomains, for those without a site).
excludeDomainsNoDomains of companies already delivered that must not come again.
excludeSheetIdsNoSheets whose companies must not come again, e.g. the sheet an earlier find_companies_with_rules saved (its sheetId), so a search for others never repeats them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / excludeDomains
      Added value: +{
      +  "description": "Domains of companies already delivered that must not come again.",
      +  "items": {
      +    "maxLength": 253,
      +    "minLength": 3,
      +    "type": "string"
      +  },
      +  "maxItems": 200,
      +  "type": "array"
      +}
    • addedInput schema / properties / excludeNames
      Added value: +{
      +  "description": "Names of companies already delivered that must not come again (with excludeDomains, for those without a site).",
      +  "items": {
      +    "maxLength": 200,
      +    "minLength": 2,
      +    "type": "string"
      +  },
      +  "maxItems": 200,
      +  "type": "array"
      +}
    • addedInput schema / properties / excludeSheetIds
      Added value: +{
      +  "description": "Sheets whose companies must not come again, e.g. the sheet an earlier find_companies_with_rules saved (its sheetId), so a search for others never repeats them.",
      +  "items": {
      +    "format": "uuid",
      +    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +    "type": "string"
      +  },
      +  "maxItems": 5,
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / source / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "city": {
      -        "maxLength": 80,
      -        "minLength": 2,
      -        "type": "string"
      -      },
      -      "cnaes": {
      -        "description": "CNAE codes, digits only (e.g. 4661300).",
      -        "items": {
      -          "pattern": "^\\d{4,7}$",
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "type": "array"
      -      },
      -      "keywords": {
      -        "description": "Words of the activity when no CNAE is known.",
      -        "items": {
      -          "maxLength": 80,
      -          "minLength": 2,
      -          "type": "string"
      -        },
      -        "maxItems": 5,
      -        "type": "array"
      -      },
      -      "kind": {
      -        "const": "registry",
      -        "type": "string"
      -      },
      -      "schoolEnrollmentMax": {
      -        "description": "Schools with at most this many students.",
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "schoolEnrollmentMin": {
      -        "description": "Schools with at least this many students, e.g. 300 for \"mais de 300 alunos\".",
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "schoolNetworks": {
      -        "description": "Schools in activity of the Censo Escolar (INEP) of these networks, e.g. [\"privada\"]. Only when the companies sought are schools.",
      -        "items": {
      -          "enum": [
      -            "privada",
      -            "municipal",
      -            "estadual",
      -            "federal"
      -          ],
      -          "type": "string"
      -        },
      -        "maxItems": 4,
      -        "type": "array"
      -      },
      -      "schoolStages": {
      -        "description": "Schools offering any of these stages, e.g. [\"medio\"].",
      -        "items": {
      -          "enum": [
      -            "creche",
      -            "pre_escola",
      -            "fundamental_iniciais",
      -            "fundamental_finais",
      -            "medio",
      -            "profissional",
      -            "eja",
      -            "especial"
      -          ],
      -          "type": "string"
      -        },
      -        "maxItems": 8,
      -        "type": "array"
      -      },
      -      "sizes": {
      -        "description": "Headcount ranges as \"min,max\".",
      -        "items": {
      -          "type": "string"
      -        },
      -        "maxItems": 6,
      -        "type": "array"
      -      },
      -      "state": {
      -        "description": "Two-letter state, e.g. RS.",
      -        "maxLength": 2,
      -        "minLength": 2,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "kind": {
      -        "const": "web",
      -        "type": "string"
      -      },
      -      "places": {
      -        "description": "Cities or states, each searched on its own.",
      -        "items": {
      -          "maxLength": 80,
      -          "minLength": 2,
      -          "type": "string"
      -        },
      -        "maxItems": 5,
      -        "type": "array"
      -      },
      -      "query": {
      -        "description": "What the companies would write about themselves, e.g. \"revenda de peças agrícolas\".",
      -        "maxLength": 200,
      -        "minLength": 3,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "query"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "kind": {
      -        "const": "maps",
      -        "type": "string"
      -      },
      -      "places": {
      -        "description": "Cities (with the state), each searched on its own, e.g. \"Passo Fundo, RS\".",
      -        "items": {
      -          "maxLength": 80,
      -          "minLength": 2,
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "query": {
      -        "description": "What the place is, as people search it on Google Maps, e.g. \"revenda de peças agrícolas\".",
      -        "maxLength": 200,
      -        "minLength": 3,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "query",
      -      "places"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "kind": {
      -        "const": "sheet",
      -        "type": "string"
      -      },
      -      "sheetId": {
      -        "description": "A company sheet of the workspace.",
      -        "format": "uuid",
      -        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "sheetId"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "city": {
      +        "maxLength": 80,
      +        "minLength": 2,
      +        "type": "string"
      +      },
      +      "cnaes": {
      +        "description": "CNAE codes, digits only (e.g. 4661300).",
      +        "items": {
      +          "pattern": "^\\d{4,7}$",
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "type": "array"
      +      },
      +      "keywords": {
      +        "description": "Words of the activity when no CNAE is known.",
      +        "items": {
      +          "maxLength": 80,
      +          "minLength": 2,
      +          "type": "string"
      +        },
      +        "maxItems": 5,
      +        "type": "array"
      +      },
      +      "kind": {
      +        "const": "registry",
      +        "type": "string"
      +      },
      +      "schoolEnrollmentMax": {
      +        "description": "Schools with at most this many students.",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "schoolEnrollmentMin": {
      +        "description": "Schools with at least this many students, e.g. 300 for \"mais de 300 alunos\".",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "schoolNetworks": {
      +        "description": "Schools in activity of the Censo Escolar (INEP) of these networks, e.g. [\"privada\"]. Only when the companies sought are schools.",
      +        "items": {
      +          "enum": [
      +            "privada",
      +            "municipal",
      +            "estadual",
      +            "federal"
      +          ],
      +          "type": "string"
      +        },
      +        "maxItems": 4,
      +        "type": "array"
      +      },
      +      "schoolStages": {
      +        "description": "Schools offering any of these stages, e.g. [\"medio\"].",
      +        "items": {
      +          "enum": [
      +            "creche",
      +            "pre_escola",
      +            "fundamental_iniciais",
      +            "fundamental_finais",
      +            "medio",
      +            "profissional",
      +            "eja",
      +            "especial"
      +          ],
      +          "type": "string"
      +        },
      +        "maxItems": 8,
      +        "type": "array"
      +      },
      +      "sizes": {
      +        "description": "Headcount ranges as \"min,max\".",
      +        "items": {
      +          "type": "string"
      +        },
      +        "maxItems": 6,
      +        "type": "array"
      +      },
      +      "state": {
      +        "description": "Two-letter state, e.g. RS.",
      +        "maxLength": 2,
      +        "minLength": 2,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "web",
      +        "type": "string"
      +      },
      +      "places": {
      +        "description": "Cities or states, each searched on its own.",
      +        "items": {
      +          "maxLength": 80,
      +          "minLength": 2,
      +          "type": "string"
      +        },
      +        "maxItems": 5,
      +        "type": "array"
      +      },
      +      "query": {
      +        "description": "What the companies would write about themselves, e.g. \"revenda de peças agrícolas\".",
      +        "maxLength": 200,
      +        "minLength": 3,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "query"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "maps",
      +        "type": "string"
      +      },
      +      "places": {
      +        "description": "Cities (with the state), each searched on its own, e.g. \"Passo Fundo, RS\".",
      +        "items": {
      +          "maxLength": 80,
      +          "minLength": 2,
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "query": {
      +        "description": "What the place is, as people search it on Google Maps, e.g. \"revenda de peças agrícolas\".",
      +        "maxLength": 200,
      +        "minLength": 3,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "query",
      +      "places"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "sheet",
      +        "type": "string"
      +      },
      +      "sheetId": {
      +        "description": "A company sheet of the workspace.",
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "sheetId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "categories": {
      +        "description": "consultor: consultoria de valores mobiliários (investment advisers); gestor: gestora de carteira or de recursos (asset managers); administrador: administradora fiduciária. Default: all three.",
      +        "items": {
      +          "enum": [
      +            "consultor",
      +            "gestor",
      +            "administrador"
      +          ],
      +          "type": "string"
      +        },
      +        "maxItems": 3,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "city": {
      +        "maxLength": 80,
      +        "minLength": 2,
      +        "type": "string"
      +      },
      +      "kind": {
      +        "const": "cvm",
      +        "type": "string"
      +      },
      +      "nameWords": {
      +        "description": "Words the company's name must have, any of them, e.g. [\"family office\"]. Only when asked.",
      +        "items": {
      +          "maxLength": 40,
      +          "minLength": 2,
      +          "type": "string"
      +        },
      +        "maxItems": 5,
      +        "type": "array"
      +      },
      +      "state": {
      +        "description": "Two-letter state, e.g. SP.",
      +        "maxLength": 2,
      +        "minLength": 2,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true; the description adds the crucial economics (2 credits per verified row, passed or not) and sampling bounds (20 by default, 30 max). It also discloses the side effect implied by readOnlyHint=false — a new company sheet is created with every row and verdict — plus the exact return shape (funnel, passed companies with reasons/evidence, which rule removed the most).

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?

Purpose and the rules-vs-rankBy distinction are front-loaded, and nearly every sentence carries decision-relevant information. The single dense paragraph mixes cost, source selection, rule authoring and return format, and a few clauses are redundant or awkwardly phrased ('only companies that passed are listed as passed; rows that did not pass are not padded in'), so some tightening is possible.

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?

Despite no output schema and a five-variant source union, the description covers the return payload, the credit cost, the sampling default, the save-to-sheet side effect, and the rule-authoring constraint an agent must respect to get useful results. Nothing an agent needs in order to call this 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?

At 86% schema coverage the schema already documents most fields, yet the description adds real meaning: rules must be one short sentence with a single condition (a company failing one is out), rankBy orders without removing and costs nothing, and source choice is tied to the type of trait being verified. It does not explain excludeNames/excludeDomains/excludeSheetIds, so the added value is broad but not complete.

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 uses a specific verb and resource — finds companies that meet rules, each rule judged one by one with evidence — and immediately shows what that means with a concrete example (agrícola parts resellers in RS). It draws a sharp line between eliminatory 'rules' and non-eliminatory 'rankBy', which is exactly the distinction that separates it from signal/ranking siblings such as find_companies_with_signal.

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?

It says when each source applies (registry for CNAE-named activities and manufacturers, Maps for local/small businesses, web for self-description traits, an existing sheet, CVM for advisors/managers) and which source cannot serve a given trait (a web search for manufacturers 'returns articles, associations and fairs'). It also states explicit exclusions — not for a list the user already gave when 'nenhum critério é eliminatório', and not for enrich/score/fill-a-table tasks — and routes non-eliminatory traits to rankBy.

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.