dynamodb_item_query
Query specific items in a DynamoDB table using key conditions and expression attributes. Execute commands through natural language on the AWS MCP Server.
Instructions
Query items in a DynamoDB table
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression_values | Yes | Expression attribute values | |
| key_condition | Yes | Key condition expression | |
| table_name | Yes | Name of the DynamoDB table |
Implementation Reference
- src/mcp_server_aws/server.py:241-246 (handler)The core handler logic for the 'dynamodb_item_query' tool, which calls the DynamoDB client's query method with the specified table, 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:272-291 (schema)The Tool definition including input schema for validating arguments: table_name, key_condition, and expression_values.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:135-139 (registration)Registration of tools via the list_tools handler, which returns get_aws_tools() including the dynamodb_item_query tool.@server.list_tools() async def list_tools() -> list[Tool]: """List available AWS tools""" logger.debug("Handling list_tools request") return get_aws_tools()