meta-ads-mcp 0.4.2__py3-none-any.whl → 0.4.3__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
@@ -7,7 +7,7 @@ with the Claude LLM.
7
7
 
8
8
  from meta_ads_mcp.core.server import main
9
9
 
10
- __version__ = "0.4.2"
10
+ __version__ = "0.4.3"
11
11
 
12
12
  __all__ = [
13
13
  'get_ad_accounts',
meta_ads_mcp/core/ads.py CHANGED
@@ -38,26 +38,27 @@ async def get_ads(access_token: str = None, account_id: str = None, limit: int =
38
38
  else:
39
39
  return json.dumps({"error": "No account ID specified and no accounts found for user"}, indent=2)
40
40
 
41
+ # Prioritize adset_id over campaign_id - use adset-specific endpoint
42
+ if adset_id:
43
+ endpoint = f"{adset_id}/ads"
44
+ params = {
45
+ "fields": "id,name,adset_id,campaign_id,status,creative,created_time,updated_time,bid_amount,conversion_domain,tracking_specs",
46
+ "limit": limit
47
+ }
41
48
  # Use campaign-specific endpoint if campaign_id is provided
42
- if campaign_id:
49
+ elif campaign_id:
43
50
  endpoint = f"{campaign_id}/ads"
44
51
  params = {
45
52
  "fields": "id,name,adset_id,campaign_id,status,creative,created_time,updated_time,bid_amount,conversion_domain,tracking_specs",
46
53
  "limit": limit
47
54
  }
48
- # Adset ID can still be used to filter within the campaign
49
- if adset_id:
50
- params["adset_id"] = adset_id
51
55
  else:
52
- # Default to account-level endpoint if no campaign_id
56
+ # Default to account-level endpoint if no specific filters
53
57
  endpoint = f"{account_id}/ads"
54
58
  params = {
55
59
  "fields": "id,name,adset_id,campaign_id,status,creative,created_time,updated_time,bid_amount,conversion_domain,tracking_specs",
56
60
  "limit": limit
57
61
  }
58
- # Adset ID can filter at the account level if no campaign specified
59
- if adset_id:
60
- params["adset_id"] = adset_id
61
62
 
62
63
  data = await make_api_request(endpoint, access_token, params)
63
64
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meta-ads-mcp
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Model Context Protocol (MCP) plugin for interacting with Meta Ads API
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=r7i4rteDOpqUZK4ZZkN5oihxeyUjOIAx-0xIyMqwPkU,1182
1
+ meta_ads_mcp/__init__.py,sha256=OGgQ2XeWNxnroN5THKZsXpIBrffEE0dFmzO86huFvR4,1182
2
2
  meta_ads_mcp/__main__.py,sha256=XaQt3iXftG_7f0Zu7Wop9SeFgrD2WBn0EQOaPMc27d8,207
3
3
  meta_ads_mcp/core/__init__.py,sha256=XVJjMOfdgnqxy3k8vCn2PCf7za8fMk4BdgJGiSFCVZY,1209
4
4
  meta_ads_mcp/core/accounts.py,sha256=Nmp7lPxO9wmq25jWV7_H0LIqnEbBhpCVBlLGW2HUaq0,2277
5
- meta_ads_mcp/core/ads.py,sha256=b_81GlGHIM4jISvuDZmHNyc6uW7uD3ovX68ezBci9MM,29747
5
+ meta_ads_mcp/core/ads.py,sha256=Ss0VaSjm7J4g7zUZLPLzz-WGC8h-SdhV_mtBRUNpkgE,29808
6
6
  meta_ads_mcp/core/ads_library.py,sha256=onStn9UkRqYDC60gOPS-iKDtP1plz6DygUb7hUZ0Jw8,2807
7
7
  meta_ads_mcp/core/adsets.py,sha256=8m8RDsa1CmCb75-YXcMHDYNpa8J12ovtQPp0kgYHDk4,12823
8
8
  meta_ads_mcp/core/api.py,sha256=aAzM6Q75VQOFXtr5D-mDmBRhxWK4wsiODsJYnR3mpDI,14994
@@ -19,8 +19,8 @@ meta_ads_mcp/core/reports.py,sha256=Dv3hfsPOR7IZ9WrYrKd_6SNgZl-USIphg7knva3UYAw,
19
19
  meta_ads_mcp/core/resources.py,sha256=-zIIfZulpo76vcKv6jhAlQq91cR2SZ3cjYZt3ek3x0w,1236
20
20
  meta_ads_mcp/core/server.py,sha256=mmhtcyB7h1aO6jK4njLztPdAebPDmc3mhA7DksR1nlY,17583
21
21
  meta_ads_mcp/core/utils.py,sha256=DsizDYuJnWUpkbShV1y5Qe8t47Qf59aPZ6O9v0hzdkY,6705
22
- meta_ads_mcp-0.4.2.dist-info/METADATA,sha256=M2VY7kNALGcXOYYjvwkxbmp3Ced9m3JO_hzAkjTxEQU,17239
23
- meta_ads_mcp-0.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
24
- meta_ads_mcp-0.4.2.dist-info/entry_points.txt,sha256=Dv2RkoBjRJBqj6CyhwqGIiwPCD-SCL1-7B9-zmVRuv0,57
25
- meta_ads_mcp-0.4.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
26
- meta_ads_mcp-0.4.2.dist-info/RECORD,,
22
+ meta_ads_mcp-0.4.3.dist-info/METADATA,sha256=hC23zTzNFhpX8-SJulrei0v36buIWK90x6SQlXGBUaU,17239
23
+ meta_ads_mcp-0.4.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
24
+ meta_ads_mcp-0.4.3.dist-info/entry_points.txt,sha256=Dv2RkoBjRJBqj6CyhwqGIiwPCD-SCL1-7B9-zmVRuv0,57
25
+ meta_ads_mcp-0.4.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
26
+ meta_ads_mcp-0.4.3.dist-info/RECORD,,