Skip to main content
Glama

Suggest a DynamoDB GSI

suggest_gsi
Read-only

Generate a ready-to-use DynamoDB GSI definition for a table and attribute when a query needs a missing index; check existing indexes first and return one if already keyed, avoiding 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

NameRequiredDescriptionDefault
tableYesDynamoDB table name
attributeYesAttribute to create the GSI on

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, and the description is consistent — this only proposes a definition rather than mutating the table. It adds genuinely useful behavior beyond the annotations: it checks existing indexes first and returns alreadyIndexed: true with the existing index name instead of proposing a duplicate. It does not describe the non-duplicate return shape, which would have pushed this to a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: capability, trigger conditions, and idempotent-check behavior. The capability is front-loaded and the alternative is routed at the end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema present, the description correctly compensates by describing the alreadyIndexed return and its semantics for a duplicate attribute. It covers the common case well, though the full output shape for the success path is only partially implied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are documented in the schema, so the schema carries the load. The description implies the attribute is what gets keyed and the table is the target, but adds no syntax or format detail beyond the schema — baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource — generates a ready-to-use DynamoDB GSI definition — and enumerates what the output contains (index name, partition key, projection type, billing mode). It clearly separates itself from sibling get_table_schema by naming it as the tool for the full index list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit trigger conditions are given: when a query pattern needs an index that does not exist yet, or when the analyzer flags a missing GSI finding. It also names the alternative (get_table_schema) and the condition that selects it, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.