suggest_gsi
Generate a DynamoDB GSI definition (index name, partition key, projection type, billing mode) for a given table and attribute, checking existing indexes to avoid duplicates.
Instructions
Generates a ready-to-use DynamoDB GSI definition — index name, partition key, projection type, billing mode — for a given table and attribute. Call this when a query pattern needs an index that does not exist yet, or when the analyzer flags a missing GSI finding. Checks the table's existing indexes first: when one is already keyed on that attribute it returns alreadyIndexed: true with the existing index name to use as IndexName, instead of proposing a duplicate. Use get_table_schema for the full index list on a table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | DynamoDB table name | |
| attribute | Yes | Attribute to create the GSI on |