Skip to main content
Glama

validar_ruc

Validate Peruvian RUC structure offline: checks 11-digit format, valid prefix, and modulo 11 check digit using SUNAT algorithm.

Instructions

Valida la estructura de un RUC peruano: 11 digitos, prefijo vigente y digito verificador segun el algoritmo modulo 11 de SUNAT.

Es una comprobacion aritmetica y offline: NO consulta ninguna base de datos. Un RUC valido aqui puede aun asi no existir en SUNAT o estar de baja; para eso usa consultar_ruc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rucYes
Behavior5/5

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

With no annotations, the description fully covers behavioral traits: it is an arithmetic check, offline, and does not query any database. It honestly states limitations (valid here does not mean exists in SUNAT).

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?

The description is two sentences: first explains functionality, second clarifies limitations and usage. Every sentence adds value, no wasted words.

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?

Given the single parameter, no output schema, and no annotations, the description is complete. It explains what it does, its limitations, and directs to an alternative. Adequate for a simple validation tool.

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?

The schema has 0% coverage and only one parameter 'ruc'. The description mentions '11 digits' but does not explicitly link this to the parameter format expectations. Basic meaning is clear from context, but could be more explicit.

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?

The description explicitly states it validates the structure of a Peruvian RUC, specifying 11 digits, valid prefix, and checksum algorithm. It distinguishes from siblings by clarifying it's offline and does not query databases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly states when to use this tool (offline structural validation) and when not to (for actual existence, use consultar_ruc). It also notes that a valid result does not guarantee the RUC exists in SUNAT.

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/r2nochi/sunat-mcp'

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