Skip to main content
Glama
HenkDz

PostgreSQL MCP Server

pg_manage_triggers

Manage PostgreSQL triggers by listing, creating, removing, or enabling/disabling them on database tables to automate data operations.

Instructions

Manage PostgreSQL triggers - get, create, drop, and enable/disable triggers. Examples: operation="get" to list triggers, operation="create" with triggerName, tableName, functionName, operation="drop" with triggerName and tableName, operation="set_state" with triggerName, tableName, enable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesOperation: get (list triggers), create (new trigger), drop (remove trigger), set_state (enable/disable trigger)
schemaNoSchema name (defaults to public)
tableNameNoTable name (optional filter for get, required for create/drop/set_state)
triggerNameNoTrigger name (required for create/drop/set_state)
functionNameNoFunction name (required for create operation)
timingNoTrigger timing (for create operation, defaults to AFTER)
eventsNoTrigger events (for create operation, defaults to ["INSERT"])
forEachNoFOR EACH ROW or STATEMENT (for create operation, defaults to ROW)
whenNoWHEN clause condition (for create operation)
replaceNoWhether to replace trigger if exists (for create operation)
ifExistsNoInclude IF EXISTS clause (for drop operation)
cascadeNoInclude CASCADE clause (for drop operation)
enableNoWhether to enable the trigger (required for set_state operation)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions operations like create, drop, and set_state, which imply mutations, but fails to describe critical behaviors such as permissions needed, whether changes are reversible, error handling, or side effects (e.g., cascade drops). This leaves significant gaps for a tool with multiple mutation operations.

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?

The description is front-loaded with the core purpose and includes examples that are directly relevant. However, the example list is somewhat lengthy and could be streamlined. Most sentences earn their place by clarifying usage, but there is minor redundancy in parameter mentions.

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

Completeness2/5

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

Given the complexity (14 parameters, multiple mutation operations) and lack of annotations and output schema, the description is incomplete. It does not cover behavioral aspects like authentication needs, rate limits, or return formats, which are crucial for safe and effective use. This is inadequate for a tool with such scope and potential impact.

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 description coverage is 100%, so the schema already documents all 14 parameters thoroughly. The description adds minimal value by listing some parameters in examples (e.g., triggerName, tableName for operations), but does not provide additional semantics beyond what the schema offers. This meets the baseline for high schema coverage.

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 clearly states the tool manages PostgreSQL triggers with specific verbs (get, create, drop, enable/disable) and distinguishes it from siblings like pg_manage_functions or pg_manage_constraints by focusing exclusively on triggers. It provides concrete examples of operations, making the purpose highly specific and actionable.

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 offers clear context on when to use each operation (e.g., operation='get' to list triggers, operation='create' with specific parameters), but it does not explicitly state when not to use this tool or mention alternatives among siblings. The examples provide implicit guidance, though explicit exclusions or comparisons are missing.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HenkDz/postgresql-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server