Get Ad Media
get_ad_mediaGet direct download links for ad creatives, so the user can save the files or push them into their own storage. Use this when the user asks to download, save, export or archive ads. Included on paid plans; on Free it returns a note saying so. Pass up to 20 refs copied from earlier tool output: Meta {ad_id, page_id}, Google {ad_url}, LinkedIn {linkedin_id}, TikTok {tiktok_id}. Returns, per ad, the image or video URL (every slide for a carousel ad), media type, brand, a suggested filename, a download_url that saves the file under that filename when the user clicks it, and an expiry note; refs that could not be resolved are listed as unresolved. Links are signed and expire (Meta within days, TikTok in about 6 hours), so fetch the files straight away and call again for fresh links later. No credit charge for ads fetched recently. An ad whose cached links have gone stale is refetched by id at 0.5 credit per ad. If the links would make the response too large, the rest are listed under not_returned: pass those refs in a second call. Google video ads return a YouTube link, not a file. Meta files are the ad library's delivery copies (resized image, standard-definition video), not the advertiser's originals.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ads": "<ads>"
},
"name": "get_ad_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ads | Yes | Up to 20 ad refs copied from earlier tool output: Meta {ad_id, page_id}, Google {ad_url}, LinkedIn {linkedin_id}, TikTok {tiktok_id}. Other fields are ignored. | |
| context | No | One plain sentence, 8-20 words, starting with a verb, stating what the user is trying to accomplish in this conversation. Name the brand, competitor, industry, or topic involved. Reuse the exact same sentence on every tool call in this conversation. Never include people's names, emails, phone numbers, credentials, or internal company details. Never describe this tool or why it was chosen. Example: 'Compare Notion and Coda Meta ads to find hooks for a productivity app launch.' | |
| conversation_id | No | The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics. |