Dashboard · Kiểm chứng tới 2026-10-08
Dùng AI với hệ thống Google qua MCP: studio game mobile cần biết gì
Tài khoản UA dạng MCC, tài khoản monetization AdMob. Ba câu trả lời ngắn bên dưới, giải thích ba tool chỉ đọc, ba sơ đồ chi tiết ở giữa, và hướng dẫn setup từng bước ở trang Hướng dẫn.
list_accessible_customers, search (GAQL), get_resource_metadata. Không có tool ghi, không có recommender. AI đọc toàn MCC qua login_customer_id, phân tích và đề xuất; người thực hiện thay đổi trong giao diện Google Ads. Quyền ghi được Google lên kế hoạch nhưng chưa phát hành.
- Liên kết AdMob với Firebase để doanh thu quảng cáo xuất hiện trong GA4, rồi hỏi qua GA4 MCP.
- Job theo lịch gọi AdMob API / xuất Play Console vào BigQuery, rồi hỏi qua BigQuery MCP.
- Tránh MCP "AdMob/Play" của bên thứ ba cho tài khoản thật.
- Giai đoạn 1 (tuần 1–2):
pipx run google-ads-mcptrên laptop CMO, chỉ đọc. - Giai đoạn 2 (tháng 1–2): host MCP server + GA4/BigQuery sau cổng SSO trên server riêng hoặc Cloud Run, chạy báo cáo theo lịch, ghi nhật ký.
- Giai đoạn 3: mở quyền ghi có duyệt khi Google phát hành.
Ba tool chỉ đọc làm gì, lấy được dữ liệu gì
Máy chủ không có "báo cáo sẵn". Nó chỉ cho agent ba việc: tìm tài khoản, tra cứu field hợp lệ, và chạy truy vấn GAQL. Mọi phân tích (CPI, ROAS, pacing, asset yếu) là agent tự ghép từ kết quả truy vấn. Chi phí trả về ở đơn vị micros, chia 1.000.000 ra tiền.
list_accessible_customersNhận: không có tham số; dùng tài khoản Google đã đăng nhập OAuth.
Trả: danh sách customer ID (10 chữ số) mà người đó được cấp quyền trực tiếp. Với MCC thường là ID của chính MCC và vài tài khoản được gán thẳng.
Dùng để: agent biết hỏi tài khoản nào. Để liệt kê toàn bộ tài khoản UA con dưới MCC, agent gọi tiếp search trên resource customer_client (tên, tiền tệ, múi giờ, trạng thái, cấp bậc).
get_resource_metadataNhận: tên resource (campaign, ad_group, customer_client, change_event, recommendation...) và tuỳ chọn login_customer_id.
Trả: ba danh sách field: chọn được (selectable), lọc được (filterable), sắp xếp được (sortable), gồm cả metrics.* và segments.* đi kèm được với resource đó.
Dùng để: agent không đoán tên field. Kết quả ít đổi nên agent cache lại trong phiên.
search (GAQL)Nhận: customer_id, resource, fields[], conditions[] (nối bằng AND), orderings[], limit, login_customer_id.
Làm: máy chủ ghép thành câu GAQL SELECT … FROM … WHERE … ORDER BY … LIMIT, gọi search_stream của Google Ads API.
Trả: danh sách dòng JSON, mỗi dòng là một tổ hợp resource + segment (ví dụ một chiến dịch trong một ngày) với các metric đã chọn.
Dữ liệu nào lấy được qua search cho đội UA game
| Resource | Lấy được gì | Field / metric tiêu biểu |
|---|---|---|
customer_client | Danh sách tài khoản con dưới MCC | customer_client.descriptive_name, currency_code, time_zone, status, level |
campaign | Chi phí, lượt cài, CPI, hiển thị, click theo chiến dịch App Campaign; trạng thái, loại bid, mục tiêu tCPI/tROAS | metrics.cost_micros, metrics.conversions, metrics.cost_per_conversion, metrics.impressions, campaign.status, campaign.app_campaign_setting.bidding_strategy_goal_type, campaign.target_cpa.target_cpa_micros, campaign.primary_status |
campaign_budget | Ngân sách ngày, ngân sách Google gợi ý, chi tiêu thực | campaign_budget.amount_micros, campaign_budget.recommended_budget_amount_micros, metrics.cost_micros |
geographic_view, user_location_view | Chi phí và lượt cài theo quốc gia, vùng | geographic_view.country_criterion_id, metrics.cost_micros, metrics.conversions |
ad_group_ad_asset_view | Hiệu suất từng asset (video, ảnh, tiêu đề, mô tả) và nhãn chất lượng Google chấm | asset.name, asset.type, ad_group_ad_asset_view.performance_label (BEST / GOOD / LOW / LEARNING), metrics.cost_micros, metrics.conversions |
conversion_action | Các sự kiện chuyển đổi đã khai báo (install, first_open, purchase, D7 retention…) và nguồn (Firebase, GA4, MMP) | conversion_action.name, conversion_action.type, conversion_action.status, conversion_action.primary_for_goal |
change_event | Ai đổi gì, lúc nào, trong 30 ngày gần nhất (bắt buộc LIMIT ≤ 10000) | change_event.change_date_time, change_event.user_email, change_event.change_resource_type, change_event.changed_fields |
recommendation | Gợi ý sẵn của Google (tăng ngân sách, đổi mục tiêu bid, thêm asset) kèm ước lượng tác động; chỉ đọc, không áp dụng được qua MCP | recommendation.type, recommendation.impact.base_metrics, recommendation.campaign_budget_recommendation |
customer | Thông tin tài khoản: tên, tiền tệ, trạng thái, tracking | customer.descriptive_name, customer.currency_code, customer.status |
| Segment dùng kèm | Chẻ mọi báo cáo theo ngày, tuần, tháng, thiết bị, mạng (Search, YouTube, Display, Play), chuyển đổi | segments.date, segments.week, segments.device, segments.ad_network_type, segments.conversion_action_name |
Bốn ví dụ agent sẽ gọi
# 1. Chi phí, lượt cài, CPI theo chiến dịch App Campaign, 7 ngày qua
search(customer_id="1234567890", login_customer_id="MCC_ID", resource="campaign",
fields=["campaign.name","segments.date","metrics.cost_micros","metrics.conversions","metrics.cost_per_conversion"],
conditions=["segments.date DURING LAST_7_DAYS","campaign.advertising_channel_type = 'MULTI_CHANNEL'"],
orderings=["metrics.cost_micros DESC"])
# 2. Chi phí và lượt cài theo quốc gia, 30 ngày
search(customer_id="1234567890", resource="geographic_view",
fields=["geographic_view.country_criterion_id","metrics.cost_micros","metrics.conversions"],
conditions=["segments.date DURING LAST_30_DAYS"], orderings=["metrics.cost_micros DESC"], limit=50)
# 3. Asset nào Google chấm LOW đang tiêu tiền
search(customer_id="1234567890", resource="ad_group_ad_asset_view",
fields=["asset.name","asset.type","ad_group_ad_asset_view.performance_label","metrics.cost_micros","metrics.conversions"],
conditions=["ad_group_ad_asset_view.performance_label = 'LOW'","segments.date DURING LAST_14_DAYS"])
# 4. Ai đã đổi gì trong tuần (truy vết CPI tăng)
search(customer_id="1234567890", resource="change_event",
fields=["change_event.change_date_time","change_event.user_email","change_event.change_resource_type","change_event.changed_fields"],
conditions=["change_event.change_date_time DURING LAST_7_DAYS"], orderings=["change_event.change_date_time DESC"], limit=200)
Bốn resource đọc kèm (không phải tool)
discovery-document: mô tả toàn bộ Google Ads API phiên bản mới nhất, agent đọc để hiểu cấu trúc.metricsvàsegments: danh sách metric và segment có thể dùng trong báo cáo, kèm giải thích.release-notes: thay đổi của phiên bản API mới nhất.
Không lấy được qua máy chủ này
- Không đổi bid, ngân sách, trạng thái; không tạo chiến dịch; không tải asset; không áp dụng recommendation.
- Không có retention, LTV, doanh thu IAP hay AdMob: những thứ đó ở GA4 MCP hoặc BigQuery MCP (xem Bản đồ MCP của Google).
- Mỗi lời gọi tốn hạn mức API của Cloud project (Explorer: 2.880 thao tác/ngày), nên agent nên cache metadata và hỏi theo lô.
Mở nhanh
Dashboard · Verified as of 2026-10-08
Using AI with Google systems through MCP: what a mobile game studio needs to know
A UA account organised as an MCC, a monetization account on AdMob. Three short answers below, an explanation of the three read-only tools, three detailed diagrams in the middle, and a step-by-step setup guide on the Guide page.
list_accessible_customers, search (GAQL), get_resource_metadata. No write tools, no recommender. The AI reads the whole MCC through login_customer_id, analyses and proposes; a person applies changes in the Google Ads UI. Google has planned write access but has not shipped it.
- Link AdMob to Firebase so ad revenue appears in GA4, then ask through the GA4 MCP.
- A scheduled job calls the AdMob API / exports Play Console into BigQuery, then ask through the BigQuery MCP.
- Avoid third-party "AdMob/Play" MCPs on real accounts.
- Phase 1 (weeks 1–2):
pipx run google-ads-mcpon the director's laptop, read-only. - Phase 2 (months 1–2): host the MCP server + GA4/BigQuery behind an SSO gateway on an own server or Cloud Run, run scheduled reports, keep logs.
- Phase 3: open approved write access once Google ships it.
What the three read-only tools do and what data they return
The server has no "canned reports". It gives the agent three abilities: find accounts, look up valid fields, and run GAQL queries. Every analysis (CPI, ROAS, pacing, weak assets) is assembled by the agent from query results. Costs come back in micros; divide by 1,000,000 for currency.
list_accessible_customersInput: no parameters; uses the Google account signed in through OAuth.
Returns: a list of 10-digit customer IDs that user can reach directly. With an MCC that is usually the MCC's own ID plus a few directly assigned accounts.
Used for: the agent learns which account to ask about. To list every child UA account under the MCC, the agent then calls search on the customer_client resource (name, currency, time zone, status, level).
get_resource_metadataInput: a resource name (campaign, ad_group, customer_client, change_event, recommendation…) and an optional login_customer_id.
Returns: three field lists: selectable, filterable, sortable, including the metrics.* and segments.* that can accompany that resource.
Used for: the agent never guesses field names. The result rarely changes, so the agent caches it for the session.
search (GAQL)Input: customer_id, resource, fields[], conditions[] (joined with AND), orderings[], limit, login_customer_id.
Does: the server assembles a GAQL statement SELECT … FROM … WHERE … ORDER BY … LIMIT and calls the Google Ads API search_stream.
Returns: a list of JSON rows, each one a resource + segment combination (for example one campaign on one day) with the selected metrics.
What search can fetch for a game UA team
| Resource | What you get | Typical fields / metrics |
|---|---|---|
customer_client | List of child accounts under the MCC | customer_client.descriptive_name, currency_code, time_zone, status, level |
campaign | Cost, installs, CPI, impressions, clicks per App Campaign; status, bidding type, tCPI/tROAS targets | metrics.cost_micros, metrics.conversions, metrics.cost_per_conversion, metrics.impressions, campaign.status, campaign.app_campaign_setting.bidding_strategy_goal_type, campaign.target_cpa.target_cpa_micros, campaign.primary_status |
campaign_budget | Daily budget, Google's recommended budget, actual spend | campaign_budget.amount_micros, campaign_budget.recommended_budget_amount_micros, metrics.cost_micros |
geographic_view, user_location_view | Cost and installs by country or region | geographic_view.country_criterion_id, metrics.cost_micros, metrics.conversions |
ad_group_ad_asset_view | Performance of each asset (video, image, headline, description) and Google's quality label | asset.name, asset.type, ad_group_ad_asset_view.performance_label (BEST / GOOD / LOW / LEARNING), metrics.cost_micros, metrics.conversions |
conversion_action | Declared conversion events (install, first_open, purchase, D7 retention…) and their source (Firebase, GA4, MMP) | conversion_action.name, conversion_action.type, conversion_action.status, conversion_action.primary_for_goal |
change_event | Who changed what, and when, over the last 30 days (LIMIT ≤ 10000 required) | change_event.change_date_time, change_event.user_email, change_event.change_resource_type, change_event.changed_fields |
recommendation | Google's ready-made suggestions (raise budget, change bid goal, add assets) with estimated impact; read-only, cannot be applied through MCP | recommendation.type, recommendation.impact.base_metrics, recommendation.campaign_budget_recommendation |
customer | Account details: name, currency, status, tracking | customer.descriptive_name, customer.currency_code, customer.status |
| Companion segments | Slice any report by day, week, month, device, network (Search, YouTube, Display, Play), conversion | segments.date, segments.week, segments.device, segments.ad_network_type, segments.conversion_action_name |
Four calls the agent will make
# 1. Cost, installs, CPI per App Campaign, last 7 days
search(customer_id="1234567890", login_customer_id="MCC_ID", resource="campaign",
fields=["campaign.name","segments.date","metrics.cost_micros","metrics.conversions","metrics.cost_per_conversion"],
conditions=["segments.date DURING LAST_7_DAYS","campaign.advertising_channel_type = 'MULTI_CHANNEL'"],
orderings=["metrics.cost_micros DESC"])
# 2. Cost and installs by country, 30 days
search(customer_id="1234567890", resource="geographic_view",
fields=["geographic_view.country_criterion_id","metrics.cost_micros","metrics.conversions"],
conditions=["segments.date DURING LAST_30_DAYS"], orderings=["metrics.cost_micros DESC"], limit=50)
# 3. Which assets rated LOW by Google are still spending
search(customer_id="1234567890", resource="ad_group_ad_asset_view",
fields=["asset.name","asset.type","ad_group_ad_asset_view.performance_label","metrics.cost_micros","metrics.conversions"],
conditions=["ad_group_ad_asset_view.performance_label = 'LOW'","segments.date DURING LAST_14_DAYS"])
# 4. Who changed what this week (tracing a CPI increase)
search(customer_id="1234567890", resource="change_event",
fields=["change_event.change_date_time","change_event.user_email","change_event.change_resource_type","change_event.changed_fields"],
conditions=["change_event.change_date_time DURING LAST_7_DAYS"], orderings=["change_event.change_date_time DESC"], limit=200)
Four companion resources (not tools)
discovery-document: describes the whole latest Google Ads API; the agent reads it to understand the structure.metricsandsegments: the metrics and segments usable in reports, with explanations.release-notes: what changed in the latest API version.
Not available through this server
- No changing bids, budgets or status; no creating campaigns; no uploading assets; no applying recommendations.
- No retention, LTV, IAP or AdMob revenue: those live in the GA4 MCP or BigQuery MCP (see the Google MCP map).
- Every call consumes the Cloud project's API quota (Explorer: 2,880 operations/day), so the agent should cache metadata and batch its questions.
Open
仪表盘 · 核实截至 2026-10-08
通过 MCP 让 AI 使用 Google 系统:手游工作室需要知道什么
UA 账户为 MCC 结构,变现账户为 AdMob。下方是三条简答,然后是三个只读工具的说明、三张详细图表,以及“配置指南”页面的逐步设置说明。
list_accessible_customers、search(GAQL)、get_resource_metadata。没有写工具,没有推荐器。AI 通过 login_customer_id 读取整个 MCC,进行分析并提出建议;由人在 Google Ads 界面中执行更改。Google 已规划写权限但尚未发布。
- 将 AdMob 关联到 Firebase,使广告收入出现在 GA4,再通过 GA4 MCP 查询。
- 定时任务调用 AdMob API / 将 Play Console 导出到 BigQuery,再通过 BigQuery MCP 查询。
- 不要在真实账户上使用第三方“AdMob/Play”MCP。
- 第一阶段(第 1–2 周):在总监的笔记本上
pipx run google-ads-mcp,只读。 - 第二阶段(第 1–2 个月):在自有服务器或 Cloud Run 上、SSO 网关之后托管 MCP 服务器 + GA4/BigQuery,运行定时报表并记录日志。
- 第三阶段:待 Google 发布后,开放需审批的写权限。
三个只读工具做什么,能取到什么数据
服务器没有“现成报表”。它只给代理三种能力:查找账户、查询合法字段、执行 GAQL 查询。所有分析(CPI、ROAS、预算节奏、弱素材)都由代理从查询结果中自行拼合。花费以 micros 为单位返回,除以 1,000,000 得到货币金额。
list_accessible_customers输入: 无参数;使用通过 OAuth 登录的 Google 账号。
返回: 该用户可直接访问的 10 位 customer ID 列表。对 MCC 而言通常是 MCC 自身的 ID 以及少数直接分配的账户。
用途: 让代理知道该询问哪个账户。要列出 MCC 下全部子 UA 账户,代理接着对 customer_client 资源调用 search(名称、币种、时区、状态、层级)。
get_resource_metadata输入: 资源名(campaign、ad_group、customer_client、change_event、recommendation……)以及可选的 login_customer_id。
返回: 三份字段列表:可选择(selectable)、可筛选(filterable)、可排序(sortable),包括可与该资源搭配的 metrics.* 和 segments.*。
用途: 代理不必猜字段名。结果很少变化,代理在会话内缓存即可。
search (GAQL)输入: customer_id、resource、fields[]、conditions[](以 AND 连接)、orderings[]、limit、login_customer_id。
执行: 服务器拼成 GAQL 语句 SELECT … FROM … WHERE … ORDER BY … LIMIT,调用 Google Ads API 的 search_stream。
返回: JSON 行列表,每行是一个 resource + segment 组合(例如某广告系列在某一天)及所选指标。
游戏 UA 团队能通过 search 取到哪些数据
| Resource | 能取到什么 | 典型字段 / 指标 |
|---|---|---|
customer_client | MCC 下的子账户列表 | customer_client.descriptive_name, currency_code, time_zone, status, level |
campaign | 按 App Campaign 的花费、安装量、CPI、展示、点击;状态、出价类型、tCPI/tROAS 目标 | metrics.cost_micros, metrics.conversions, metrics.cost_per_conversion, metrics.impressions, campaign.status, campaign.app_campaign_setting.bidding_strategy_goal_type, campaign.target_cpa.target_cpa_micros, campaign.primary_status |
campaign_budget | 日预算、Google 建议预算、实际花费 | campaign_budget.amount_micros, campaign_budget.recommended_budget_amount_micros, metrics.cost_micros |
geographic_view, user_location_view | 按国家、地区的花费与安装量 | geographic_view.country_criterion_id, metrics.cost_micros, metrics.conversions |
ad_group_ad_asset_view | 每个素材(视频、图片、标题、描述)的表现及 Google 评定的质量标签 | asset.name, asset.type, ad_group_ad_asset_view.performance_label (BEST / GOOD / LOW / LEARNING), metrics.cost_micros, metrics.conversions |
conversion_action | 已声明的转化事件(install、first_open、purchase、D7 留存……)及其来源(Firebase、GA4、MMP) | conversion_action.name, conversion_action.type, conversion_action.status, conversion_action.primary_for_goal |
change_event | 最近 30 天内谁在何时改了什么(必须 LIMIT ≤ 10000) | change_event.change_date_time, change_event.user_email, change_event.change_resource_type, change_event.changed_fields |
recommendation | Google 的现成建议(提高预算、更改出价目标、添加素材)及影响预估;只读,无法通过 MCP 应用 | recommendation.type, recommendation.impact.base_metrics, recommendation.campaign_budget_recommendation |
customer | 账户信息:名称、币种、状态、跟踪设置 | customer.descriptive_name, customer.currency_code, customer.status |
| 配套维度 | 按日、周、月、设备、网络(Search、YouTube、Display、Play)、转化切分任何报表 | segments.date, segments.week, segments.device, segments.ad_network_type, segments.conversion_action_name |
代理会发起的四个调用示例
# 1. 最近 7 天按 App Campaign 的花费、安装量、CPI
search(customer_id="1234567890", login_customer_id="MCC_ID", resource="campaign",
fields=["campaign.name","segments.date","metrics.cost_micros","metrics.conversions","metrics.cost_per_conversion"],
conditions=["segments.date DURING LAST_7_DAYS","campaign.advertising_channel_type = 'MULTI_CHANNEL'"],
orderings=["metrics.cost_micros DESC"])
# 2. 30 天内按国家的花费与安装量
search(customer_id="1234567890", resource="geographic_view",
fields=["geographic_view.country_criterion_id","metrics.cost_micros","metrics.conversions"],
conditions=["segments.date DURING LAST_30_DAYS"], orderings=["metrics.cost_micros DESC"], limit=50)
# 3. 哪些被 Google 评为 LOW 的素材仍在花钱
search(customer_id="1234567890", resource="ad_group_ad_asset_view",
fields=["asset.name","asset.type","ad_group_ad_asset_view.performance_label","metrics.cost_micros","metrics.conversions"],
conditions=["ad_group_ad_asset_view.performance_label = 'LOW'","segments.date DURING LAST_14_DAYS"])
# 4. 本周谁改了什么(追查 CPI 上升)
search(customer_id="1234567890", resource="change_event",
fields=["change_event.change_date_time","change_event.user_email","change_event.change_resource_type","change_event.changed_fields"],
conditions=["change_event.change_date_time DURING LAST_7_DAYS"], orderings=["change_event.change_date_time DESC"], limit=200)
四个配套资源(不是工具)
discovery-document:描述最新版 Google Ads API 的全部内容,代理读取以理解结构。metrics与segments:可用于报表的指标和维度列表,附说明。release-notes:最新 API 版本的变更。
此服务器无法提供的
- 不能更改出价、预算、状态;不能创建广告系列;不能上传素材;不能应用建议。
- 没有留存、LTV、IAP 或 AdMob 收入:这些在 GA4 MCP 或 BigQuery MCP 中(见 Google MCP 地图)。
- 每次调用都消耗 Cloud 项目的 API 配额(Explorer:每天 2,880 次操作),因此代理应缓存元数据并批量提问。
快速打开
Tableau de bord · Vérifié au 2026-10-08
Utiliser l'IA avec les systèmes Google via MCP : ce qu'un studio de jeux mobiles doit savoir
Un compte UA organisé en MCC, un compte de monétisation AdMob. Trois réponses courtes ci-dessous, l'explication des trois outils en lecture seule, trois schémas détaillés au milieu, et un guide d'installation pas à pas sur la page Guide.
list_accessible_customers, search (GAQL), get_resource_metadata. Aucun outil d'écriture, aucun recommandeur. L'IA lit tout le MCC via login_customer_id, analyse et propose ; une personne applique les changements dans l'interface Google Ads. Google a prévu l'accès en écriture mais ne l'a pas publié.
- Lier AdMob à Firebase pour que les revenus publicitaires apparaissent dans GA4, puis interroger via le MCP GA4.
- Une tâche planifiée appelle l'API AdMob / exporte Play Console vers BigQuery, puis interroger via le MCP BigQuery.
- Éviter les MCP « AdMob/Play » tiers sur des comptes réels.
- Phase 1 (semaines 1–2) :
pipx run google-ads-mcpsur le portable du directeur, lecture seule. - Phase 2 (mois 1–2) : héberger le serveur MCP + GA4/BigQuery derrière une passerelle SSO sur un serveur propre ou Cloud Run, exécuter des rapports planifiés, journaliser.
- Phase 3 : ouvrir l'écriture avec validation dès que Google la publie.
Ce que font les trois outils en lecture seule et quelles données ils renvoient
Le serveur n'a pas de « rapports prêts à l'emploi ». Il donne à l'agent trois capacités : trouver des comptes, consulter les champs valides, exécuter des requêtes GAQL. Toute analyse (CPI, ROAS, rythme de dépense, assets faibles) est assemblée par l'agent à partir des résultats. Les coûts reviennent en micros ; diviser par 1 000 000 pour obtenir la devise.
list_accessible_customersEntrée : aucun paramètre ; utilise le compte Google connecté via OAuth.
Retour : la liste des customer ID (10 chiffres) accessibles directement à cet utilisateur. Avec un MCC, c'est en général l'ID du MCC lui-même plus quelques comptes attribués directement.
Sert à : l'agent sait quel compte interroger. Pour lister tous les comptes UA enfants sous le MCC, l'agent appelle ensuite search sur la ressource customer_client (nom, devise, fuseau, statut, niveau).
get_resource_metadataEntrée : un nom de ressource (campaign, ad_group, customer_client, change_event, recommendation…) et, en option, login_customer_id.
Retour : trois listes de champs : sélectionnables, filtrables, triables, y compris les metrics.* et segments.* compatibles avec cette ressource.
Sert à : l'agent ne devine jamais les noms de champs. Le résultat change rarement, l'agent le met en cache pour la session.
search (GAQL)Entrée : customer_id, resource, fields[], conditions[] (reliées par AND), orderings[], limit, login_customer_id.
Fait : le serveur assemble une requête GAQL SELECT … FROM … WHERE … ORDER BY … LIMIT et appelle search_stream de l'API Google Ads.
Retour : une liste de lignes JSON, chacune étant une combinaison ressource + segment (par exemple une campagne sur un jour) avec les métriques choisies.
Ce que search peut récupérer pour une équipe UA de jeu
| Ressource | Ce que l'on obtient | Champs / métriques typiques |
|---|---|---|
customer_client | Liste des comptes enfants sous le MCC | customer_client.descriptive_name, currency_code, time_zone, status, level |
campaign | Coût, installations, CPI, impressions, clics par App Campaign ; statut, type d'enchère, cibles tCPI/tROAS | metrics.cost_micros, metrics.conversions, metrics.cost_per_conversion, metrics.impressions, campaign.status, campaign.app_campaign_setting.bidding_strategy_goal_type, campaign.target_cpa.target_cpa_micros, campaign.primary_status |
campaign_budget | Budget quotidien, budget recommandé par Google, dépense réelle | campaign_budget.amount_micros, campaign_budget.recommended_budget_amount_micros, metrics.cost_micros |
geographic_view, user_location_view | Coût et installations par pays ou région | geographic_view.country_criterion_id, metrics.cost_micros, metrics.conversions |
ad_group_ad_asset_view | Performance de chaque asset (vidéo, image, titre, description) et étiquette de qualité attribuée par Google | asset.name, asset.type, ad_group_ad_asset_view.performance_label (BEST / GOOD / LOW / LEARNING), metrics.cost_micros, metrics.conversions |
conversion_action | Événements de conversion déclarés (install, first_open, purchase, rétention J7…) et leur source (Firebase, GA4, MMP) | conversion_action.name, conversion_action.type, conversion_action.status, conversion_action.primary_for_goal |
change_event | Qui a changé quoi, et quand, sur les 30 derniers jours (LIMIT ≤ 10000 obligatoire) | change_event.change_date_time, change_event.user_email, change_event.change_resource_type, change_event.changed_fields |
recommendation | Suggestions prêtes de Google (augmenter le budget, changer l'objectif d'enchère, ajouter des assets) avec impact estimé ; lecture seule, non applicables via MCP | recommendation.type, recommendation.impact.base_metrics, recommendation.campaign_budget_recommendation |
customer | Informations de compte : nom, devise, statut, suivi | customer.descriptive_name, customer.currency_code, customer.status |
| Segments associés | Découper tout rapport par jour, semaine, mois, appareil, réseau (Search, YouTube, Display, Play), conversion | segments.date, segments.week, segments.device, segments.ad_network_type, segments.conversion_action_name |
Quatre appels que l'agent fera
# 1. Coût, installations, CPI par App Campaign, 7 derniers jours
search(customer_id="1234567890", login_customer_id="MCC_ID", resource="campaign",
fields=["campaign.name","segments.date","metrics.cost_micros","metrics.conversions","metrics.cost_per_conversion"],
conditions=["segments.date DURING LAST_7_DAYS","campaign.advertising_channel_type = 'MULTI_CHANNEL'"],
orderings=["metrics.cost_micros DESC"])
# 2. Coût et installations par pays, 30 jours
search(customer_id="1234567890", resource="geographic_view",
fields=["geographic_view.country_criterion_id","metrics.cost_micros","metrics.conversions"],
conditions=["segments.date DURING LAST_30_DAYS"], orderings=["metrics.cost_micros DESC"], limit=50)
# 3. Quels assets notés LOW par Google dépensent encore
search(customer_id="1234567890", resource="ad_group_ad_asset_view",
fields=["asset.name","asset.type","ad_group_ad_asset_view.performance_label","metrics.cost_micros","metrics.conversions"],
conditions=["ad_group_ad_asset_view.performance_label = 'LOW'","segments.date DURING LAST_14_DAYS"])
# 4. Qui a changé quoi cette semaine (tracer une hausse de CPI)
search(customer_id="1234567890", resource="change_event",
fields=["change_event.change_date_time","change_event.user_email","change_event.change_resource_type","change_event.changed_fields"],
conditions=["change_event.change_date_time DURING LAST_7_DAYS"], orderings=["change_event.change_date_time DESC"], limit=200)
Quatre ressources associées (pas des outils)
discovery-document: décrit toute la dernière version de l'API Google Ads ; l'agent la lit pour comprendre la structure.metricsetsegments: les métriques et segments utilisables dans les rapports, avec explications.release-notes: les changements de la dernière version de l'API.
Indisponible via ce serveur
- Pas de modification d'enchères, de budgets ou de statut ; pas de création de campagne ; pas d'envoi d'assets ; pas d'application de recommandations.
- Pas de rétention, de LTV, de revenus IAP ou AdMob : ils sont dans le MCP GA4 ou le MCP BigQuery (voir la carte des MCP Google).
- Chaque appel consomme le quota API du projet Cloud (Explorer : 2 880 opérations/jour) ; l'agent doit donc mettre les métadonnées en cache et grouper ses questions.