Skip to main content
Glama

Sincronizar tabelas nacionais (REST)

rest_tabelas_sincronizar_nacionais
Idempotent

Retrieve national table synchronization SQL from a PJe-Calc server and optionally save the decompressed script; apply it locally with tabelas_atualizar.

Instructions

LADO SERVIDOR do PJe-Calc local (o serviço que ele oferece a outros TRTs): NÃO atualiza as tabelas deste PJe-Calc — para isso use tabelas_atualizar. GET /pjecalc/servico/rest/sincronizacao/nacionais/{hash}?versao=X — devolve SincronizacaoTabelasDTO com {tabelas: Base64(GZIP do SQL), hashServidor}. 404 = já está na versão mais recente. Com salvar_arquivo, grava o SQL descompactado no caminho indicado. Requer o app em execução.

Input Schema

NameRequiredDescriptionDefault
hashYesHash solicitante (ex.: 0 para forçar).
versaoNoVersão desejada (opcional).
salvar_arquivoNoCaminho para gravar o SQL descompactado (opcional).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.0-mcp.13

TDQS

A4.4/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false, openWorldHint=false), the description discloses the 404 semantics, the Base64/GZIP return payload, the file-writing side effect of salvar_arquivo, and the runtime prerequisite ('Requer o app em execução'). This is rich behavioral context and consistent with the readOnlyHint=false annotation given the file write.

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?

Dense but front-loaded: the server-side role and the sibling exclusion come first, followed by the endpoint, return shape, and edge cases. Every sentence carries information, though the technical packing is heavy.

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?

With no output schema, the description compensates by describing the returned SincronizacaoTabelasDTO structure, the 404 outcome, the file-write option, and the app-running requirement. An agent has everything needed to invoke it correctly.

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?

Schema description coverage is 100%, so all three parameters are already documented. The description adds structural context (hash and versao as URL components) and restates salvar_arquivo's file-write behavior, but contributes little new parameter meaning beyond the schema baseline.

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 states a specific role ('LADO SERVIDOR do PJe-Calc local'), the exact endpoint, and what it returns, so the agent knows precisely what the tool does. It explicitly distinguishes itself from tabelas_atualizar, preventing the most likely confusion with a sibling.

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 an explicit when-not ('NÃO atualiza as tabelas deste PJe-Calc') and names the alternative (tabelas_atualizar) plus a special case (404 = already latest). The positive use case — serving tables to other TRTs — is stated but less elaborated than the exclusion.

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