dynamodb
v0.2.7MCP server for AWS DynamoDB with fine-grained tool control and configurable access levels.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_tables
List all DynamoDB tables in the configured AWS region. Returns a list of table names with optional pagination support. **Returns:** - tableNames: Array of table name strings - lastEvaluatedTableName: Name to use for pagination (if more tables exist) **Use cases:** - Discover available tables in the account - Enumerate tables for backup or migration operations - Check if a specific table exists **Note:** Results are paginated. Use lastEvaluatedTableName with exclusiveStartTableName for large table lists.
| Parameter | Type | Description |
|---|---|---|
exclusiveStartTableName | string | Name of the last evaluated table from a previous request. Use for pagination. |
limit | number | Maximum number of tables to return (1-100). Default: 100 |
describe_table
Get detailed information about a DynamoDB table. Returns comprehensive metadata including key schema, indexes, provisioned throughput, and table status. **Returns:** - tableName: Table name - tableStatus: Current status (ACTIVE, CREATING, UPDATING, DELETING) - keySchema: Primary key definition (hash and range keys) - attributeDefinitions: Attribute types for key schema - billingMode: PAY_PER_REQUEST or PROVISIONED - provisionedThroughput: Read/write capacity (if provisioned) - globalSecondaryIndexes: GSI definitions and status - localSecondaryIndexes: LSI definitions - itemCount: Approximate…
| Parameter | Type | Description |
|---|---|---|
tableName * | string | Name of the DynamoDB table to describe |
get_item
Retrieve a single item from a DynamoDB table by its primary key. Performs a direct lookup using the item's primary key for fast, efficient reads. **Returns:** - item: The retrieved item as a JSON object, or undefined if not found **Use cases:** - Fetch a specific user record by ID - Retrieve configuration by key - Look up a transaction by ID - Get the latest version of a document **Note:** This is the most efficient way to retrieve a single item. Use Query for multiple items with the same partition key.
| Parameter | Type | Description |
|---|---|---|
key * | object | Primary key of the item to retrieve. Object with partition key (and sort key if table has one). Example: {"userId": "123"} or {"userId": "123", "timestamp": 1234567890} |
tableName * | string | Name of the DynamoDB table |
query_items
Query items from a DynamoDB table using key conditions. Efficiently retrieves multiple items that share the same partition key, with optional sort key conditions. **Returns:** - items: Array of matching items - count: Number of items returned - scannedCount: Number of items evaluated (before filtering) - lastEvaluatedKey: Key for pagination (if more results exist) **Use cases:** - Get all orders for a customer - Retrieve messages in a time range - Find products in a category with price filters - Paginate through large result sets **Note:** Query is more efficient than Scan. Always prefer Q…
| Parameter | Type | Description |
|---|---|---|
expressionAttributeValues * | object | Values for expression placeholders. Example: {":uid": "123", ":start": 1000, ":end": 2000} |
keyConditionExpression * | string | Key condition expression. Must include partition key condition. Example: "userId = :uid" or "userId = :uid AND timestamp BETWEEN :start AND :end" |
tableName * | string | Name of the DynamoDB table |
exclusiveStartKey | object | Primary key of the item to start after (for pagination) |
expressionAttributeNames | object | Substitutions for reserved words in expressions. Example: {"#status": "status"} |
filterExpression | string | Filter expression to apply after query. Example: "#status = :active" |
indexName | string | Name of a secondary index to query instead of the main table |
limit | number | Maximum number of items to evaluate (not necessarily return due to filters) |
projectionExpression | string | Comma-separated list of attributes to retrieve. Example: "userId, name, email" |
scanIndexForward | boolean | true for ascending order, false for descending. Default: true |
scan_table
Scan all items in a DynamoDB table with optional filtering. Reads every item in the table and applies optional filters. Use with caution on large tables. **Returns:** - items: Array of items (after filtering) - count: Number of items returned - scannedCount: Number of items evaluated (before filtering) - lastEvaluatedKey: Key for pagination (if more results exist) **Use cases:** - Export all data from a table - Find items when partition key is unknown - Perform analytics on entire dataset - One-time data migrations **Warning:** Scan reads every item in the table, consuming significant read…
| Parameter | Type | Description |
|---|---|---|
tableName * | string | Name of the DynamoDB table |
exclusiveStartKey | object | Primary key of the item to start after (for pagination) |
expressionAttributeNames | object | Substitutions for reserved words in expressions. Example: {"#status": "status"} |
expressionAttributeValues | object | Values for expression placeholders. Example: {":active": "ACTIVE", ":minAge": 18} |
filterExpression | string | Filter expression to apply. Example: "#status = :active AND age > :minAge" |
limit | number | Maximum number of items to evaluate (not necessarily return due to filters) |
projectionExpression | string | Comma-separated list of attributes to retrieve. Example: "userId, name, email" |
batch_get_items
Retrieve multiple items from one or more DynamoDB tables in a single request. Efficiently fetches up to 100 items across multiple tables using their primary keys. **Returns:** - responses: Map of table names to arrays of retrieved items - unprocessedKeys: Keys that could not be processed (retry these) **Use cases:** - Fetch multiple user profiles at once - Load related data from different tables - Resolve references in batch **Note:** Maximum 100 items per request. Unprocessed keys should be retried with exponential backoff.
| Parameter | Type | Description |
|---|---|---|
requestItems * | object | Map of table names to keys to retrieve. Each table entry contains an array of keys. Example: {"Users": {"keys": [{"userId": "1"}, {"userId": "2"}]}, "Orders": {"keys": [{"orderId": "abc"}]}} |
put_item
Create a new item or replace an existing item in a DynamoDB table. Writes the entire item. If an item with the same primary key exists, it will be completely replaced. **Returns:** - attributes: Previous item values (if returnValues is "ALL_OLD" and item existed) **Use cases:** - Create a new user record - Store configuration settings - Save document versions - Update entire records **Note:** PutItem replaces the entire item. Use UpdateItem to modify specific attributes without affecting others.
| Parameter | Type | Description |
|---|---|---|
item * | object | The item to put. Must include primary key attributes. Example: {"userId": "123", "name": "John", "email": "john@example.com"} |
tableName * | string | Name of the DynamoDB table |
conditionExpression | string | Condition that must be satisfied for the put to succeed. Example: "attribute_not_exists(userId)" to prevent overwrites |
expressionAttributeNames | object | Substitutions for reserved words in condition. Example: {"#status": "status"} |
expressionAttributeValues | object | Values for condition expression placeholders. Example: {":expected": "PENDING"} |
returnValues | string | What to return: "NONE" (default) or "ALL_OLD" (previous item if overwritten) |
update_item
Update specific attributes of an existing item in a DynamoDB table. Modifies only the specified attributes, leaving other attributes unchanged. Creates the item if it doesn't exist (upsert behavior). **Update Expression Actions:** - SET: Add or modify attributes. Example: "SET #name = :val" - REMOVE: Delete attributes. Example: "REMOVE #oldAttr" - ADD: Increment numbers or add to sets. Example: "ADD #count :one" - DELETE: Remove elements from sets. Example: "DELETE #tags :tagToRemove" **Returns:** - attributes: Item values based on returnValues setting **Use cases:** - Increment counters a…
| Parameter | Type | Description |
|---|---|---|
key * | object | Primary key of the item to update. Example: {"userId": "123"} |
tableName * | string | Name of the DynamoDB table |
updateExpression * | string | Update expression defining modifications. Use SET, REMOVE, ADD, DELETE actions. Example: "SET #name = :newName, #count = #count + :inc REMOVE #oldAttr" |
conditionExpression | string | Condition that must be satisfied for the update to succeed. Example: "attribute_exists(userId)" |
expressionAttributeNames | object | Substitutions for reserved words or attribute names. Example: {"#name": "name", "#count": "viewCount"} |
expressionAttributeValues | object | Values for expression placeholders. Example: {":newName": "John Doe", ":inc": 1} |
returnValues | string | What to return: "NONE", "UPDATED_OLD", "UPDATED_NEW", "ALL_OLD", or "ALL_NEW". Default: "NONE" |
delete_item
Delete a single item from a DynamoDB table by its primary key. Removes the item if it exists. Succeeds silently if the item doesn't exist (unless conditionExpression fails). **Returns:** - attributes: The deleted item's attributes (if returnValues is "ALL_OLD" and item existed) **Use cases:** - Remove a user account - Delete expired sessions - Clean up temporary records - Remove processed queue items **Note:** Use conditionExpression to ensure you only delete items in expected states (e.g., "attribute_exists(userId)").
| Parameter | Type | Description |
|---|---|---|
key * | object | Primary key of the item to delete. Example: {"userId": "123"} or {"userId": "123", "timestamp": 1234567890} |
tableName * | string | Name of the DynamoDB table |
conditionExpression | string | Condition that must be satisfied for the delete to succeed. Example: "#status = :inactive" |
expressionAttributeNames | object | Substitutions for reserved words in condition. Example: {"#status": "status"} |
expressionAttributeValues | object | Values for condition expression placeholders. Example: {":inactive": "INACTIVE"} |
returnValues | string | What to return: "NONE" (default) or "ALL_OLD" (deleted item) |
batch_write_items
Write or delete multiple items across one or more DynamoDB tables in a single request. Efficiently performs up to 25 put or delete operations across multiple tables. **Returns:** - unprocessedItems: Requests that could not be processed (retry these) **Use cases:** - Bulk import data - Clean up multiple records - Sync data across tables - Process batch operations atomically **Note:** Maximum 25 items per request, each item up to 400KB. BatchWriteItem does not support conditional writes or returning old values. Unprocessed items should be retried with exponential backoff.
| Parameter | Type | Description |
|---|---|---|
requestItems * | object | Map of table names to write requests. Each table entry contains an array of PutRequest or DeleteRequest objects. Example: {"Users": [{"putRequest": {"item": {"userId": "1", "name": "John"}}}, {"delete… |
create_table
Create a new DynamoDB table. Creates a table with the specified primary key schema and billing mode. **Key Schema:** - HASH key (partition key): Required. Determines data distribution. - RANGE key (sort key): Optional. Enables range queries within a partition. **Attribute Types:** - S: String - N: Number (stored as string, supports arbitrary precision) - B: Binary (base64-encoded) **Returns:** - tableName: Name of created table - tableStatus: Initial status (usually CREATING) **Use cases:** - Set up new application tables - Create tables for different environments - Provision test fixture…
| Parameter | Type | Description |
|---|---|---|
attributeDefinitions * | array | Attribute type definitions for key schema attributes. Array of {attributeName, attributeType}. Types: "S" (String), "N" (Number), "B" (Binary). Example: [{"attributeName": "userId", "attributeType": "… |
keySchema * | array | Primary key schema. Array of {attributeName, keyType}. Must have one HASH key, optionally one RANGE key. Example: [{"attributeName": "userId", "keyType": "HASH"}, {"attributeName": "timestamp", "keyTy… |
tableName * | string | Name of the table to create (3-255 characters) |
billingMode | string | "PAY_PER_REQUEST" for on-demand or "PROVISIONED" for fixed capacity. Default: PAY_PER_REQUEST |
provisionedThroughput | object | Required if billingMode is PROVISIONED. Object with readCapacityUnits and writeCapacityUnits. Example: {"readCapacityUnits": 5, "writeCapacityUnits": 5} |
delete_table
Delete a DynamoDB table and all its data. **WARNING:** This is a destructive operation. All data in the table will be permanently deleted. **Returns:** - tableName: Name of deleted table - tableStatus: Status after deletion (usually DELETING) **Use cases:** - Clean up test tables - Remove deprecated tables - Environment teardown **Note:** - Table deletion is asynchronous. The table may take a few minutes to fully delete. - You cannot delete a table that is currently being created or updated. - Once deleted, data cannot be recovered unless you have backups.
| Parameter | Type | Description |
|---|---|---|
tableName * | string | Name of the table to delete |
update_table
Update a DynamoDB table's settings. Modify table billing mode and provisioned capacity settings. **Supported Updates:** - Switch between PAY_PER_REQUEST and PROVISIONED billing modes - Adjust read/write capacity units (for PROVISIONED tables) **Returns:** - tableName: Name of updated table - tableStatus: Status after update (usually UPDATING) **Use cases:** - Scale up capacity for high-traffic periods - Switch to on-demand billing for variable workloads - Reduce costs by switching to provisioned billing - Adjust capacity based on usage patterns **Note:** - Updates are asynchronous. Check…
| Parameter | Type | Description |
|---|---|---|
tableName * | string | Name of the table to update |
billingMode | string | Change billing mode: "PAY_PER_REQUEST" for on-demand or "PROVISIONED" for fixed capacity |
provisionedThroughput | object | New provisioned capacity. Required when switching to PROVISIONED billing. Example: {"readCapacityUnits": 10, "writeCapacityUnits": 10} |