Skip to main content
Glama

validate_cpf

Read-onlyIdempotent

Validates Brazilian CPF (individual taxpayer ID) using official modulo-11 checksum. Returns validity boolean and CPF string, or reason for failure.

Instructions

Validates a Brazilian CPF (Cadastro de Pessoas Físicas) — the 11-digit individual taxpayer identification number issued by the Receita Federal. Applies the official two-pass modulo-11 checksum algorithm. Returns { valid: boolean, cpf: string } for valid CPFs, or { valid: false, reason: string } for invalid format or failed checksum. Rejects known invalid sequences (all same digits). Use when processing Brazilian e-commerce orders, fintech onboarding, KYC flows, or any compliance workflow requiring a verified Brazilian individual tax ID. Offline validation only — does not query Receita Federal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cpfYes11-digit Brazilian CPF, with or without formatting. Example: '123.456.789-09' or '12345678909'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYes
cpfNo
reasonNo
Behavior5/5

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

Annotations already indicate read-only and idempotent. Description adds details on algorithm, rejection of invalid sequences, return format, and offline nature, enhancing transparency beyond annotations.

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?

Three focused sentences: purpose, algorithm, usage. No redundancy, front-loaded with key information.

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?

Output schema exists, but description still covers return shape briefly. Usage context, limitations, and algorithm are fully addressed. Complete for a validation tool.

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% with formatting example in description. Description explains algorithm and return behavior, adding value beyond schema.

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?

Clearly states it validates Brazilian CPF using modulo-11 algorithm. Distinguishes from sibling tools like validate_cnpj, validate_rfc_mx by specifying Brazilian individual tax ID.

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 lists use cases (e-commerce, fintech, KYC) and notes offline-only limitation. Does not explicitly mention when not to use or compare with alternatives, but context is clear.

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/josemvelez78/mcp-latam-business'

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