faucet_raw_sql
Run ad-hoc SQL statements against a Faucet database service to read or modify data, with positional parameters, row limits and query timeouts. Requires raw SQL enabled on the service.
Instructions
Execute a raw SQL query against a database service. Only available for services with raw_sql_allowed enabled. Use faucet_list_services to check which services allow raw SQL. Because arbitrary SQL can touch any object, it requires a role rule granting all verbs (GET, POST, PUT, PATCH, DELETE) on the _sql component of the service.
The statement is executed as-is and may modify data; it is refused on services flagged read_only. Parameters should be passed as an array and referenced with positional placeholders ($1, $2 for PostgreSQL; ?, ? for MySQL).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL query to execute | |
| limit | No | Maximum number of rows to return (default 100, max 10000) | |
| params | No | Positional parameters for the SQL query | |
| service | Yes | Name of the database service | |
| timeout | No | Query timeout in seconds (default 30) |