route_attachment tool sends an uploaded file to an external system that you have configured as a named destination.
When to use
Useroute_attachment to hand a user’s uploaded file to another system, such as a document processor or an archive, without exposing the destination URL to the model.
Configure a destination
Declare each target in the agent’sDESTINATIONS: section. The tool can only send to a destination declared here, so the model cannot supply its own URL.
Declare the tool
Parameters
What is sent
The tool sends the destination a JSON body withattachment_id, filename, mime_type, category, size_bytes, and download_url, plus metadata if provided. The download_url is a time-limited public link, so the destination does not need platform credentials.
Returns
On success, the destination name, the HTTP status the destination returned, and theattachment_id.
An unknown destination name is rejected with the list of available destinations. If the destination does not respond within 30 seconds, the request times out and the tool returns an error.