Skip to main content
Glama

Validar CPF/CNPJ

validar_cpf_cnpj
Read-only

Confere os dígitos verificadores de um CPF ou CNPJ (inclusive o CNPJ alfanumérico). Não consulta nenhum dado sobre o titular.

Input Schema

NameRequiredDescriptionDefault
documentoYesCPF (11 dígitos) ou CNPJ (14 caracteres, inclusive o alfanumérico), com ou sem pontuação.

Output Schema

NameRequiredDescriptionDefault
tipoYesTipo do documento.
validoYesOs dígitos verificadores conferem. Documentos inválidos voltam como erro.
formatadoYesDocumento com a pontuação padrão.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/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 that this is a purely local, format-only validation with no external data retrieval, and that alphanumeric CNPJ is supported. That is meaningful context beyond the annotations, though it does not cover error behavior for malformed input.

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 short sentences, no filler, and the core action is front-loaded with the scope caveat immediately after. Every clause carries information an agent needs.

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 single-parameter, read-only validation tool with an output schema that already defines the return shape, the description supplies everything needed: what is validated, what input variants are accepted, and what the tool does not do. Nothing material is missing.

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% and the single parameter already documents accepted formats (11-digit CPF, 14-character alphanumeric CNPJ, with or without punctuation). The description repeats the CPF/CNPJ distinction without adding new syntax or format guidance, so the baseline of 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 precise verb+resource: it verifies the check digits of a CPF/CNPJ, including the alphanumeric CNPJ variant. It also delimits scope by clarifying that no holder data is consulted, which separates it from lookup-style tools. It does not name or contrast any sibling tool explicitly, so it lands at 4 rather than 5.

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?

The clause "Não consulta nenhum dado sobre o titular" functions as a when-not guide, steering the agent away from using this for data enrichment or holder lookups. It gives clear context for the tool's narrow purpose but names no alternative tool for the cases it excludes.

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.

Resources