PgGuard Agent
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PGHOST | No | Database host. | 127.0.0.1 |
| PGPORT | No | Database port. | 5432 |
| PGUSER | No | Database user. | |
| PGSSLMODE | No | SSL mode. | disable |
| PGDATABASE | No | Database name. | |
| VAULT_ADDR | No | Vault address (required when PGGUARD_SECRETS_PROVIDER=vault). | |
| VAULT_TOKEN | No | Vault token (required when PGGUARD_SECRETS_PROVIDER=vault). | |
| PGGUARD_ROLE | No | Role selecting reader, writer, migrator, or admin (config/policy.yaml). | |
| PGGUARD_AUDIT_DIR | No | Directory for audit logs. | ./data/audit |
| PGGUARD_POLICY_PATH | No | Path to policy.yaml. | ./config/policy.yaml |
| PGGUARD_SECRETS_PROVIDER | No | Secrets provider: env or vault. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| db_healthA | Ping Postgres and return server version |
| list_schemasA | List non-system schemas |
| list_tablesA | List tables, optionally filtered by schema |
| describe_tableC | Describe columns for a table |
| run_selectA | Run a single SELECT (max rows enforced; read-only role preferred) |
| run_dmlA | INSERT/UPDATE/DELETE when role allows; requires confirm:true |
| run_ddlA | CREATE/ALTER/DROP for migrator/admin; requires confirm:true; optional dry_run |
| explain_queryC | EXPLAIN a query; ANALYZE optional and gated by policy |
| get_audit_tailA | Return last N append-only audit events |
| whoamiA | Current agent role and effective policy |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Each tool maps to a distinct operation: health check, schema inspection, row queries, DML, DDL, explain, audit, and role/policy lookup. Even though run_select and explain_query both accept queries, their purposes are clearly separated.
Most tools follow a clear verb_noun snake_case convention: list_schemas, list_tables, describe_table, run_select, explain_query, get_audit_tail. Minor deviations are db_health and whoami, which do not follow the verb_noun pattern but remain understandable.
Ten tools is well-scoped for a Postgres guard agent. Each tool serves a necessary purpose in the lifecycle of inspecting and safely modifying a database.
The tool surface covers health, schema discovery, SELECT/DML/DDL execution, query planning, auditing, and policy introspection. Minor gaps like explicit transaction control or listing roles/indexes are not critical, but could make some workflows more seamless.