Skip to main content
Glama

Find similar companies

find_similar_companies
Read-onlyIdempotent

Active companies matching the main activity, state and size declared in the reference record. Matches the main CNAE, state and size when declared. Returns headquarters and excludes the reference company and its branches. It does not establish commercial competition or equivalent capacity. Uses search pagination; personal data stays masked.

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": {
      "cnpj": "<cnpj>"
    },
    "name": "find_similar_companies"
  }
}

Input Schema

NameRequiredDescriptionDefault
cnpjYesValid numeric or alphanumeric CNPJ.
pageNoSearch page, starting at zero.
pageSizeNoPage size following the /api/busca contract.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / cnpj / description
      Previous value: -"CNPJ numérico ou alfanumérico válido."New value: +"Valid numeric or alphanumeric CNPJ."
    • changedInput schema / properties / page / description
      Previous value: -"Página da busca, começando em zero."New value: +"Search page, starting at zero."
    • changedInput schema / properties / pageSize / description
      Previous value: -"Tamanho da página conforme o contrato de /api/busca."New value: +"Page size following the /api/busca contract."
  2. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety bar is low. The description still adds real behavior the annotations don't: the reference company and its branches are excluded from results, headquarters addresses are returned, pagination follows the search contract, and personal data is masked. What's missing is guidance on result size or when the match set may be empty.

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?

Front-loaded with the matching rule and kept to five short sentences with no filler. Minor redundancy: sentence one already says 'matching the main activity, state and size' and sentence two restates 'Matches the main CNAE, state and size when declared', so one of the two could be cut.

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?

For a 3-parameter read tool with an annotated safety profile and no output schema, the description covers the matching logic, return content (headquarters), exclusions and data masking. The remaining gap is result-shape detail, such as whether an empty match set is possible and how many pages typically exist.

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 cnpj, page and pageSize are already documented in structured form. The description only adds the framing 'Uses search pagination', which contextualizes the page parameters without new syntax or limits, so baseline 3 applies.

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 resource and, more importantly, the exact matching rule: active companies sharing main CNAE, state and size with the reference CNPJ. The clause 'It does not establish commercial competition or equivalent capacity' sharpens scope against looser interpretations. It never names a sibling tool, so an agent must infer routing vs. get_company_connections or dossier_cnpj on its own.

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?

Usage is implied by the matching criteria (call it with a CNPJ to get a peer set), and the negative caveat warns against reading results as competitors. There is no explicit when-to-use statement, no prerequisites, and no pointer to an alternative tool for the related jobs an agent might confuse this with.

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.