Skip to main content
Glama

fb_execute_dml

Executes Firebird DML (INSERT, UPDATE, DELETE, EXECUTE PROCEDURE) only after explicit user confirmation, showing SQL and impact first.

Instructions

Executa comandos de manipulação de dados (INSERT, UPDATE, DELETE, EXECUTE PROCEDURE).

REGRA RÍGIDA DE SEGURANÇA — DUPLA CONFIRMAÇÃO OBRIGATÓRIA: O assistente NUNCA deve executar comandos DML sem autorização expressa do usuário. Etapas obrigatórias antes da execução:

  1. Apresentar o SQL exato que será executado.

  2. Explicar claramente o que o comando faz.

  3. Detalhar o impacto no banco (tabelas e registros afetados, reversibilidade, riscos de lock ou perda de dados).

  4. Solicitar a confirmação direta do usuário para prosseguir.

SOMENTE após o usuário responder confirmando expressamente no chat, reexecute passando confirmed=True. Se houver múltiplos bancos no projeto e nenhum estiver ativo na sessão, pergunte antes ao usuário.

Input Schema

NameRequiredDescriptionDefault
sqlYes
db_aliasNo
confirmedNo

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?

With no annotations present, the description carries the full burden and does so well: it declares the destructive nature of DML, mandates double confirmation via `confirmed=True`, and tells the agent to disclose reversibility, lock risk, and potential data loss. It stops short of describing transaction/commit behavior or the shape of the response.

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?

Core purpose is front-loaded in one line, followed by a clearly numbered safety checklist that suits a destructive tool. Length is proportionate to risk, though the repeated confirmation warning ('NUNCA deve executar... sem autorização expressa' restated in the steps) is slightly redundant.

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 destructive, annotation-free, 3-parameter tool with no output schema, the description supplies the safety workflow, the confirmation gate, and database-selection handling. The main remaining gap is transactional semantics — whether the statement commits, and how to roll back.

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 description coverage is 0%, so the description must compensate, and it explains two of three parameters meaningfully: the purpose of `confirmed=True` (only after explicit user authorization) and how to resolve `db_alias` when multiple databases exist. The `sql` parameter is self-evident from its name but gets no format guidance.

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 and resource — executing DML commands — and enumerates the exact statement classes (INSERT, UPDATE, DELETE, EXECUTE PROCEDURE), which cleanly separates it from the read-only fb_query and the schema-changing fb_execute_ddl siblings. An agent knows immediately what class of operation this tool performs.

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?

Provides an explicit, ordered when-to-use protocol (present SQL, explain effect, detail impact, request confirmation) plus the edge case of multiple databases with no active session. It does not name fb_query or fb_execute_ddl as the alternatives for reads or DDL, so routing between siblings is left partly to inference.

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