seedfast_schema_info
Inspect a PostgreSQL database schema to list tables, columns, primary and foreign keys, and approximate row counts, enabling a precise scope for seeding test data.
Instructions
Introspects a PostgreSQL database schema — lists tables, columns, primary keys, foreign keys, and approximate row counts. Returns a JSON object with a tables array; each entry has name (schema-qualified), columns (name, data_type, nullable, default), primary_key, foreign_keys (columns, references_table, references_columns), and approximate_row_count. Row counts come from pg_class.reltuples and are APPROXIMATE — they may be stale between ANALYZEs and may be -1 on never-analyzed tables. Implementation invokes seedfast schema --json as a subprocess with a 30s timeout. Call this before writing a scope description — it helps you understand table relationships and size so you can craft a precise scope; especially useful for large databases where you want to target specific tables. Does not require SEEDFAST_API_KEY. The dsn argument is optional — when omitted, the server falls back to SEEDFAST_DSN or DATABASE_URL from its environment. Next: use the schema info to write a scope string, then call seedfast_plan with that scope. For scope-writing guidance, also request the scope-examples prompt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dsn | No | PostgreSQL connection string. When omitted, the MCP server falls back to SEEDFAST_DSN, then DATABASE_URL. |