Skip to main content
Glama

Backup lógico do banco (SQL)

db_backup_sql

Creates a full SQL backup of the PJe-Calc database (schema and data); stop PJe-Calc first to release the database lock.

Instructions

Gera backup completo (schema + dados, ~9 MB) em SQL usando org.h2.tools.Script com a JRE do próprio PJe-Calc. O PJe-Calc mantém o banco bloqueado enquanto está em execução. Encerre o aplicativo (pjecalc_parar) antes de usar as ferramentas de banco.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
arquivoNoCaminho do .sql de saída (padrão: .dados/pjecalc-backup-<timestamp>.sql).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.0-mcp.13

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false and openWorldHint=false. The description adds genuinely useful context beyond them: the mechanism (org.h2.tools.Script), the ~9 MB size, and critically the constraint that the database stays locked while PJe-Calc runs, requiring pjecalc_parar first. It does not state whether an existing target file is overwritten.

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 short sentences, purpose front-loaded, then the prerequisite. The implementation detail about the JRE/org.h2.tools.Script is slightly more than the agent needs but is compact and earns some informational value.

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 one-parameter backup writer with full schema coverage and annotations covering the safety profile, the description supplies the key operational caveat (stop the app) and output expectations. Missing only edge-case behavior such as overwrite/error handling on the destination path.

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 single 'arquivo' parameter is fully documented in the schema, including its default. The description adds no format or path syntax beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Gera backup completo (schema + dados ...) em SQL') and explicitly names the output format and approximate size (~9 MB), which distinguishes it from the sibling db_backup_arquivo. It does not, however, explicitly call out that sibling as the alternative, so the differentiation is by implication rather than direct contrast.

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?

Gives a clear precondition and names the tool that satisfies it: 'Encerre o aplicativo (pjecalc_parar) antes de usar as ferramentas de banco.' That is actionable routing. It stops short of an explicit when-to-use vs. db_backup_arquivo or db_restaurar comparison.

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