com um clique
alloydb-postgres-data
// Use these skills when you need to explore the database schema, identify objects like views and triggers, and execute custom SQL queries to interact with your data.
// Use these skills when you need to explore the database schema, identify objects like views and triggers, and execute custom SQL queries to interact with your data.
Use these skills when you need to manage database users, inspect permissions and roles, and verify global configuration parameters related to security and access control.
Use these skills when you need to provision new AlloyDB clusters and instances, monitor their creation status, and retrieve high-level configuration or health data for the environment.
Use these skills when you need to optimize storage, identify index issues, analyze table statistics, or manage autovacuum and tablespace configurations to maintain peak database health.
Use these skills when you need to troubleshoot slow performance, analyze query execution plans, identify resource-heavy processes, and monitor system-level PromQL metrics.
Use these skills when you need to discover and manage PostgreSQL extensions or fine-tune engine-level settings such as memory allocation and server configuration parameters.
Use these skills when you need to monitor replication health, manage sync states between nodes, and ensure the high availability and data distribution of your AlloyDB cluster.
| name | alloydb-postgres-data |
| description | Use these skills when you need to explore the database schema, identify objects like views and triggers, and execute custom SQL queries to interact with your data. |
All scripts can be executed using Node.js. Replace <param_name> and <param_value> with actual values.
Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'
PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
Use this tool to execute a single SQL statement.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| sql | string | The sql to execute. | Yes |
Lists available user indexes in the database, excluding system schemas (pg_catalog, information_schema). For each index, the following properties are returned: schema name, table name, index name, index type (access method), a boolean indicating if it's a unique index, a boolean indicating if it's for a primary key, the index definition, index size in bytes, the number of index scans, the number of index tuples read, the number of table tuples fetched via index scans, and a boolean indicating if the index has been used at least once.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| schema_name | string | Optional: a text to filter results by schema name. The input is used within a LIKE clause. | No | `` |
| table_name | string | Optional: a text to filter results by table name. The input is used within a LIKE clause. | No | `` |
| index_name | string | Optional: a text to filter results by index name. The input is used within a LIKE clause. | No | `` |
| only_unused | boolean | Optional: If true, only returns indexes that have never been used. | No | false |
| limit | integer | Optional: The maximum number of rows to return. Default is 50 | No | 50 |
Lists all schemas in the database ordered by schema name and excluding system and temporary schemas. It returns the schema name, schema owner, grants, number of functions, number of tables and number of views within each schema.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| schema_name | string | Optional: A specific schema name pattern to search for. | No | `` |
| owner | string | Optional: A specific schema owner name pattern to search for. | No | `` |
| limit | integer | Optional: The maximum number of schemas to return. | No | 10 |
Lists sequences in the database. 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 the sequence in the current session
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| schema_name | string | Optional: A specific schema name pattern to search for. | No | `` |
| sequence_name | string | Optional: A specific sequence name pattern to search for. | No | `` |
| limit | integer | Optional: The maximum number of rows to return. Default is 50 | No | 50 |
Retrieves stored procedure metadata returning schema name, procedure name, procedure owner, language, definition, and description, filtered by optional role name (procedure owner), schema name, and limit (default 20).
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| role_name | string | Optional: The owner name to filter the stored procedures by. Defaults to NULL. | No | |
| schema_name | string | Optional: The schema name to filter the stored procedures by. Defaults to NULL. | No | |
| limit | integer | Optional: The maximum number of stored procedures to return. Defaults to 20. | No | 20 |
Lists detailed schema information (object type, columns, constraints, indexes, triggers, owner, comment) as JSON for user-created tables (ordinary or partitioned). Filters by a comma-separated list of names. If names are omitted, lists all tables in user schemas.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| table_names | string | Optional: A comma-separated list of table names. If empty, details for all tables will be listed. | No | `` |
| output_format | string | Optional: Use 'simple' for names only or 'detailed' for full info. | No | detailed |
Lists all non-internal triggers in a database. Returns trigger name, schema name, table name, whether its enabled or disabled, timing (e.g BEFORE/AFTER of the event), the events that cause the trigger to fire such as INSERT, UPDATE, or DELETE, whether the trigger activates per ROW or per STATEMENT, the handler function executed by the trigger and full definition.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| trigger_name | string | Optional: A specific trigger name pattern to search for. | No | `` |
| schema_name | string | Optional: A specific schema name pattern to search for. | No | `` |
| table_name | string | Optional: A specific table name pattern to search for. | No | `` |
| limit | integer | Optional: The maximum number of rows to return. | No | 50 |
Lists views in the database from pg_views with a default limit of 50 rows. Returns schemaname, viewname, ownername and the definition.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| view_name | string | Optional: A specific view name to search for. | No | `` |
| schema_name | string | Optional: A specific schema name to search for. | No | `` |
| limit | integer | Optional: The maximum number of rows to return. | No | 50 |