Skip to main content
Glama

Ler/alterar portas do Tomcat

config_portas
DestructiveIdempotent

Read or update HTTP, AJP, and shutdown ports in Tomcat server.xml for PJe-Calc, creating backups and avoiding port conflicts during interface launch.

Instructions

Sem argumentos: lê as portas atuais. Com argumentos: altera http/ajp/shutdown no tomcat/conf/server.xml (apenas conectores ativos; comentários preservados; backup automático .mcp-backup-). O launcher usa a porta HTTP para abrir a interface e troca de porta automaticamente se estiver ocupada.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ajpNoNova porta AJP (padrão 9258).
httpNoNova porta HTTP (padrão 9257).
shutdownNoNova porta de shutdown (padrão 9256).

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?

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description adds valuable specifics: only active connectors are modified, comments are preserved, an automatic backup .mcp-backup-<timestamp> is created, and the launcher may auto-switch ports if HTTP is busy. These details go well beyond the safety flags.

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 sentences, front-loaded with the core read/write behavior, followed by implementation notes. The final sentence about the launcher is contextually relevant but slightly tangential, keeping it from a 5.

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 still covers the essential behavior for both modes, the file affected, backup, and preservation of comments. Combined with full schema coverage and clear annotations, an agent has enough 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%, and the schema documents each parameter (ajp, http, shutdown) with defaults and ranges. The description repeats the parameter names but adds no new semantic detail (e.g., format, interaction), 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?

It explicitly states dual behavior: no args reads current ports; with args modifies http/ajp/shutdown in tomcat/conf/server.xml. The verb (lê/altera) and resource (ports in server.xml) are specific, and the dual mode distinguishes it from generic config siblings.

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?

The description clearly indicates when to use no-argument mode versus argument mode, which is the primary usage decision. However, it does not name alternative tools (e.g., config_ler) or state when not to use this tool, so it falls 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.