Skip to main content
Glama

Run SQL that changes the database

execute_sql
Destructive

PHP + MySQL plans: runs one SQL statement that can change the site's database (CREATE/ALTER/DROP TABLE, INSERT, UPDATE, DELETE, …). Changes are permanent: confirm destructive changes (DROP, DELETE, TRUNCATE, large UPDATEs) with the user first. Use ? placeholders with params for values. One statement per call; 30-second limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteYesThe website's domain, as shown by list_sites (e.g. "example.com" or "name.hostingfor.ai").
queryYesOne SQL statement.
paramsNoValues for ? placeholders, in order.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
rowsNoOne object per row, keyed by column name.
columnsNo
warningsNo
insert_idNo
more_rowsNo
row_countNo
duration_msYes
affected_rowsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already provide destructiveHint=true, but the description adds essential behavioral details beyond that: 'Changes are permanent' and the 30-second execution limit, plus the need to confirm destructive changes. These are operational traits an agent must know and are not present in the schema or annotations.

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?

The description is three sentences, front-loaded with the core purpose, and packs multiple critical details (permanence, confirmation, placeholders, single-statement constraint, time limit) without redundancy. Every sentence earns its place.

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?

For a mutation tool with an output schema present, the description covers safety (confirmation), parameter usage (placeholders), execution constraints (one statement, 30s), and explicitly declares the destructive nature. There are no missing pieces an agent would need to call it correctly, and the output schema presumably handles return details.

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?

The schema has 100% coverage for parameters, so the baseline is 3. The description adds meaning by explaining the '?' placeholder convention and that params must be provided in order, which clarifies how the query and params fields interact. This goes beyond the simple field descriptions.

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?

The description clearly states the tool runs a single SQL statement that changes the database, with a verb ('runs') and resource ('SQL statement that can change the site's database'). It lists specific operation types (CREATE/ALTER/DROP, INSERT, UPDATE, DELETE) and is distinct from read-only siblings like query_database by emphasizing mutation.

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 gives concrete usage guidance: use ? placeholders with params, one statement per call, and explicitly instructs confirming destructive changes with the user. It doesn't name read-only alternatives directly, but the focus on 'change the database' and the destructive-confirmation rule imply its role versus query_database. A named alternative would make it a 5.

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.

Resources