library/postgres
v0.1.3 SignedHardened PostgreSQL access for AI agents — capability-gated, tiered, bounded
Install
act pull actpkg.dev/library/postgres Capabilities
Elevated host access
Requests: Scoped capability · Privileged operation · Raw sockets (scoped).
- db:ddl Scoped capability
Change schema (CREATE, ALTER, GRANT, REVOKE, ...).
- db:drop Privileged operation
Destructive operations (DROP, TRUNCATE).
- db:read Scoped capability
Read data (SELECT, EXPLAIN, SHOW, schema introspection).
- db:write Privileged operation
Modify rows (INSERT, UPDATE, DELETE, MERGE, COPY ... FROM).
- wasi:sockets Raw sockets (scoped)
*:5432,5433,5434,6432
Tools · 6
act:tools interface — expand a tool for its input schema.
query Execute a read-only SQL query (SELECT/CTE) and return rows. Rejected if it is not read-only or exceeds the session mode.
Execute a read-only SQL query (SELECT/CTE) and return rows. Rejected if it is not read-only or exceeds the session mode.
Parameter Type Description sql* string A single read-only SQL statement. params array | null Bind values for $1, $2, ... (optional). max_rows integer | null Override the session's default row cap (optional). Returns content.
execute Execute a write/DDL SQL statement (INSERT/UPDATE/DELETE/CREATE/...). Each statement is classified and checked against the session mode.
Execute a write/DDL SQL statement (INSERT/UPDATE/DELETE/CREATE/...). Each statement is classified and checked against the session mode.
Parameter Type Description sql* string A single SQL statement. params array | null Bind values for $1, $2, ... (optional). Returns content.
list_schemas List non-system schemas in the database.
List non-system schemas in the database.
No input parameters.
Returns content.
list_tables List tables and views in a schema (default 'public').
List tables and views in a schema (default 'public').
Parameter Type Description schema string | null Schema to inspect. Defaults to 'public'. Returns content.
describe_table Describe a table: columns, types, nullability, defaults.
Describe a table: columns, types, nullability, defaults.
Parameter Type Description table* string Table name. schema string | null Schema. Defaults to 'public'. Returns content.
explain_query Return the query plan via EXPLAIN. analyze=false (default) does NOT execute the query; analyze=true requires the statement's tier.
Return the query plan via EXPLAIN. analyze=false (default) does NOT execute the query; analyze=true requires the statement's tier.
Parameter Type Description sql* string SQL statement to explain. format string | null Output format: text | json. Default text. analyze boolean | null Run EXPLAIN ANALYZE (executes the query). Default false. Returns content.
Readme
No README provided.