Skip to main content
Glama

add-sql

Destructive

Run or schedule a SQL script against SQL Server or Oracle in one request; include confirmation and reason for emergency operations.

Instructions

dbabrain common.cli add-sql: A single-script SQL task and its target in one call (the older add-sql). Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • db_type (required): sqlserver | oracle.

  • server_id (required): The machine.

  • display_name (required): What a person reads.

  • sql_text: The SQL.

  • sql_file: Or a file of it.

  • instance_name: The instance.

  • service_name: A label.

  • database_name: One database.

  • credential_name: Which login in users.json; default: the instance's own.

  • from_day: Schedule: first day.

  • to_day: Schedule: last day.

  • from_hour: Schedule: first hour.

  • to_hour: Schedule: last hour.

  • repeat_interval: Schedule: interval.

  • timeout: Schedule: budget.

  • inactive: Register switched off.

  • manual_only: Only when asked for.

  • output: none | chat | xlsx | csv.

  • output_chat: Where the result goes.

  • notify_chat: One level for both notifications.

  • logging_chat: Progress level.

  • error_chat: Failure level.

  • logging_chat_id: Or a chat id.

  • error_chat_id: Or a chat id.

  • logging_on_run: false: no progress message.

  • alert_on_error: false: no failure message.

  • data_dir: Another data/ folder to read.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "add-sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, and the description adds real value beyond them by disclosing the emergency-operations confirmation gate (confirm: "yes" plus reason). It is weaker on what exactly is destroyed or how conflicts between sql_text and sql_file resolve.

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?

The field list is the right format for a 24-key request object, and the confirm requirement is front-loaded. But the header sentences are confusing ('Changes or removes something'), and several field glosses are too terse to be actionable, so the text is dense rather than economical.

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?

An output schema exists, so return values need not be explained, and the description covers the bulk of the request payload including requiredness, enums, and output/notification routing. Gaps remain around mutual exclusivity of sql_text vs sql_file, which of the optional target fields are actually needed per db_type, and timeout units.

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 0% — the single 'request' property is an untyped free-form object — so the description carries the entire burden and does enumerate roughly two dozen sub-fields with required markers, the sqlserver|oracle enum, and defaults like credential_name. Many entries are terse fragments ('service_name: A label', 'Or a file of it'), but this is far more meaning than the schema alone provides.

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 opening line names a specific resource (a single-script SQL task plus its target registered in one call) and hints at the sibling split from sql-command-add / sql-target-add by saying 'in one call'. However, the second sentence ('Changes or removes something') is vague and in tension with an 'add'-named tool, muddying whether this registers or mutates.

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 '(the older add-sql)' and 'in one call' imply this is the legacy combined alternative to the separate task/target tools, and the confirmation requirement for emergency-operations commands is stated. But there is no explicit when-to-use/when-not guidance or named alternative, so the routing must be inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools