query_table
Query a DynamoDB table using key conditions to find matching items by primary key or index keys, returning sorted results with pagination support.
Instructions
Query a DynamoDB table using key conditions to find matching items.
Queries are efficient because they use the table's primary key or GSI/LSI keys. Results are returned sorted by sort key. Optional filter expressions can further refine results (but don't reduce read capacity consumed).
When to use:
To find items by primary key (partition key + optional sort key condition)
To find items using a GSI or LSI
When you know the partition key value
When NOT to use:
When you don't know the partition key (use scan_table instead)
For full-table searches (use scan_table with filter)
Returns: Items matching the query with count, scanned_count, and pagination key. Format controlled by 'format' parameter (json or markdown).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |