Skip to main content
Glama

Run a SQL write statement

execute
Destructive

Execute DDL/DML statements (CREATE, INSERT, UPDATE, DELETE, etc.) in the target datasource's dialect (get_schema lists every datasource with its dialect). Raw exploration tools do not apply probe redaction and are not bound by schema exposure: they reach any object the datasource credential reaches, and are offered to Administrators, and to members whose Role grants Full; separate access checks apply. Schema exposure governs get_schema, the ontology and approved requests. Rows are positional arrays in columns order. Pass format: "records" for one object per row in returned-column order. Duplicate exact column names collapse to one column at the first position; the surviving value is unspecified. Use unique SQL aliases to preserve every selected value. RETURNING columns omit type because the write adapter supplies names only.

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": {
      "sql": "<sql>"
    },
    "name": "execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL statement to execute
formatNoRow format (default: compact)
datasourceNoOptional datasource ID to target. Omit to use the project's configured default; required when the project has multiple datasources and no default is configured. Each datasource has its own SQL dialect: get_schema lists every datasource with its type, dialect and identifier quote, and every result carries datasource_type and dialect. A datasource that has not finished setup is refused with datasource_not_ready. Use datasource (not datasource_id) here; Request authoring uses datasource_id. Unknown top-level arguments and malformed supplied datasource values return invalid_parameters before datasource selection. Supply a nonzero UUID string, or omit datasource intentionally to use the default/sole datasource.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Annotations already flag destructive and non-idempotent, but the description adds substantial behavior beyond them: raw tools bypass probe redaction and schema exposure, reach everything the credential reaches, and are gated by separate access checks tied to Administrator or Full-granting Roles. It also discloses the row format semantics, duplicate-column collapse, and why RETURNING columns lack types — real operational context the annotations cannot convey.

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?

Purpose is front-loaded in the first clause and every sentence carries distinct information (access model, result shape, aliasing caveat). The middle sentences are dense and stack several clauses each, so an agent must parse carefully, but nothing is redundant 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 write tool with no output schema, the description covers the essentials an agent needs: dialect resolution, access preconditions, result encoding, and column-name pitfalls. Gaps remain around transactionality, statement timeouts, and whether multiple statements per call are allowed, which matter for a DDL/DML executor.

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%, so the baseline is 3, and the description earns above that by explaining what `format: "records"` actually returns ('one object per row in returned-column order') and by warning that duplicate exact column names collapse and require unique aliases. It does not add dialect-per-datasource syntax detail beyond pointing at get_schema, but the value added is concrete.

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?

The description opens with a specific verb and resource ('Execute DDL/DML statements (CREATE, INSERT, UPDATE, DELETE, etc.) in the target datasource's dialect'), which tells an agent exactly what class of operation this is. Sibling differentiation is only partial: it contrasts against unspecified 'raw exploration tools' rather than naming a concrete alternative such as execute_approved_request, so the boundary is inferable but not explicit.

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 context is present but indirect: get_schema is pointed to for dialect discovery, and the access model (Administrators, or Roles granting Full) is described. There is no explicit 'use this instead of X' statement, and no guidance on whether to dry-run, prefer approved requests, or how multi-statement input is handled, leaving the when/when-not decision largely to inference.

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