MCP Agent Mail — Prompts
AGENTS.md (Core Agent Instructions)
The AGENTS.md file ships hardcoded operational rules for any agent using this repo — an unusually strong example of iron-law prompt engineering:
RULE NUMBER 1 (NEVER EVER EVER FORGET THIS RULE!!!): YOU ARE NEVER ALLOWED TO DELETE A FILE
WITHOUT EXPRESS PERMISSION FROM ME OR A DIRECT COMMAND FROM ME. EVEN A NEW FILE THAT YOU
YOURSELF CREATED, SUCH AS A TEST CODE FILE. YOU HAVE A HORRIBLE TRACK RECORD OF DELETING
CRITICALLY IMPORTANT FILES OR OTHERWISE THROWING AWAY TONS OF EXPENSIVE WORK THAT I THEN
NEED TO PAY TO REPRODUCE. AS A RESULT, YOU HAVE PERMANENTLY LOST ANY AND ALL RIGHTS TO
DETERMINE THAT A FILE OR FOLDER SHOULD BE DELETED. YOU MUST **ALWAYS** ASK AND *RECEIVE*
CLEAR, WRITTEN PERMISSION FROM ME BEFORE EVER EVEN THINKING OF DELETING A FILE OR FOLDER
OF ANY KIND!!!
Prompting technique: Uppercase emphasis + emotional framing + permanent capability revocation. This is an extreme example of the "Iron Law" pattern — but personalized with epistemic history ("you have a horrible track record").
AGENTS.md — Coordination Usage Section
## MCP Agent Mail — coordination for multi-agent workflows
What it is
- A mail-like layer that lets coding agents coordinate asynchronously via MCP tools and resources.
- Provides identities, inbox/outbox, searchable threads, and advisory file reservations.
How to use effectively
1) Same repository
- Register an identity: call `ensure_project`, then `register_agent` using this repo's
absolute path as `project_key`.
- Reserve files before you edit: `file_reservation_paths(project_key, agent_name, ["src/**"],
ttl_seconds=3600, exclusive=true)` to signal intent and avoid conflict.
- Communicate with threads: use `send_message(..., thread_id="FEAT-123")`.
Macros vs granular tools
- Prefer macros when you want speed or are on a smaller model: `macro_start_session`,
`macro_prepare_thread`, `macro_file_reservation_cycle`, `macro_contact_handshake`.
- Use granular tools when you need control: `register_agent`, `file_reservation_paths`,
`send_message`, `fetch_inbox`, `acknowledge_message`.
Prompting technique: Procedural instruction list with explicit tool names and signatures. The "macros vs granular" distinction is a classic progressive disclosure pattern — small model path vs large model path.
SessionStart Hook Command (agent-side injection)
{
"type": "command",
"command": "cd '/home/ubuntu/mcp_agent_mail' && uv run python -m mcp_agent_mail.cli file_reservations active '/home/ubuntu/mcp_agent_mail'"
}
Technique: Ambient context injection — agent gets the active reservation list before it sees the user's message, so it can reason about conflicts without asking.
{
"type": "command",
"command": "cd '/home/ubuntu/mcp_agent_mail' && uv run python -m mcp_agent_mail.cli file_reservations soon '/home/ubuntu/mcp_agent_mail' --minutes 10"
}
Technique: Pre-action guard — checks for leases expiring within 10 minutes before any Edit tool use, giving the agent an opportunity to renew or proceed carefully.