gads_list_assets
List all Google Ads account-level assets such as sitelinks, callouts, structured snippets, images, and call extensions. Filter by asset type to review or manage specific asset categories.
Instructions
List account-level assets: sitelinks, callouts, structured snippets, images, call extensions, and more. Filter by asset type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customer_id | No | Override GOOGLE_ADS_CUSTOMER_ID for this call | |
| asset_type | No | Filter by asset type: SITELINK, CALLOUT, STRUCTURED_SNIPPET, IMAGE, CALL, etc. | |
| limit | No |
Implementation Reference
- src/index.ts:151-156 (registration)Registration of the 'gads_list_assets' tool on the MCP server with description, schema, and handler.
server.tool( "gads_list_assets", "List account-level assets: sitelinks, callouts, structured snippets, images, call extensions, and more. Filter by asset type.", listAssetsSchema, async (args) => { try { return ok(await listAssets(args)); } catch (e) { return err(e); } } ); - src/tools/extensions.ts:4-8 (schema)Input schema for listAssets: optional customer_id, asset_type filter, and limit (default 100, max 10000).
export const listAssetsSchema = { customer_id: z.string().optional().describe("Override GOOGLE_ADS_CUSTOMER_ID for this call"), asset_type: z.string().optional().describe("Filter by asset type: SITELINK, CALLOUT, STRUCTURED_SNIPPET, IMAGE, CALL, etc."), limit: z.number().int().positive().max(10000).default(100), }; - src/tools/extensions.ts:10-33 (handler)Handler function that queries Google Ads API for account-level assets (sitelinks, callouts, images, etc.) with optional type filter.
export async function listAssets(args: z.infer<z.ZodObject<typeof listAssetsSchema>>) { const customer = getCustomer(args.customer_id); const typeClause = args.asset_type ? `WHERE asset.type = '${args.asset_type}'` : ""; const rows = await customer.query(` SELECT asset.id, asset.name, asset.type, asset.final_urls, asset.sitelink_asset.link_text, asset.sitelink_asset.description1, asset.sitelink_asset.description2, asset.callout_asset.callout_text, asset.structured_snippet_asset.header, asset.structured_snippet_asset.values, asset.image_asset.full_size.url, asset.policy_summary.approval_status FROM asset ${typeClause} ORDER BY asset.name LIMIT ${args.limit} `); return { rowCount: rows.length, rows }; }