Files
genai-toolbox/docs/en/resources/tools/postgres/postgres-list-sequences.md
Yuan Teoh 735cb760ea docs: update long lines and tables (#1952)
Update long lines and tables formatting in markdown doc files.
2025-11-14 20:25:49 +00:00

2.4 KiB

title, type, weight, description, aliases
title type weight description aliases
postgres-list-sequences docs 1 The "postgres-list-sequences" tool lists sequences in a Postgres database.
/resources/tools/postgres-list-sequences

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

field type required description
kind string true Must be "postgres-list-sequences".
source string true Name of the source the SQL should execute on.
description string false Description of the tool that is passed to the agent.