upload_image
Upload an ad image from a public URL or local file to Meta Ads and return an image hash for ad creatives. Use a local file path if URL fetching is unsupported.
Instructions
Upload an ad image from a public URL or a local file. Returns image hash for use in ad creatives. Note: fetching from a URL requires the app to have Meta's URL-fetch capability — if that fails with an OAuthException 'Application does not have the capability to make this API call', use file_path to upload the raw bytes instead, which does not require that capability.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "upload_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public URL of the image to upload | |
| name | No | Name to assign to the uploaded image. Defaults to the file_path basename when uploading a local file. | |
| file_path | No | Local filesystem path of the image to upload. Sent as base64-encoded bytes, bypassing Meta's URL-fetch capability requirement. | |
| account_id | No | Ad account ID to upload into (e.g. 'act_123' or '123'). Falls back to META_AD_ACCOUNT_ID env var if omitted. |