db_setup_scan
Scans server or local path for database credentials (e.g., .env, wp-config.php) to configure database tools without manual setup. Returns redacted previews and a token; password stays server-side.
Instructions
Discover an instance's DB credentials (from .env / DATABASE_URL / wp-config.php / docker env) to set up the db tools with no manual config. Reads the app config READ-ONLY over SSH on the box. Returns REDACTED previews + a staging token per candidate; the password is held server-side and never returned, so it can't leak into your context. Then call db_setup_save with the chosen token. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance_id | Yes | Instance ID, name, or custom-server name. | |
| search_path | No | Optional dir on the box to search (or a local .env path). Empty = scan common web roots. | |
| source | No | Where to scan: 'auto'/'ssh' read the box (default), 'local' reads search_path locally. | auto |