Skip to main content
Glama

Validate Peru RUC (tax ID)

validate_peru_ruc
Read-onlyIdempotent

Validate a Peruvian RUC (11-digit tax ID) and look up the company in the public SUNAT registry file (Padrón Reducido del RUC). Returns check-digit validity, legal name, taxpayer status (active or not), fiscal-address condition (HABIDO / NO HABIDO), fiscal address with district, and a pass/review/fail vendor assessment with reasons. Full data is returned for company RUCs (prefix 20). For natural-person RUCs (prefix 10, 15, 16, 17) the taxpayer status and address condition are returned; the holder's name is returned only when the connector is used with an API key (?api_key=... or Authorization header), for supplier and customer verification; never the DNI or address (privacy, Ley 29733). If that copy is unavailable the answer is a check-digit validation with verification_level "format". Typical use: checking a Peruvian supplier or customer before paying, invoicing or onboarding it.

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": {
      "ruc": "<ruc>"
    },
    "name": "validate_peru_ruc"
  }
}

Input Schema

NameRequiredDescriptionDefault
rucYes11-digit Peru RUC, e.g. "20615614841". Spaces and dashes are ignored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / ruc / description
      Previous value: -"11-digit Peru RUC, e.g. \"20100047218\". Spaces and dashes are ignored."New value: +"11-digit Peru RUC, e.g. \"20615614841\". Spaces and dashes are ignored."
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, and the description adds substantial context beyond that: the API-key requirement for natural-person names, the Ley 29733 privacy limit that DNI and address are never returned, the prefix-based data split (20 vs 10/15/16/17), and the verification_level "format" fallback. This is well above what the annotations carry, though it stops short of documenting error behavior for invalid input.

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?

Purpose and outputs are front-loaded and no sentence is filler, but the parenthetical density and the interleaved caveats about API keys, prefixes and privacy make it harder to scan than it needs to be.

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?

There is no output schema, so the description must explain return values, and it does so field by field (check-digit validity, legal name, taxpayer status, address condition, assessment) plus the degradation path and privacy limits. An agent has everything needed to call it and interpret the result.

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 schema already documents the 11-digit format and dash/space tolerance, so the baseline is 3. The description adds real meaning beyond the schema by explaining what RUC prefixes (20 vs 10/15/16/17) imply for returned data.

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 names a specific verb and resource (validate a Peruvian RUC and look up the company in the SUNAT Padrón Reducido) and explicitly enumerates the returned fields, so an agent can tell it apart from generic siblings like validate_tax_id or validate_tax_id_format.

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?

It gives a concrete use case ('checking a Peruvian supplier or customer before paying, invoicing or onboarding it') and describes the degraded format-only mode when the registry copy is unavailable. It stops short of naming a sibling to use for pure format checks, which leaves some routing to inference.

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