Skip to main content
Glama
radar-cnpj-mcp

radar-cnpj-mcp

by wendersoon

Comparar regiões

comparar_regioes
Read-only

Compares up to 5 Brazilian municipalities or states across selected or all CNAE sectors on active companies, size, MEI share, sector weight, and openings vs. prior 12 months; returns totals only.

Instructions

Compara até 5 municípios ou UFs, no mesmo setor ou em todos: empresas ativas, porte, percentual de MEIs, peso do setor nas ativas da região e aberturas dos últimos 12 meses completos comparadas aos 12 anteriores. Retorna só totais, sem listar empresas.

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": {
      "regioes": "<regioes>"
    },
    "name": "comparar_regioes"
  }
}

Input Schema

NameRequiredDescriptionDefault
cnaesNoCódigos CNAE. Com 7 dígitos busca a subclasse exata; com menos dígitos busca por prefixo (ex.: "4520" = toda a classe). Use buscar_cnae para descobrir os códigos.
regioesYesRegiões a comparar, ex.: [{"uf":"SP","municipio":"Campinas"},{"uf":"MG"}].
incluir_cnae_secundarioNoTambém considerar empresas que têm o CNAE como atividade secundária.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered; the description adds genuinely useful behavior beyond that — the exact metric set, the comparison window (últimos 12 meses completos vs. 12 anteriores), and the aggregation level (totais, sem listar empresas). It does not cover response shape per region or how large comparisons behave beyond the 5-region cap, which keeps it below a 5.

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 filler: the first front-loads scope, the comparison window and the metric list; the second immediately bounds the return. The dense clause on aberturas is the only place a reader slows down, but it removes ambiguity rather than adding padding.

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-only aggregation tool with no output schema, the description supplies what matters: what is compared, over which period, at what granularity, and that no company-level rows come back. It leaves open the per-region presentation of results and behavior on invalid or duplicate regions, minor gaps for the tool's complexity.

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 cnaes prefixes, the region object shape, the municipio omission rule and incluir_cnae_secundario. The description only adds the semantic point that the sector filter applies uniformly across all compared regions ("no mesmo setor ou em todos"), which is a modest gain over structured fields — baseline 3.

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?

States a specific verb+resource ("Compara até 5 municípios ou UFs") and enumerates exactly which metrics are compared (empresas ativas, porte, % MEIs, peso do setor, aberturas 12m vs 12m anteriores), then bounds the output ("Retorna só totais, sem listar empresas"). An agent can tell this apart from counting or listing siblings without opening the schema.

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?

"no mesmo setor ou em todos" gives the two operating modes and implies cnaes is optional, and "Retorna só totais, sem listar empresas" effectively signals that per-company listing belongs to a different tool. It stops short of naming the alternative (e.g. buscar_empresas) or stating exclusions explicitly, so it's clear context rather than full routing guidance.

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