dynamodb_item_update
Modify existing items in DynamoDB tables by specifying table name, item key, and updated data attributes.
Instructions
Update an item in a DynamoDB table
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | Name of the DynamoDB table | |
| key | Yes | Key to identify the item | |
| item | Yes | Updated item data |
Implementation Reference
- src/mcp_server_aws/server.py:230-235 (handler)Executes the dynamodb_item_update tool by invoking the DynamoDB boto3 client's update_item method with the provided table_name, key, and AttributeUpdates=item from the arguments.elif name == "dynamodb_item_update": response = dynamodb_client.update_item( TableName=arguments["table_name"], Key=arguments["key"], AttributeUpdates=arguments["item"] )
- src/mcp_server_aws/tools.py:231-252 (schema)Defines the Tool object for dynamodb_item_update, including its input schema requiring table_name (string), key (object), and item (object). This is used for validation and returned in list_tools.Tool( name="dynamodb_item_update", description="Update an item in a DynamoDB table", inputSchema={ "type": "object", "properties": { "table_name": { "type": "string", "description": "Name of the DynamoDB table" }, "key": { "type": "object", "description": "Key to identify the item" }, "item": { "type": "object", "description": "Updated item data" } }, "required": ["table_name", "key", "item"] } ),
- src/mcp_server_aws/server.py:136-140 (registration)Registers the dynamodb_item_update tool (among others) with the MCP server by returning get_aws_tools() which includes it.async def list_tools() -> list[Tool]: """List available AWS tools""" logger.debug("Handling list_tools request") return get_aws_tools()