postgres-list-sequences

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

About

The postgres-list-sequences tool retrieves information about sequences in a Postgres database. It’s compatible with any of the following sources:

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

  • sequencename (optional): A text to filter results by sequence name. The input is used within a LIKE clause. Default: ""
  • schemaname (optional): A text to filter results by schema name. The input is used within a LIKE clause. Default: ""
  • limit (optional): The maximum number of rows to return. Default: 50.

Example

tools:
  list_indexes:
    kind: postgres-list-sequences
    source: postgres-source
    description: |
        Lists all the sequences in the database ordered by sequence name.
        Returns sequence name, schema name, sequence owner, data type of the
        sequence, starting value, minimum value, maximum value of the sequence,
        the value by which the sequence is incremented, and the last value
        generated by generated by the sequence in the current session.

The response is a json array with the following elements:

{
    "sequencename": "sequence name",
    "schemaname": "schema name",
    "sequenceowner": "owner of the sequence",
    "data_type": "data type of the sequence",
    "start_value": "starting value of the sequence",
    "min_value": "minimum value of the sequence",
    "max_value": "maximum value of the sequence",
    "increment_by": "increment value of the sequence",
    "last_value": "last value of the sequence"
}

Reference

fieldtyperequireddescription
kindstringtrueMust be “postgres-list-sequences”.
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)