dynamodb_batch_get
Retrieve multiple items from DynamoDB tables in a single operation to reduce API calls and improve data fetching efficiency.
Instructions
Batch get multiple items from DynamoDB tables
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request_items | Yes | Map of table names to keys to retrieve |
Implementation Reference
- src/mcp_server_aws/server.py:261-264 (handler)Executes the dynamodb_batch_get tool by calling batch_get_item on the DynamoDB client with the provided request_items from arguments.elif name == "dynamodb_batch_get": response = dynamodb_client.batch_get_item( RequestItems=arguments["request_items"] )
- src/mcp_server_aws/tools.py:324-355 (schema)Defines the input schema and metadata for the dynamodb_batch_get tool.Tool( name="dynamodb_batch_get", description="Batch get multiple items from DynamoDB tables", inputSchema={ "type": "object", "properties": { "request_items": { "type": "object", "description": "Map of table names to keys to retrieve", "additionalProperties": { "type": "object", "properties": { "Keys": { "type": "array", "items": { "type": "object" } }, "ConsistentRead": { "type": "boolean" }, "ProjectionExpression": { "type": "string" } }, "required": ["Keys"] } } }, "required": ["request_items"] } ),
- src/mcp_server_aws/server.py:135-140 (registration)Registers all AWS tools, including dynamodb_batch_get, by returning the list from get_aws_tools() in response to list_tools requests.@server.list_tools() async def list_tools() -> list[Tool]: """List available AWS tools""" logger.debug("Handling list_tools request") return get_aws_tools()