Recommend indexes
recommend_indexesIdentifies large PostgreSQL tables read mostly by sequential scans and recommends indexing candidates, with an option to bypass cache and re-read live after schema changes.
Instructions
Recommend tables that may benefit from indexing — large tables read mostly by sequential scan. Set fresh=true to bypass the cache and re-read live (e.g. after a schema change). Returns a list of objects with schema, table, live_tuples, sequential_scans, index_scans, and a reason explaining why the table is a candidate.
Example: recommend_indexes(min_live_tuples=10000)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "recommend_indexes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. | |
| min_live_tuples | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |