Skip to main content
Glama
fb0sh
by fb0sh

db_execute

Run write statements such as INSERT, UPDATE, or DELETE on a writable database connection and return the number of affected rows.

Instructions

Run a write statement on a writable connection (read_only=false). Returns affected_rows.

Input Schema

NameRequiredDescriptionDefault
sqlYes
paramsNo
connection_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: it does disclose that this is a mutation requiring a writable connection and that it returns affected_rows, which is real behavioral value. It omits error behavior, transaction/commit semantics, and whether statements are reversible — significant gaps for a write tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the core action and prerequisite, followed by the return value. No filler or repetition.

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

Completeness2/5

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

For a three-parameter mutation tool with no annotations and no output schema, the description is thin: it never explains parameter binding via 'params', failure modes, or commit semantics. The one return-value note is helpful but doesn't close the gap left by 0% schema coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across all three parameters, so the description must compensate and largely does not. Only connection_id gets indirect mention ('writable connection'); 'sql' and especially the 'params' binding array are never explained in the description or schema.

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 ('Run a write statement') and the resource it operates on (a writable DB connection), which clearly distinguishes it from a read-oriented db_query. It does not explicitly name the sibling to use for reads, so sibling differentiation is only 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?

The parenthetical '(read_only=false)' gives a concrete precondition for the connection, which is useful. However, it never states when to prefer db_query over db_execute, what happens on a read-only connection, or any alternatives — 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.