dynamodb

v0.2.7
com.pulsemcp/dynamodb Checked 1 hour ago Published 5 months ago

MCP 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.

ParameterTypeDescription
exclusiveStartTableNamestringName of the last evaluated table from a previous request. Use for pagination.
limitnumberMaximum 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…

ParameterTypeDescription
tableName *stringName 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.

ParameterTypeDescription
key *objectPrimary 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 *stringName 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…

ParameterTypeDescription
expressionAttributeValues *objectValues for expression placeholders. Example: {":uid": "123", ":start": 1000, ":end": 2000}
keyConditionExpression *stringKey condition expression. Must include partition key condition. Example: "userId = :uid" or "userId = :uid AND timestamp BETWEEN :start AND :end"
tableName *stringName of the DynamoDB table
exclusiveStartKeyobjectPrimary key of the item to start after (for pagination)
expressionAttributeNamesobjectSubstitutions for reserved words in expressions. Example: {"#status": "status"}
filterExpressionstringFilter expression to apply after query. Example: "#status = :active"
indexNamestringName of a secondary index to query instead of the main table
limitnumberMaximum number of items to evaluate (not necessarily return due to filters)
projectionExpressionstringComma-separated list of attributes to retrieve. Example: "userId, name, email"
scanIndexForwardbooleantrue 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…

ParameterTypeDescription
tableName *stringName of the DynamoDB table
exclusiveStartKeyobjectPrimary key of the item to start after (for pagination)
expressionAttributeNamesobjectSubstitutions for reserved words in expressions. Example: {"#status": "status"}
expressionAttributeValuesobjectValues for expression placeholders. Example: {":active": "ACTIVE", ":minAge": 18}
filterExpressionstringFilter expression to apply. Example: "#status = :active AND age > :minAge"
limitnumberMaximum number of items to evaluate (not necessarily return due to filters)
projectionExpressionstringComma-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.

ParameterTypeDescription
requestItems *objectMap 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.

ParameterTypeDescription
item *objectThe item to put. Must include primary key attributes. Example: {"userId": "123", "name": "John", "email": "john@example.com"}
tableName *stringName of the DynamoDB table
conditionExpressionstringCondition that must be satisfied for the put to succeed. Example: "attribute_not_exists(userId)" to prevent overwrites
expressionAttributeNamesobjectSubstitutions for reserved words in condition. Example: {"#status": "status"}
expressionAttributeValuesobjectValues for condition expression placeholders. Example: {":expected": "PENDING"}
returnValuesstringWhat 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…

ParameterTypeDescription
key *objectPrimary key of the item to update. Example: {"userId": "123"}
tableName *stringName of the DynamoDB table
updateExpression *stringUpdate expression defining modifications. Use SET, REMOVE, ADD, DELETE actions. Example: "SET #name = :newName, #count = #count + :inc REMOVE #oldAttr"
conditionExpressionstringCondition that must be satisfied for the update to succeed. Example: "attribute_exists(userId)"
expressionAttributeNamesobjectSubstitutions for reserved words or attribute names. Example: {"#name": "name", "#count": "viewCount"}
expressionAttributeValuesobjectValues for expression placeholders. Example: {":newName": "John Doe", ":inc": 1}
returnValuesstringWhat 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)").

ParameterTypeDescription
key *objectPrimary key of the item to delete. Example: {"userId": "123"} or {"userId": "123", "timestamp": 1234567890}
tableName *stringName of the DynamoDB table
conditionExpressionstringCondition that must be satisfied for the delete to succeed. Example: "#status = :inactive"
expressionAttributeNamesobjectSubstitutions for reserved words in condition. Example: {"#status": "status"}
expressionAttributeValuesobjectValues for condition expression placeholders. Example: {":inactive": "INACTIVE"}
returnValuesstringWhat 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.

ParameterTypeDescription
requestItems *objectMap 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…

ParameterTypeDescription
attributeDefinitions *arrayAttribute type definitions for key schema attributes. Array of {attributeName, attributeType}. Types: "S" (String), "N" (Number), "B" (Binary). Example: [{"attributeName": "userId", "attributeType": "…
keySchema *arrayPrimary key schema. Array of {attributeName, keyType}. Must have one HASH key, optionally one RANGE key. Example: [{"attributeName": "userId", "keyType": "HASH"}, {"attributeName": "timestamp", "keyTy…
tableName *stringName of the table to create (3-255 characters)
billingModestring"PAY_PER_REQUEST" for on-demand or "PROVISIONED" for fixed capacity. Default: PAY_PER_REQUEST
provisionedThroughputobjectRequired 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.

ParameterTypeDescription
tableName *stringName 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…

ParameterTypeDescription
tableName *stringName of the table to update
billingModestringChange billing mode: "PAY_PER_REQUEST" for on-demand or "PROVISIONED" for fixed capacity
provisionedThroughputobjectNew provisioned capacity. Required when switching to PROVISIONED billing. Example: {"readCapacityUnits": 10, "writeCapacityUnits": 10}