Prerequisites
What are you trying to do that currently feels hard or impossible?
Currently, the list_tables command, particularly within the Postgres tools, returns null when there are no tables in the database. This behavior is unexpected; it should return an empty list ([]) instead. This inconsistency can lead to issues in how empty responses are handled by other tools or clients.
Suggested Solution(s)
Declare an empty slice in the postgreslisttables.go file (e.g., internal/tools/postgres/postgreslisttables/postgreslisttables.go#L231) to ensure an empty list is returned when no tables are found. This would align the behavior with expectations for empty responses.
Alternatives Considered
Return a message if no results are found.
Additional Details
No response
Prerequisites
What are you trying to do that currently feels hard or impossible?
Currently, the
list_tablescommand, particularly within the Postgres tools, returnsnullwhen there are no tables in the database. This behavior is unexpected; it should return an empty list ([]) instead. This inconsistency can lead to issues in how empty responses are handled by other tools or clients.Suggested Solution(s)
Declare an empty slice in the
postgreslisttables.gofile (e.g.,internal/tools/postgres/postgreslisttables/postgreslisttables.go#L231) to ensure an empty list is returned when no tables are found. This would align the behavior with expectations for empty responses.Alternatives Considered
Return a message if no results are found.
Additional Details
No response