Skip to main content
Connect PlanetScale for read-only querying during investigations.Your agent can inspect the current setup, prepare the connection and test access. You choose the account and resource scope, approve provider consent when needed, and authorize any required grants.
Connect PlanetScale so Struct Agent can query application data during investigations. Use the documented read access and verify the selected database and connection type.

Inspect access and existing connections

Use a claimed workspace with permission to configure connections.
Use the catalog’s current fields, choices and permission requirements. Reuse an existing healthy connection instead of creating a duplicate.

Connect with the CLI

Supply credentials from approved secret storage through PLANETSCALE_PASSWORD. The catalog describes which are needed for the selected authentication method. Do not put literal secrets in shell arguments or chat.Replace example values with the intended resource:
Create a read-only password for the selected branch and supply it through PLANETSCALE_PASSWORD. The engine defaults to Postgres (port 6432); use --engine vitess for MySQL (port 3306). SSH tunnels support the Postgres engine only. Use --test-only and inspect ok before saving when testing credentials.

Verify and recover

Use the returned connection ID:
Inspect ok, health and missing permissions, not only the exit code. struct connections grant-command CONNECTION_ID prints repair instructions where supported; have an authorized operator apply them. For expired OAuth links, start the connection command again and use the new link. Do not reconnect to a different account silently.Verify a bounded operation for the requested job. Connection health proves checked access; it does not prove telemetry arrival, an investigation or alert delivery.

What Struct does with it

Answers data questions during investigations and measures the impact of Issues with live queries you can inspect.

Permissions

Create a read-only credential (Postgres: a role inheriting pg_read_all_data; Vitess: a password with the reader role) and provide its host, database, username and password.

Read-only queries

Answer data questions during investigations and measure the impact of open issues.
  • On the Postgres engine, pg_read_all_data reads every table in every database on the branch. To limit Struct to the schemas you choose, create the role without it and grant USAGE and SELECT on those schemas, as in the PostgreSQL setup.

How to grant

Replace the values in angle brackets.Permission catalog version 2026-11-04.1. See permission changes.