Skip to main content
Glama

br__validate_cnpj

Validates a Brazilian CNPJ (company tax ID) in both legacy numeric and new alphanumeric formats, with or without separators.

Instructions

Validate a Brazilian CNPJ (company tax ID).

Accepts both the legacy all-numeric form (14 digits) and the alphanumeric form introduced by NT 2026.004 / PL_010d (12 alphanumeric characters + 2 numeric check digits, production from 2026-07-01).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cnpjYesCNPJ string, with or without ``.``/``/``/``-`` separators.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYes
valueNo
country_codeNo
errorNo
Behavior2/5

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

No annotations provided; description only covers input formats, not behavior on invalid inputs, side effects, or return values.

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, front-loaded purpose, no wasted words.

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?

Simple tool with one param; description explains input variations adequately. Output schema exists, so no need to detail return values, but behavioral gaps remain.

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?

Schema covers the single parameter with separator note; description adds valuable detail on two accepted formats (numeric and alphanumeric).

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?

Describes validation of Brazilian CNPJ, clearly distinguishing from sibling br__validate_cpf (which validates CPF).

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?

Implicitly when CNPJ validation is needed, but no explicit when-not or alternative tools guidance beyond sibling names.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-nfe-br'

If you have feedback or need assistance with the MCP directory API, please join our Discord server