Skip to main content
Back to Inbuilt tools The route_attachment tool sends an uploaded file to an external system that you have configured as a named destination.

When to use

Use route_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’s DESTINATIONS: 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 with attachment_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 the attachment_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.