adloop 0.41.0__tar.gz → 0.41.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. {adloop-0.41.0 → adloop-0.41.1}/PKG-INFO +1 -1
  2. {adloop-0.41.0 → adloop-0.41.1}/pyproject.toml +1 -1
  3. {adloop-0.41.0 → adloop-0.41.1}/pyproject.toml.orig +1 -1
  4. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/server.py +43 -4
  5. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/views/__init__.py +5 -4
  6. {adloop-0.41.0 → adloop-0.41.1}/README.md +0 -0
  7. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/__init__.py +0 -0
  8. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/__main__.py +0 -0
  9. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/_mcp_patches.py +0 -0
  10. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/__init__.py +0 -0
  11. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/ai_max.py +0 -0
  12. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/assets.py +0 -0
  13. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/audiences.py +0 -0
  14. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/brands.py +0 -0
  15. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/campaign_settings.py +0 -0
  16. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/client.py +0 -0
  17. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/conversion_actions.py +0 -0
  18. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/currency.py +0 -0
  19. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/custom_conversion_goals.py +0 -0
  20. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/enums.py +0 -0
  21. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/forecast.py +0 -0
  22. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/gaql.py +0 -0
  23. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/image_fetch.py +0 -0
  24. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/pmax.py +0 -0
  25. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/read.py +0 -0
  26. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/recommendation_subscriptions.py +0 -0
  27. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/recommendations.py +0 -0
  28. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/shopping.py +0 -0
  29. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/snippet_headers.py +0 -0
  30. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/validate_only.py +0 -0
  31. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ads/write.py +0 -0
  32. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/auth.py +0 -0
  33. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/cli.py +0 -0
  34. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/config.py +0 -0
  35. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/conversion_setup.py +0 -0
  36. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/crossref.py +0 -0
  37. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/diagnostics.py +0 -0
  38. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/__init__.py +0 -0
  39. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/admin.py +0 -0
  40. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/annotations.py +0 -0
  41. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/attribution.py +0 -0
  42. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/audit.py +0 -0
  43. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/client.py +0 -0
  44. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/definitions.py +0 -0
  45. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/funnels.py +0 -0
  46. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/reports.py +0 -0
  47. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/retention.py +0 -0
  48. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/suggest.py +0 -0
  49. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/tracking.py +0 -0
  50. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/ga4/write.py +0 -0
  51. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/gsc/__init__.py +0 -0
  52. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/gsc/client.py +0 -0
  53. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/gsc/reports.py +0 -0
  54. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/gtm/__init__.py +0 -0
  55. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/gtm/client.py +0 -0
  56. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/gtm/entities.py +0 -0
  57. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/gtm/read.py +0 -0
  58. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/gtm/write.py +0 -0
  59. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/merchant/__init__.py +0 -0
  60. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/merchant/client.py +0 -0
  61. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/merchant/read.py +0 -0
  62. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/__init__.py +0 -0
  63. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/auth.py +0 -0
  64. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/client.py +0 -0
  65. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/manage/__init__.py +0 -0
  66. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/manage/_common.py +0 -0
  67. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/manage/ad_groups.py +0 -0
  68. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/manage/ads.py +0 -0
  69. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/manage/campaigns.py +0 -0
  70. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/manage/extensions.py +0 -0
  71. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/manage/negatives.py +0 -0
  72. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/manage/removal.py +0 -0
  73. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/manage/targeting.py +0 -0
  74. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/read.py +0 -0
  75. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/microsoft_ads/write.py +0 -0
  76. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/oauth_redirect.py +0 -0
  77. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/pagespeed.py +0 -0
  78. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/reddit/__init__.py +0 -0
  79. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/reddit/auth.py +0 -0
  80. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/reddit/client.py +0 -0
  81. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/reddit/read.py +0 -0
  82. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/reddit/schedule.py +0 -0
  83. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/reddit/write.py +0 -0
  84. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/rules/__init__.py +0 -0
  85. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/rules/adloop.md +0 -0
  86. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/rules/commands/analyze-performance.md +0 -0
  87. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/rules/commands/budget-plan.md +0 -0
  88. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/rules/commands/create-ad.md +0 -0
  89. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/rules/commands/create-campaign.md +0 -0
  90. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/rules/commands/diagnose-tracking.md +0 -0
  91. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/rules/commands/optimize-campaign.md +0 -0
  92. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/rules_install.py +0 -0
  93. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/runtime.py +0 -0
  94. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/safety/__init__.py +0 -0
  95. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/safety/approval.py +0 -0
  96. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/safety/approval_card.html +0 -0
  97. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/safety/audit.py +0 -0
  98. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/safety/guards.py +0 -0
  99. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/safety/outcomes.py +0 -0
  100. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/safety/preview.py +0 -0
  101. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/tracking.py +0 -0
  102. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/upload_card.html +0 -0
  103. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/uploads.py +0 -0
  104. {adloop-0.41.0 → adloop-0.41.1}/src/adloop/views/performance.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: adloop
3
- Version: 0.41.0
3
+ Version: 0.41.1
4
4
  Summary: Google Ads MCP server for Claude, ChatGPT and Cursor, with Reddit Ads, GA4 and Tag Manager. Every change is previewed first.
5
5
  Keywords: mcp,mcp-server,google-ads,google-ads-mcp,reddit-ads,google-analytics,ga4,claude,chatgpt,cursor,marketing
6
6
  Author: Daniel Klose
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "adloop"
3
- version = "0.41.0"
3
+ version = "0.41.1"
4
4
  description = "Google Ads MCP server for Claude, ChatGPT and Cursor, with Reddit Ads, GA4 and Tag Manager. Every change is previewed first."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "adloop"
3
- version = "0.41.0"
3
+ version = "0.41.1"
4
4
  description = "Google Ads MCP server for Claude, ChatGPT and Cursor, with Reddit Ads, GA4 and Tag Manager. Every change is previewed first."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -551,6 +551,34 @@ def _microsoft_ads_structured_error(exc: Exception) -> dict | None:
551
551
  from adloop.microsoft_ads.auth import MicrosoftAdsApiError, MicrosoftAdsAuthError
552
552
 
553
553
  if isinstance(exc, MicrosoftAdsAuthError):
554
+ from adloop.runtime import deployment_mode
555
+
556
+ if deployment_mode() == "server":
557
+ # Hosted: the connection lives in the deployment's dashboard; there
558
+ # is no local sign-in command to run.
559
+ hosted_hints = {
560
+ "missing_developer_token": "Microsoft Advertising is not enabled on this deployment yet.",
561
+ "missing_client": "Microsoft Advertising is not enabled on this deployment yet.",
562
+ "not_an_account_user": (
563
+ "Invite a Microsoft account or a work (Entra) user to the ad account in Microsoft "
564
+ "Advertising, then reconnect Microsoft in the dashboard as that user. Signing in with "
565
+ "Google is not supported yet."
566
+ ),
567
+ "google_identity": (
568
+ "This account's users sign in with Google, which is not supported yet. Invite a "
569
+ "Microsoft account or a work (Entra) user to the ad account, then reconnect Microsoft "
570
+ "in the dashboard as that user."
571
+ ),
572
+ }
573
+ return {
574
+ "error": str(exc),
575
+ "hint": hosted_hints.get(
576
+ exc.error_code,
577
+ "Reconnect Microsoft Advertising in the dashboard with the account that has "
578
+ "access to the ad accounts, then retry.",
579
+ ),
580
+ "auth_error": "MICROSOFT_ADS_" + (exc.error_code or "auth").upper(),
581
+ }
554
582
  hints = {
555
583
  "missing_developer_token": (
556
584
  "Request a developer token in Microsoft Advertising (Settings → Developer "
@@ -874,6 +902,8 @@ def health_check() -> dict:
874
902
 
875
903
  ms_cfg = current_config().microsoft_ads
876
904
  if _microsoft_ads_configured():
905
+ from adloop.runtime import deployment_mode
906
+
877
907
  try:
878
908
  from adloop.microsoft_ads.read import account_meta as ms_account_meta
879
909
 
@@ -889,7 +919,9 @@ def health_check() -> dict:
889
919
  ms_request(current_config(), "customer", "User/Query", {"UserId": None})
890
920
  status["microsoft_ads"] = "ok"
891
921
  status["microsoft_ads_note"] = (
892
- "Signed in; set microsoft_ads.ad_account_id (see list_microsoft_ads_accounts)."
922
+ "Signed in; pick the ad account in the dashboard (see list_microsoft_ads_accounts)."
923
+ if deployment_mode() == "server"
924
+ else "Signed in; set microsoft_ads.ad_account_id (see list_microsoft_ads_accounts)."
893
925
  )
894
926
  except Exception as e:
895
927
  parsed = _structured_error("health_check", e)
@@ -899,7 +931,10 @@ def health_check() -> dict:
899
931
  status["microsoft_ads_hint"] = parsed["hint"]
900
932
  if "auth_error" in parsed:
901
933
  status["microsoft_ads_auth_error"] = parsed["auth_error"]
902
- else:
934
+ elif "list_microsoft_ads_accounts" in _offered_tool_names():
935
+ # Only where its tools are offered: a hosted runtime that does not
936
+ # offer Microsoft Advertising shouldn't send the user to set it up,
937
+ # and a local server that hid it says so under hidden_toolsets.
903
938
  status["microsoft_ads"] = "not_configured"
904
939
 
905
940
  if status["ga4"] == "error" or status["ads"] == "error":
@@ -7269,13 +7304,17 @@ def draft_reddit_ad(
7269
7304
 
7270
7305
 
7271
7306
  def _microsoft_ads_configured() -> bool:
7272
- """Set up here: hosted, the credentials provider must support Microsoft;
7307
+ """Set up here: hosted, the credentials provider must support Microsoft
7308
+ and the runtime must offer its tools to this caller (a hosted runtime
7309
+ may offer them only to workspaces that connected Microsoft);
7273
7310
  self-hosted, the config names a developer token or an app."""
7274
7311
  from adloop.auth import get_credentials_provider
7275
7312
  from adloop.runtime import deployment_mode
7276
7313
 
7277
7314
  if deployment_mode() == "server":
7278
- return hasattr(get_credentials_provider(), "microsoft_ads_credentials")
7315
+ return hasattr(get_credentials_provider(), "microsoft_ads_credentials") and (
7316
+ "list_microsoft_ads_accounts" in _offered_tool_names()
7317
+ )
7279
7318
  cfg = current_config().microsoft_ads
7280
7319
  return bool(cfg.developer_token or cfg.client_id)
7281
7320
 
@@ -27,12 +27,13 @@ if TYPE_CHECKING:
27
27
 
28
28
  VIEW_URI = "ui://adloop/view.html"
29
29
  # Added to the AI's copy of a result that is shown as a view, so the reply
30
- # comments on the dashboard instead of rebuilding it as a table.
30
+ # comments on the dashboard instead of rebuilding it as a table. "Usually":
31
+ # claude.ai draws no view for a call folded into a run of several tool calls.
31
32
  VIEW_NOTE = (
32
- "The user sees this result as an interactive dashboard next to your reply: "
33
+ "The app usually shows the user this result as an interactive dashboard: "
33
34
  "headline numbers, alerts, spend per campaign and a sortable table of every "
34
- "campaign. Don't repeat those numbers as a table; say what stands out and "
35
- "what to do next."
35
+ "campaign. Say what stands out and what to do next instead of repeating "
36
+ "those numbers as a table."
36
37
  )
37
38
  VIEW_MIME_TYPE = "text/html;profile=mcp-app"
38
39
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes