Skip to main content
Glama

sql-target-add

Destructive

Add or replace a SQL task target by specifying the server, instance or database, credentials, time window, notifications, and output so runs execute and report correctly.

Instructions

dbabrain common.cli sql-target-add: A SQL task's WHERE and WHEN. 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):

  • sql_id (required): The task.

  • server_id (required): The machine.

  • target_no: The target number.

  • instance_name: The instance.

  • service_name: A label.

  • database_name: One database.

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

  • sql_access: How to reach the SQL engine, overriding the instance's block.

  • time_window: When it runs.

  • manual_only: Only when asked for.

  • notify: Who hears about it.

  • logging_on_run: The flat form: send a message when each run starts, to logging_chat. A boolean - the parser reads it as one; the whole block goes under notify. Described as an object until 0.27.0, so R49 refused the form the command'...

  • alert_on_error: The flat form: send a message when a run fails, to error_chat. A boolean - the parser reads it as one; the whole block goes under notify. Described as an object until 0.27.0, so R49 refused the form the command's own ...

  • logging_chat: Progress chat level.

  • logging_chat_id: Or a chat id.

  • error_chat: Failure chat level.

  • error_chat_id: Or a chat id.

  • output: What it does with its result set.

  • output_chat: Where the result goes.

  • output_chat_id: Or a chat id.

  • output_max_rows: Rows sent to a chat.

  • active: Switched on.

  • note: Why it exists.

  • replace: Overwrite this target.

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": "sql-target-add"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, and the description adds genuine context: the confirm: "yes" plus reason requirement, and version-compat notes about the object-vs-boolean form of logging_on_run/alert_on_error. However, "Changes or removes something" is vague and does not explain what specifically is overwritten when replace is set.

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

Conciseness2/5

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

The bulleted field list is scannable, but two entries are literally cut off mid-sentence ("...the form the command'...") and carry changelog trivia about 0.27.0 and R49 that does not help the agent call the tool. The front-loaded line is vague where it should be sharpest.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex, open-schema tool with ~24 fields, the description does cover the full field surface and the confirm requirement, and an output schema exists so return values need not be described. Gaps remain: the core add-vs-replace behavior is unexplained and two parameter descriptions are truncated.

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 0% (a bare generic object), so the description carries the full burden and does enumerate all ~24 fields with short meanings. But many entries are cryptic ("The task.", "The machine.", "A label.") and two fields are truncated with "...", leaving the reason and validation rule for the boolean form incomplete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description defines what a target is ("A SQL task's WHERE and WHEN") and implies creation via the "replace" field, but never states the actual verb "add a target to a SQL task." The generic line "Changes or removes something" substitutes for a specific purpose statement and does not distinguish this from sibling tools like add-sql or sql-command-add.

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

Usage Guidelines2/5

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

No guidance on when to use this versus alternatives, and no prerequisites for adding a target. The one piece of useful invocation guidance is the confirm/reason requirement for emergency-operations commands, but that is conditional and does not tell the agent when this tool is the right choice.

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