Files
genai-toolbox/docs/en/resources/tools/postgres/postgres-database-overview.md
Srividya Reddy a4c9287aec feat(tools/postgres): add list_triggers, database_overview tools for postgres (#1912)
## Description

Adds the following tools for Postgres:
(1) list_triggers: Lists triggers in the database. .
(2) database_overview: Fetches the current state of the PostgreSQL
server.

list_triggers:
<img width="1712" height="703" alt="Screenshot 2025-11-09 at 8 16 53 PM"
src="https://github.com/user-attachments/assets/1974e303-b559-4efc-b129-444ba97c7715"
/>

<img width="874" height="513" alt="Screenshot 2025-11-09 at 8 19 43 PM"
src="https://github.com/user-attachments/assets/59ddcd15-224b-4e9a-906d-ec2645835873"
/>

database_overview:

<img width="1521" height="683" alt="Screenshot 2025-11-09 at 8 53 03 PM"
src="https://github.com/user-attachments/assets/4ae86e74-aa78-410c-a9cc-f33ae3268fb6"
/>

<img width="850" height="241" alt="Screenshot 2025-11-09 at 8 49 53 PM"
src="https://github.com/user-attachments/assets/abae2c7a-5f3e-4433-86de-3606e3298ec5"
/>


> Should include a concise description of the changes (bug or feature),
it's
> impact, along with a summary of the solution

## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [x] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [x] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
- [x] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #1738
2025-11-12 14:35:23 -08:00

2.1 KiB

title, type, weight, description, aliases
title type weight description aliases
postgres-database-overview docs 1 The "postgres-database-overview" fetches the current state of the PostgreSQL server.
/resources/tools/postgres-database-overview

About

The postgres-database-overview fetches the current state of the PostgreSQL server. It's compatible with any of the following sources:

postgres-database-overview fetches the current state of the PostgreSQL server This tool does not take any input parameters.

Example

tools:
  database_overview:
    kind: postgres-database-overview
    source: cloudsql-pg-source
    description: |
    fetches the current state of the PostgreSQL server. It returns the postgres version, whether it's a replica, uptime duration, maximum connection limit, number of current connections, number of active connections and the percentage of connections in use.

The response is a JSON object with the following elements:

{
 "pg_version": "PostgreSQL server version string",
 "is_replica": "boolean indicating if the instance is in recovery mode",
 "uptime": "interval string representing the total server uptime",
 "max_connections": "integer maximum number of allowed connections",
 "current_connections": "integer number of current connections",
 "active_connections": "integer number of currently active connections",
 "pct_connections_used": "float percentage of max_connections currently in use"
}

Reference

field type required description
kind string true Must be "postgres-database-overview".
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.