get_ad_code
Retrieve the HTML/JS ad code for any AdSense ad unit, ready to paste into your website.
Instructions
Get the HTML/JS ad code snippet for an ad unit, ready to paste into your website
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": {
"adUnit": "<adUnit>"
},
"name": "get_ad_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adUnit | Yes | Full ad unit name (e.g., accounts/pub-XXX/adclients/ca-pub-XXX/adunits/123) |