meta-ads-mcp 1.0.19__py3-none-any.whl → 1.0.21__py3-none-any.whl

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.
meta_ads_mcp/__init__.py CHANGED
@@ -6,7 +6,7 @@ This package provides a Meta Ads MCP integration
6
6
 
7
7
  from meta_ads_mcp.core.server import main
8
8
 
9
- __version__ = "1.0.19"
9
+ __version__ = "1.0.21"
10
10
 
11
11
  __all__ = [
12
12
  'get_ad_accounts',
meta_ads_mcp/core/ads.py CHANGED
@@ -759,6 +759,7 @@ async def create_ad_creative(
759
759
  descriptions: Optional[List[str]] = None,
760
760
  dynamic_creative_spec: Optional[Dict[str, Any]] = None,
761
761
  call_to_action_type: Optional[str] = None,
762
+ lead_gen_form_id: Optional[str] = None,
762
763
  instagram_actor_id: Optional[str] = None
763
764
  ) -> str:
764
765
  """
@@ -778,6 +779,8 @@ async def create_ad_creative(
778
779
  descriptions: List of descriptions for dynamic creative testing (cannot be used with description)
779
780
  dynamic_creative_spec: Dynamic creative optimization settings
780
781
  call_to_action_type: Call to action button type (e.g., 'LEARN_MORE', 'SIGN_UP', 'SHOP_NOW')
782
+ lead_gen_form_id: Lead generation form ID for lead generation campaigns. Required when using
783
+ lead generation CTAs like 'SIGN_UP', 'GET_OFFER', 'SUBSCRIBE', etc.
781
784
  instagram_actor_id: Optional Instagram account ID for Instagram placements
782
785
 
783
786
  Returns:
@@ -910,9 +913,13 @@ async def create_ad_creative(
910
913
 
911
914
  # Add call_to_action to link_data for simple creatives
912
915
  if call_to_action_type:
913
- creative_data["object_story_spec"]["link_data"]["call_to_action"] = {
914
- "type": call_to_action_type
915
- }
916
+ cta_data = {"type": call_to_action_type}
917
+
918
+ # Add lead form ID to value object if provided (required for lead generation campaigns)
919
+ if lead_gen_form_id:
920
+ cta_data["value"] = {"lead_gen_form_id": lead_gen_form_id}
921
+
922
+ creative_data["object_story_spec"]["link_data"]["call_to_action"] = cta_data
916
923
 
917
924
  # Add dynamic creative spec if provided
918
925
  if dynamic_creative_spec:
@@ -965,7 +972,8 @@ async def update_ad_creative(
965
972
  description: Optional[str] = None,
966
973
  descriptions: Optional[List[str]] = None,
967
974
  dynamic_creative_spec: Optional[Dict[str, Any]] = None,
968
- call_to_action_type: Optional[str] = None
975
+ call_to_action_type: Optional[str] = None,
976
+ lead_gen_form_id: Optional[str] = None
969
977
  ) -> str:
970
978
  """
971
979
  Update an existing ad creative with new content or settings.
@@ -981,6 +989,8 @@ async def update_ad_creative(
981
989
  descriptions: New list of descriptions for dynamic creative testing (cannot be used with description)
982
990
  dynamic_creative_spec: New dynamic creative optimization settings
983
991
  call_to_action_type: New call to action button type
992
+ lead_gen_form_id: Lead generation form ID for lead generation campaigns. Required when using
993
+ lead generation CTAs like 'SIGN_UP', 'GET_OFFER', 'SUBSCRIBE', etc.
984
994
 
985
995
  Returns:
986
996
  JSON response with updated creative details
@@ -1045,7 +1055,7 @@ async def update_ad_creative(
1045
1055
  update_data["asset_feed_spec"] = asset_feed_spec
1046
1056
  else:
1047
1057
  # Use traditional object_story_spec with link_data for simple creatives
1048
- if message or headline or description or call_to_action_type:
1058
+ if message or headline or description or call_to_action_type or lead_gen_form_id:
1049
1059
  update_data["object_story_spec"] = {"link_data": {}}
1050
1060
 
1051
1061
  if message:
@@ -1060,10 +1070,17 @@ async def update_ad_creative(
1060
1070
  update_data["object_story_spec"]["link_data"]["description"] = description
1061
1071
 
1062
1072
  # Add call_to_action to link_data for simple creatives
1063
- if call_to_action_type:
1064
- update_data["object_story_spec"]["link_data"]["call_to_action"] = {
1065
- "type": call_to_action_type
1066
- }
1073
+ if call_to_action_type or lead_gen_form_id:
1074
+ cta_data = {}
1075
+ if call_to_action_type:
1076
+ cta_data["type"] = call_to_action_type
1077
+
1078
+ # Add lead form ID to value object if provided (required for lead generation campaigns)
1079
+ if lead_gen_form_id:
1080
+ cta_data["value"] = {"lead_gen_form_id": lead_gen_form_id}
1081
+
1082
+ if cta_data:
1083
+ update_data["object_story_spec"]["link_data"]["call_to_action"] = cta_data
1067
1084
 
1068
1085
  # Add dynamic creative spec if provided
1069
1086
  if dynamic_creative_spec:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meta-ads-mcp
3
- Version: 1.0.19
3
+ Version: 1.0.21
4
4
  Summary: Model Context Protocol (MCP) server for Meta Ads - Use Remote MCP at pipeboard.co for easiest setup
5
5
  Project-URL: Homepage, https://github.com/pipeboard-co/meta-ads-mcp
6
6
  Project-URL: Bug Tracker, https://github.com/pipeboard-co/meta-ads-mcp/issues
@@ -1,8 +1,8 @@
1
- meta_ads_mcp/__init__.py,sha256=QKpjlX8Hak6GzWWCCr6SgEhYodi7KO13fY2MwjG4Fiw,1477
1
+ meta_ads_mcp/__init__.py,sha256=sauxtzAb9-OLhcjlqj63XQN_rQkL_tkK8edYVgqua3M,1477
2
2
  meta_ads_mcp/__main__.py,sha256=XaQt3iXftG_7f0Zu7Wop9SeFgrD2WBn0EQOaPMc27d8,207
3
3
  meta_ads_mcp/core/__init__.py,sha256=IEJtqpyUo0CZSUWeQPljQ-D2vKorTFwXnpBQWSi1hIM,1819
4
4
  meta_ads_mcp/core/accounts.py,sha256=7Zoqq0zMIJi_Xsxe9-_b3EYx-UTeieJJvO7HxVRuUS0,4327
5
- meta_ads_mcp/core/ads.py,sha256=ED67n5kCcmqk5BDDTOA4zVYUPUsAJw8ZvlM2kVwNQlI,62007
5
+ meta_ads_mcp/core/ads.py,sha256=Hv6CYgYz85yUJ_OtxLMFH2Q4gZdQKiWEvxQs39oslfU,63116
6
6
  meta_ads_mcp/core/ads_library.py,sha256=smGz9FhM6RIUjlQT4Jv1BaZmXahGdK21eRCB7QMhK-4,3228
7
7
  meta_ads_mcp/core/adsets.py,sha256=3Ok3EwPTReKshtsVs4gRMlws6LMTUJTb4ZeGPPM8JR8,16570
8
8
  meta_ads_mcp/core/api.py,sha256=RvEbXpVO_SxKJeuqsiQhpGYLZuhQlYKCd9hNv7AIZac,16856
@@ -21,8 +21,8 @@ meta_ads_mcp/core/resources.py,sha256=-zIIfZulpo76vcKv6jhAlQq91cR2SZ3cjYZt3ek3x0
21
21
  meta_ads_mcp/core/server.py,sha256=9SlgM_qvdlxo24ctnZzLgW1e1nfAspCSx3YyJQkKP64,17856
22
22
  meta_ads_mcp/core/targeting.py,sha256=d2uLWbIEtucRuTgwZEdtVKLDZJgaxQ1lDtZ0ZgkBJC4,25150
23
23
  meta_ads_mcp/core/utils.py,sha256=ytj41yC5SqduLrAiZYBSd6OUwlJRaIClTwnnYKpNFds,9387
24
- meta_ads_mcp-1.0.19.dist-info/METADATA,sha256=-mvAWil32XHGK0c-3j0vSv4RZQ85x9nmfxK_5SHhLnY,25201
25
- meta_ads_mcp-1.0.19.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
26
- meta_ads_mcp-1.0.19.dist-info/entry_points.txt,sha256=Dv2RkoBjRJBqj6CyhwqGIiwPCD-SCL1-7B9-zmVRuv0,57
27
- meta_ads_mcp-1.0.19.dist-info/licenses/LICENSE,sha256=E2d762fbhwKRYn8o7J6Szr6vyBPrHVDlK3jbHPx-d84,3851
28
- meta_ads_mcp-1.0.19.dist-info/RECORD,,
24
+ meta_ads_mcp-1.0.21.dist-info/METADATA,sha256=TaQcg4cOHgRz7qSIbogEt1A4NEQSTCwJ_l0yalfudUs,25201
25
+ meta_ads_mcp-1.0.21.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
26
+ meta_ads_mcp-1.0.21.dist-info/entry_points.txt,sha256=Dv2RkoBjRJBqj6CyhwqGIiwPCD-SCL1-7B9-zmVRuv0,57
27
+ meta_ads_mcp-1.0.21.dist-info/licenses/LICENSE,sha256=E2d762fbhwKRYn8o7J6Szr6vyBPrHVDlK3jbHPx-d84,3851
28
+ meta_ads_mcp-1.0.21.dist-info/RECORD,,