Skip to main content
Glama

table_sql_execute

Destructive

Execute a DML SQL statement (INSERT, UPDATE, DELETE) against the workspace data tables.

The query runs inside the workspace's PostgreSQL schema. Parameters use $1, $2, etc. placeholders. Returns the number of affected rows.

Fields are "query" and "params" (a JSON string). Example: {"query":"INSERT INTO invoices (id, status) VALUES ($1, $2)","params":"["a1","open"]"} Use ON CONFLICT only on a column with a unique rule; table_schema shows the unique columns.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "table_sql_execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSQL DML statement to execute
paramsNoJSON array of parameter values for $1, $2, etc. placeholders

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 declare readOnlyHint=false and destructiveHint=true, so the mutation risk is covered; the description adds genuinely new context: execution happens in the workspace's PostgreSQL schema, placeholders are $1/$2 style, and the call returns the number of affected rows. It still omits irreversibility/transactionality and any statement-length or permission constraints.

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?

Front-loaded with the verb and operation class, then progressively adds placeholder syntax, return value, and a copyable example. Every line carries information; the example is compact and directly usable, with no redundant restatement of the title.

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 two-parameter raw-SQL mutation with no output schema, the definition covers operation class, execution context, parameter passing, return value, and a caveat on ON CONFLICT. What remains missing is sibling routing (SELECT goes to table_sql) and failure/transaction behavior.

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 100%, so both fields are already documented; the description adds a worked example clarifying that params is a JSON-encoded string (escaped quotes) rather than a raw array, which is a real disambiguation. It does not explain placeholder-count/ordering rules or what happens when params is omitted.

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 scope: DML statements (INSERT, UPDATE, DELETE) against workspace data tables inside the workspace's PostgreSQL schema, which lets an agent separate it from read-oriented siblings like table_sql / table_query. The only gap is that it never names table_sql or table_query as the SELECT counterpart, leaving the boundary 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?

Usage is implied by 'DML SQL statement' plus the enumerated verbs, and the ON CONFLICT line gives a concrete constraint on when that clause is legal. There is no explicit 'use this instead of table_insert/table_update when…' routing and no stated prerequisite about schema discovery via table_schema.

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.