Skip to main content
Glama

validar_numero_cnj

Read-onlyIdempotent

Validate CNJ process numbers and check the modulo-97 verification digit before registering typed or copied data. Returns decoded year, segment, court, origin, and expected digit if invalid.

Instructions

Confere se um número de processo segue o padrão CNJ (NNNNNNN-DD.AAAA.J.TR.OOOO) e se o dígito verificador (módulo 97) bate. Devolve as partes decodificadas (ano, segmento, tribunal, origem) e, se inválido, o dígito esperado. Use antes de registrar algo a partir de um número digitado ou copiado de e-mail.

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": {
      "numero": "<numero>"
    },
    "name": "validar_numero_cnj"
  }
}

Input Schema

NameRequiredDescriptionDefault
numeroYesNúmero do processo, com ou sem máscara.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered; the description adds genuine behavior on top by disclosing what is returned (decoded ano, segmento, tribunal, origem) and the invalid-case payload (expected check digit). The only gap is that it does not say whether a malformed-number input raises an error or returns invalid, but the output schema likely covers the shape.

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 sentences, each carrying unique information: what is checked, what comes back including the failure case, and when to call it. The pattern and check-digit rule are front-loaded before the usage advice, so an agent gets the essentials first.

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?

For a one-parameter pure-validation tool with an output schema and full annotation coverage, nothing material is missing: input format tolerance, success output, failure output, and the call-site precondition are all present. Return-value detail is correctly left to the output schema rather than duplicated.

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?

With a single parameter at 100% schema description coverage, the schema already documents 'numero' as a string accepted with or without mask, which is exactly the meaning the description reinforces implicitly. The description adds no format or edge-case detail about the input beyond what the schema states, 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/validar) and resource (número de processo CNJ), spells out the expected pattern NNNNNNN-DD.AAAA.J.TR.OOOO, and names the check being performed (dígito verificador módulo 97). An agent can distinguish this validation tool from the sibling process-search and deadline tools without opening the schema.

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 prescribes when to use it: before registering anything from a number typed by hand or copied from an email. That is a clear precondition tied to a real failure mode. It does not name an alternative tool to use instead when the number is already stored, which keeps it short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.