Skip to main content
Glama

Conferir CPF ou CNPJ

validate_document
Read-onlyIdempotent

Confere se um CPF ou um CNPJ (inclusive o CNPJ com letras) pode existir, pelos dígitos verificadores, e devolve o número formatado. Não consulta ninguém: não diz se o CPF pertence a alguém, nem de quem é.

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": {
      "number": "<number>"
    },
    "name": "validate_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
numberYesO CPF ou o CNPJ, com ou sem pontuação.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world). The description adds genuinely non-redundant behavior: the check is purely mathematical via check digits, no external lookup occurs, and the return value is the formatted number. It does not state what happens on an invalid input (error vs. negative result), which is the main remaining behavioral gap.

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: the first gives what it does and returns, the second front-loads the critical limitation. Nothing redundant with the title or annotations.

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 single-parameter, no-output-schema validator, the description covers the mechanism and the return value ("devolve o número formatado"). The only missing piece is outcome semantics for invalid documents, which matters because there is no output schema to reveal the failure shape.

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 coverage is 100% and the single parameter is already documented as accepting formatted or unformatted input. The description still adds meaning the schema lacks: it accepts the alphanumeric CNPJ (CNPJ com letras), a format distinction an agent would otherwise miss.

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?

Names a specific verb ("Confere se ... pode existir") and resource (CPF/CNPJ, including the alphanumeric CNPJ), and states the validating mechanism (check digits). It also distinguishes itself from data-lookup siblings by declaring it does not consult anyone, so an agent can rule out lookup_company/lookup_bank-like tools without opening schemas.

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?

Explicitly states when NOT to use it: "Não consulta ninguém: não diz se o CPF pertence a alguém, nem de quem é" — this rules out ownership/enrichment use cases. It stops short of naming the alternative tool an agent should reach for in those cases, leaving the routing inference to the agent.

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