Claude can operate a real mailbox with three tool definitions and about forty lines of glue code.

tools = [

{

"name": "read_emails",

"description": "List recent emails from the agent's inbox. Returns JSON.",