Skip to main content
Glama

Change data with SQL

query_rw
Destructive

Use this when the user wants to keep data so they (or another agent) can query it again later: save a result or uploaded rows as a table, add rows over time, correct or remove rows. Change data: run ONE DuckDB statement that writes (INSERT, UPDATE, DELETE, MERGE INTO, CREATE TABLE, CREATE SCHEMA, ALTER TABLE, DROP TABLE, DROP SCHEMA) on the server, over tables named catalog.namespace.table; the catalog after INSERT INTO, UPDATE, DELETE FROM, MERGE INTO or TABLE/SCHEMA is the one written, every other is only read. It also changes a table's columns (ALTER TABLE). It needs write on the catalog (the person approves it when connecting, or the API key holds it); a catalog you can only read is refused. Every committed write is a new snapshot of the table (older versions stay readable); a DROP removes a table with its history and cannot be undone, so confirm it with the person first. No CREATE OR REPLACE: DROP, then CREATE. Reads belong in query. A 409 commit_conflict (another writer committed first), a 408 write_timeout or a 502 write_outcome_unknown: read the table (query) before sending the statement again, since the write may be in it. Large loads belong in the user's own DuckDB (lhbox duckdb) or lhbox table import.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesone DuckDB statement that writes, tables named catalog.namespace.table

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=false), the description discloses that a write requires write permission on the catalog (approved at connect time or held by API key) and that a read-only catalog is refused. It further explains snapshot semantics, the irreversibility of DROP ('removes a table with its history and cannot be undone'), the absence of CREATE OR REPLACE, and recovery guidance for 409/408/502 errors — none of which the annotations convey.

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

Conciseness3/5

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

Content is front-loaded with the when-to-use trigger, which is good, but the remainder is a dense run-on paragraph mixing statement lists, permission rules, snapshot semantics, and error recovery. Nearly every sentence earns its place, but the wall-of-text structure makes it harder to scan than it needs to be.

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 single-parameter mutation tool with no output schema, the description covers what an agent needs: permitted operations, permission prerequisites, naming, rollback/snapshot behavior, irreversibility warning, and explicit error-handling guidance. Nothing material is missing.

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 coverage is 100% for the single 'sql' parameter, so baseline is 3. The description still adds real meaning: it enumerates the permitted statement types, the catalog.namespace.table naming convention, which catalog is written vs only read, and the 'one statement' constraint — going beyond the schema's terse description.

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 names a specific verb and resource: run ONE DuckDB writing statement (INSERT, UPDATE, DELETE, MERGE INTO, CREATE/ALTER/DROP) against catalog.namespace.table. It explicitly distinguishes itself from the sibling read tool by stating 'Reads belong in query' and 'Large loads belong in the user's own DuckDB'. An agent can route write-vs-read without opening either schema.

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

Usage Guidelines5/5

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

It gives concrete when-to-use triggers (keeping data so it can be queried later, saving a result as a table, adding rows over time, correcting/removing rows) and explicit exclusions (reads belong in query; large loads belong in lhbox duckdb or table import). Alternatives and the conditions selecting them are named directly.

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