dynamodb_item_query
Query items from a DynamoDB table using key conditions and expression values to retrieve specific data entries.
Instructions
Query items in a DynamoDB table
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | Name of the DynamoDB table | |
| key_condition | Yes | Key condition expression | |
| expression_values | Yes | Expression attribute values |
Implementation Reference
- src/mcp_server_aws/server.py:241-246 (handler)The core handler logic within handle_dynamodb_operations that executes the DynamoDB query operation using the boto3 client based on the provided table name, key condition, and expression values.elif name == "dynamodb_item_query": response = dynamodb_client.query( TableName=arguments["table_name"], KeyConditionExpression=arguments["key_condition"], ExpressionAttributeValues=arguments["expression_values"] )
- src/mcp_server_aws/tools.py:271-292 (schema)Defines the Tool metadata including input schema for validating parameters: table_name, key_condition, and expression_values.Tool( name="dynamodb_item_query", description="Query items in a DynamoDB table", inputSchema={ "type": "object", "properties": { "table_name": { "type": "string", "description": "Name of the DynamoDB table" }, "key_condition": { "type": "string", "description": "Key condition expression" }, "expression_values": { "type": "object", "description": "Expression attribute values" } }, "required": ["table_name", "key_condition", "expression_values"] } ),
- src/mcp_server_aws/server.py:136-140 (registration)Registers all AWS tools, including dynamodb_item_query, by returning the list from get_aws_tools() in response to MCP list_tools requests.async def list_tools() -> list[Tool]: """List available AWS tools""" logger.debug("Handling list_tools request") return get_aws_tools()