Skip to main content
Glama

Validar documento

validar_documento
Read-only

Confere se um número é válido pela regra oficial: cpf, cnpj (inclusive alfanumérico), cnh, pis, cns, rg (SP), titulo_eleitor, cartao (bandeira, tamanho e Luhn; devolve a bandeira), agencia (precisa do banco) e conta (precisa do banco e da agência). Aceita com ou sem máscara. Não gera nada.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tipoYescpf, cnpj, cnh, pis, cns, rg, titulo_eleitor, cartao, agencia ou conta
bancoNocódigo do banco (001, 033, 041, 104, 237, 341); obrigatório em agencia e conta
valorYeso número a conferir, com ou sem máscara
agenciaNoagência da conta; obrigatória em conta

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tipoYes
validoYes
bandeiraNosó cartao válido: código da bandeira

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / banco / description
      Previous value: -"código do banco (001, 033, 104, 237, 341…); obrigatório em agencia e conta"New value: +"código do banco (001, 033, 041, 104, 237, 341); obrigatório em agencia e conta"
  2. 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, openWorldHint=false and idempotentHint=false. Beyond those, the description adds that input may carry or omit masks and that nothing is generated, which is genuinely useful side-effect context for a validator.

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 purpose sentence followed by two short supporting sentences; the long type enumeration is dense but necessary to convey coverage. No filler sentences, though the enumeration makes the single sentence heavy.

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?

An output schema exists so return values need no explanation, and annotations cover the safety profile. The description supplies the type list, conditional parameter dependencies and mask tolerance, leaving only minor gaps such as format expectations for banco codes.

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 all four parameters (tipo, valor, banco, agencia) are already documented in the schema, including the conditional requirements. The description only restates the banco/agência dependencies and adds the cartao return detail, so baseline 3 applies.

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 ('Confere se um número é válido') and resource, enumerates every supported document type, and clarifies scope with 'pela regra oficial'. The closing 'Não gera nada' cleanly separates it from the sibling gerar_documento.

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?

Gives per-type conditions for use ('agencia precisa do banco', 'conta precisa do banco e da agência') and implicitly rules out generation via 'Não gera nada'. It never names an alternative tool explicitly nor states when validation is inappropriate, so it stops short of full when/when-not guidance.

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