postgres-list-triggers

The “postgres-list-triggers” tool lists triggers in a Postgres database.

About

The postgres-list-triggers tool lists available non-internal triggers in the database. It’s compatible with any of the following sources:

postgres-list-triggers lists detailed information as JSON for triggers. The tool takes the following input parameters:

  • trigger_name (optional): A text to filter results by trigger name. The input is used within a LIKE clause. Default: ""
  • schema_name (optional): A text to filter results by schema name. The input is used within a LIKE clause. Default: ""
  • table_name (optional): A text to filter results by table name. The input is used within a LIKE clause. Default: ""
  • limit (optional): The maximum number of triggers to return. Default: 50

Example

```yaml
tools:
  list_triggers:
    kind: postgres-list-triggers
    source: postgres-source
    description: |
        Lists all non-internal triggers in a database. Returns trigger name, schema name, table name, wether its enabled or disabled,  timing (e.g BEFORE/AFTER of the event), the  events that cause the trigger to fire such as INSERT, UPDATE, or DELETE, whether the trigger activates per ROW or per STATEMENT, the handler function executed by the trigger and full definition.

The response is a json array with the following elements:

{
 "trigger_name": "trigger name",
 "schema_name": "schema name",
 "table_name": "table name",
 "status": "Whether the trigger is currently active (ENABLED, DISABLED, REPLICA, ALWAYS).",
 "timing": "When it runs relative to the event (BEFORE, AFTER, INSTEAD OF).",
 "events": "The specific operations that fire it (INSERT, UPDATE, DELETE, TRUNCATE)",
 "activation_level": "Granularity of execution (ROW vs STATEMENT).",
 "function_name": "The function it executes",
 "definition": "Full SQL definition of the trigger"
}

Reference

fieldtyperequireddescription
kindstringtrueMust be “postgres-list-triggers”.
sourcestringtrueName of the source the SQL should execute on.
descriptionstringfalseDescription of the tool that is passed to the agent.
Last modified November 13, 2025: chore(main): release 0.20.0 (#1921) (5156db2)