Skip to content

Conversation

@srividyareddy786
Copy link
Contributor

@srividyareddy786 srividyareddy786 commented Nov 25, 2025

Description

Adds the following tools for Postgres:
(1) list_pg_settings: List configuration parameters for the PostgreSQL server.
(2) list_database_stats: Lists the key performance and activity statistics for each database in the postgreSQL
server.

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

list_pg_settings:
Screenshot 2025-11-25 at 10 19 48 AM
Screenshot 2025-11-25 at 10 27 19 AM

list_database_stats:
Screenshot 2025-11-25 at 10 21 12 AM
Screenshot 2025-11-25 at 10 27 47 AM

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:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

🛠️ Fixes #<1738>

@srividyareddy786 srividyareddy786 marked this pull request as ready for review November 25, 2025 05:07
@srividyareddy786 srividyareddy786 requested a review from a team as a code owner November 25, 2025 05:07
@srividyareddy786 srividyareddy786 force-pushed the observabilitytools branch 2 times, most recently from 97ffcf5 to e371d68 Compare December 2, 2025 04:43
@srividyareddy786 srividyareddy786 requested review from a team as code owners December 2, 2025 04:43
@srividyareddy786 srividyareddy786 force-pushed the observabilitytools branch 2 times, most recently from 447e3ea to 3d12042 Compare December 2, 2025 05:25
@averikitsch averikitsch added the release candidate Use label to signal PR should be included in the next release. label Dec 3, 2025
func (t Tool) Invoke(ctx context.Context, resourceMgr tools.SourceProvider, params parameters.ParamValues, accessToken tools.AccessToken) (any, error) {
sliceParams := params.AsSlice()

results, err := t.pool.Query(ctx, ListDatabaseStats, sliceParams...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to log or throw an error if order by is not the right enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Updated the code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change does not validate "size" or "commit" enums for order by.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have approved but we may wan to improve this tool by ensuring the input from LLM will be inserted into the SQL

@averikitsch
Copy link
Contributor

/gcbrun

@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Dec 3, 2025
@github-actions github-actions bot removed tests: run Label to trigger Github Action tests. labels Dec 3, 2025
@averikitsch averikitsch added tests: run Label to trigger Github Action tests. docs: deploy-preview Label to trigger Github Action docs preview. labels Dec 3, 2025
@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label Dec 3, 2025
@averikitsch averikitsch added docs: deploy-preview Label to trigger Github Action docs preview. and removed docs: deploy-preview Label to trigger Github Action docs preview. labels Dec 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

…ublication-tables tool (googleapis#1919)

Adds a postgresql custom list_publication_tables tool, that returns the
details of publication tables present in database.

Test Output:

<img width="845" height="239" alt="Screenshot 2025-11-11 at 12 50 59 AM"
src="https://github.com/user-attachments/assets/b7606e44-c5f6-4fc7-865e-7efadd112eff"
/>

<img width="1529" height="648" alt="Screenshot 2025-11-11 at 1 15 18 AM"
src="https://github.com/user-attachments/assets/6192b772-f0bc-4fb4-8032-ca487434d77c"
/>

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

> 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 googleapis#1738

Co-authored-by: Averi Kitsch <[email protected]>
Co-authored-by: Wenxin Du <[email protected]>
@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Dec 5, 2025
@averikitsch
Copy link
Contributor

/gcbrun

@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: deploy-preview Label to trigger Github Action docs preview. release candidate Use label to signal PR should be included in the next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants