Skip to main content
Glama

Execute DB Query

nexusai_db_query_execute
Destructive

Execute confirmed SQL against an external DB source. Supports SELECT, INSERT/UPDATE/DELETE (with WHERE), and DDL including CREATE/DROP FUNCTION, CREATE/DROP TRIGGER, CREATE/DROP VIEW, CREATE/DROP PROCEDURE. DML and DDL require confirmed=true. Function/procedure bodies with dollar-quoting ($$...$$) are fully supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL statement to execute.
maxRowsNo
confirmedNoSet to true only after the person has reviewed and approved this exact statement. Required for DML/DDL.
dbSourceIdYesDB source UUID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false and openWorldHint=true, so the safety profile is partly covered. The description still adds non-obvious behavior: exactly which operation classes need the confirmed flag and that dollar-quoted function/procedure bodies are supported. It does not mention affected rows, rollback behavior, or runtime limits beyond maxRows.

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 tight sentences: capability first, the confirmed gate second, a notable edge case (dollar-quoting) last. The DDL enumeration is list-heavy but each item is functional information; there is no filler.

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, no-output-schema tool, the description covers what can be executed and the confirmation gate that governs mutation. The main omission is relationship to the preview/apply-fix workflow and any hint about result or error shape, which an agent operating this tool would benefit from.

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 coverage is 75%; sql, dbSourceId and confirmed are documented inline, leaving only maxRows undocumented. The description reinforces confirmed's gating role for DML/DDL (consistent with the schema) but adds no syntax or format guidance for the SQL string or the row cap. Baseline 3 is appropriate when the schema carries most of the load.

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 and resource (execute SQL against an external DB source) and enumerates the statement classes it accepts (SELECT, DML, DDL variants). The word 'external' helps separate it from nexusai_managed_db_execute/nexusai_managed_db_query, but it never names the directly related sibling nexusai_db_query_preview, so the distinction is left implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a real precondition (DML and DDL require confirmed=true), which is actionable context for invoking it. However, it never states when to use this versus a sibling such as nexusai_db_query_preview or nexusai_db_apply_fix, nor that a preview step should precede execution. Usage is implied rather than guided.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.