Skip to main content
Glama
Andrian17

mssql-mcp-server

by Andrian17

mssql_manage_triggers

List, create, drop, or enable/disable SQL Server DML triggers using simple operations.

Instructions

Manage SQL Server DML triggers - get, create, drop, and enable/disable triggers. Examples: operation="get" to list triggers, operation="create" with triggerName, tableName and triggerBody (or functionName to EXEC a procedure), operation="set_state" with triggerName, tableName, enable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
whenNoNot supported by SQL Server; rejected when supplied
enableNoWhether to enable the trigger (required for set_state operation)
eventsNoTrigger events (TRUNCATE is rejected)
schemaNoSchema name (defaults to dbo)
timingNoTrigger timing (BEFORE is rejected: SQL Server has no BEFORE triggers)AFTER
cascadeNoAccepted for compatibility; no effect
forEachNoSQL Server triggers are statement-level; ROW is rejectedSTATEMENT
replaceNoUse CREATE OR ALTER
ifExistsNoInclude IF EXISTS clause (for drop operation)
operationYesOperation: get (list triggers), create (new trigger), drop (remove trigger), set_state (enable/disable trigger)
tableNameNoTable name (optional filter for get, required for create/set_state)
triggerBodyNoTrigger body T-SQL (required for create unless functionName is given)
triggerNameNoTrigger name (required for create/drop/set_state)
functionNameNoStored procedure to EXEC as the trigger body (alternative to triggerBody)
connectionStringNoSQL Server connection string (optional; requires --allow-tool-connection-string)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. It does disclose the major behaviors: list, create, drop, and enable/disable, and mentions that create can 'EXEC a procedure' as the trigger body. However, it does not describe side effects such as the permanence of drops, required permissions, whether changes persist immediately, or what the operation returns.

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

Conciseness5/5

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

The description is two sentences, front-loads the core purpose, and packs the operation examples into a compact, scannable format. Every clause earns its place without unnecessary filler.

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?

The description plus the detailed schema covers operation selection and parameter usage well, including SQL Server incompatibilities in the schema. However, there is no output schema, and the description does not explain return values, error behavior, or prerequisites/permissions, which leaves the agent with some uncertainty for a tool that can create and drop database objects.

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 description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by specifying operation-specific parameter groupings, e.g. 'create' requires triggerName, tableName, and triggerBody (or functionName), and 'set_state' requires triggerName, tableName, and enable. This helps an agent assemble correct calls.

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 resource ('SQL Server DML triggers') and enumerates the exact operations: 'get, create, drop, and enable/disable triggers.' This clearly distinguishes it from sibling tools like mssql_manage_indexes or mssql_manage_functions.

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

Usage Guidelines4/5

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

The description provides concrete usage patterns via examples: 'operation="get" to list triggers', 'operation="create" with triggerName, tableName and triggerBody', and 'operation="set_state" with triggerName, tableName, enable'. This gives clear context for when to use each operation, though it does not explicitly state exclusions or alternatives.

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