receive_attachment
Default first choice for Agent automatic attachment receiving. Takes only attachment_id; no path or overwrite input. Saves to downloads/ under this installed bridge package root (not cwd), created lazily on first receive; optional advanced MSG_DOWNLOAD_DIR must be an existing absolute directory. ...
This record as markdown: /tools/a2a-msg/receive-attachment.md
What receive_attachment does on A2a Msg
AI agents call receive_attachment to permanently remove resources in A2a Msg, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
Why receive_attachment is rated Critical
An AI agent that decides to call receive_attachment doesn't hesitate, doesn't double-check, and doesn't stop at one. Whatever it removes from A2a Msg is gone. There is no undo for destructive operations.
Risk signalsAdmin/system-level operation
Attacks that exploit this kind of access
The rule that runs receive_attachment safely
PolicyLayer is an MCP gateway: it sits between your AI agents and A2a Msg, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For receive_attachment, this is the rule to start with:
receive_attachment is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect A2a Msg, apply this rule, and every receive_attachment call is checked against it from then on.
Questions about receive_attachment
Default first choice for Agent automatic attachment receiving. Takes only attachment_id; no path or overwrite input. Saves to downloads/ under this installed bridge package root (not cwd), created lazily on first receive; optional advanced MSG_DOWNLOAD_DIR must be an existing absolute directory. Always auto-names and never overwrites. Verifies SHA-256 before exclusive publication; returns actual path and hash. Saving does not mark read. Save successfully before reading the body; on failure ask retry, explicitly skip, or cancel. A successful result with cleanupWarning is still saved: report it, do not download again. Use save_attachment only for a user-specified destination. ${READING_GUIDANCE} ${UNTRUSTED}. It is categorised as a Destructive tool in the A2a Msg MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
Register the A2a Msg MCP server in PolicyLayer and add a rule for receive_attachment: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches A2a Msg. Nothing to install.
receive_attachment is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the receive_attachment rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for receive_attachment. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
receive_attachment is provided by the A2a Msg MCP server (goudaren0528/a2a-msg). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on A2a Msg, and thousands of servers like it.
Across the catalogue