Skip to main content
Glama

Ler/alterar token dos serviços REST

config_token
DestructiveIdempotent

View the current PJe-Calc service token or replace it in both .bat files, with automatic backup, to authenticate /servico/rest/* calls via Authentication: Base64(token).

Instructions

Sem argumentos: mostra o token atual (seguranca.pjecalc.tokenServicos dos .bat). Com novo_token: substitui nos dois .bat (backup automático). O token protege os endpoints /servico/rest/*; o header HTTP é Authentication: Base64(token).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
novo_tokenNoNovo token (opcional).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.0-mcp.13

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare destructive=true and idempotent=true; the description goes further by revealing that a write replaces the token in BOTH .bat files, that an automatic backup occurs, and that the token guards the /servico/rest/* endpoints via an Authentication: Base64(token) header. This adds meaningful context about scope and side effects beyond the annotations.

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?

Three dense sentences that are front-loaded with the two modes before adding security context. Every sentence carries information, though the header-format detail is slightly tangential for a config tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with no output schema, the description covers both modes, the side effect and its backup mitigation, and the security role of the token. Return format is only implied ('mostra o token atual'), leaving a minor gap.

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% (baseline 3), and the description adds real meaning by showing novo_token triggers the write mode and is applied to both files with an automatic backup, going beyond the schema's bare 'Novo token (opcional)'.

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 dual verb+resource: read the current REST services token, or replace it, and names the exact config key (seguranca.pjecalc.tokenServicos). This clearly separates it from siblings like config_portas or config_memoria, so an agent can disambiguate 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?

It explicitly explains the two invocation modes: with no argument it shows the current token; with novo_token it replaces it in both .bat files. The condition selecting each mode is unambiguous, though no alternatives or exclusions (e.g., what to use for other config) are named.

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