meta-ads-mcp 1.0.0__py3-none-any.whl → 1.0.2__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 +1 -1
- meta_ads_mcp/core/insights.py +8 -2
- {meta_ads_mcp-1.0.0.dist-info → meta_ads_mcp-1.0.2.dist-info}/METADATA +4 -2
- {meta_ads_mcp-1.0.0.dist-info → meta_ads_mcp-1.0.2.dist-info}/RECORD +7 -7
- {meta_ads_mcp-1.0.0.dist-info → meta_ads_mcp-1.0.2.dist-info}/WHEEL +0 -0
- {meta_ads_mcp-1.0.0.dist-info → meta_ads_mcp-1.0.2.dist-info}/entry_points.txt +0 -0
- {meta_ads_mcp-1.0.0.dist-info → meta_ads_mcp-1.0.2.dist-info}/licenses/LICENSE +0 -0
meta_ads_mcp/__init__.py
CHANGED
meta_ads_mcp/core/insights.py
CHANGED
|
@@ -13,7 +13,7 @@ import datetime
|
|
|
13
13
|
@meta_api_tool
|
|
14
14
|
async def get_insights(object_id: str, access_token: Optional[str] = None,
|
|
15
15
|
time_range: Union[str, Dict[str, str]] = "maximum", breakdown: str = "",
|
|
16
|
-
level: str = "ad") -> str:
|
|
16
|
+
level: str = "ad", limit: int = 25, after: str = "") -> str:
|
|
17
17
|
"""
|
|
18
18
|
Get performance insights for a campaign, ad set, ad or account.
|
|
19
19
|
|
|
@@ -49,6 +49,8 @@ async def get_insights(object_id: str, access_token: Optional[str] = None,
|
|
|
49
49
|
marketing_messages_btn_name, impression_view_time_advertiser_hour_v2, comscore_market,
|
|
50
50
|
comscore_market_code
|
|
51
51
|
level: Level of aggregation (ad, adset, campaign, account)
|
|
52
|
+
limit: Maximum number of results to return per page (default: 25, Meta API allows much higher values)
|
|
53
|
+
after: Pagination cursor to get the next set of results. Use the 'after' cursor from previous response's paging.next field.
|
|
52
54
|
"""
|
|
53
55
|
if not object_id:
|
|
54
56
|
return json.dumps({"error": "No object ID provided"}, indent=2)
|
|
@@ -56,7 +58,8 @@ async def get_insights(object_id: str, access_token: Optional[str] = None,
|
|
|
56
58
|
endpoint = f"{object_id}/insights"
|
|
57
59
|
params = {
|
|
58
60
|
"fields": "account_id,account_name,campaign_id,campaign_name,adset_id,adset_name,ad_id,ad_name,impressions,clicks,spend,cpc,cpm,ctr,reach,frequency,actions,action_values,conversions,unique_clicks,cost_per_action_type",
|
|
59
|
-
"level": level
|
|
61
|
+
"level": level,
|
|
62
|
+
"limit": limit
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
# Handle time range based on type
|
|
@@ -73,6 +76,9 @@ async def get_insights(object_id: str, access_token: Optional[str] = None,
|
|
|
73
76
|
if breakdown:
|
|
74
77
|
params["breakdowns"] = breakdown
|
|
75
78
|
|
|
79
|
+
if after:
|
|
80
|
+
params["after"] = after
|
|
81
|
+
|
|
76
82
|
data = await make_api_request(endpoint, access_token, params)
|
|
77
83
|
|
|
78
84
|
return json.dumps(data, indent=2)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meta-ads-mcp
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Model Context Protocol (MCP) server 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
|
|
@@ -31,10 +31,12 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for in
|
|
|
31
31
|
|
|
32
32
|
[](https://github.com/user-attachments/assets/3e605cee-d289-414b-814c-6299e7f3383e)
|
|
33
33
|
|
|
34
|
+
<!-- mcp-name: co.pipeboard/meta-ads-mcp -->
|
|
35
|
+
|
|
34
36
|
## Community & Support
|
|
35
37
|
|
|
36
38
|
- [Discord](https://discord.gg/YzMwQ8zrjr). Join the community.
|
|
37
|
-
- [Email Support](info@pipeboard.co). Email us for support.
|
|
39
|
+
- [Email Support](mailto:info@pipeboard.co). Email us for support.
|
|
38
40
|
|
|
39
41
|
## Table of Contents
|
|
40
42
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
meta_ads_mcp/__init__.py,sha256=
|
|
1
|
+
meta_ads_mcp/__init__.py,sha256=Pv5y0wPhP_1ld30AeDsT7tmLuQq7b3s1bJb5C40cEfM,1476
|
|
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
|
|
@@ -13,7 +13,7 @@ meta_ads_mcp/core/callback_server.py,sha256=LIAJv9DW--83kdZ7VWWZal8xEprYjRZ8iug4
|
|
|
13
13
|
meta_ads_mcp/core/campaigns.py,sha256=m24epO1QmyBVBXfqHIFZAi6sRCTlOGLQckjy0azqkvo,14319
|
|
14
14
|
meta_ads_mcp/core/duplication.py,sha256=ae9GisFg9MMXbgX8zqb6ekEFIv7DGNCMV-lwkDXSL-c,18928
|
|
15
15
|
meta_ads_mcp/core/http_auth_integration.py,sha256=lGpKhfzJcyWugBcYEvypY-qnlt-3UDBLqh7xAUH0DGw,12473
|
|
16
|
-
meta_ads_mcp/core/insights.py,sha256=
|
|
16
|
+
meta_ads_mcp/core/insights.py,sha256=ogSGlC0ddh8RFzWydilfDc7GYnjtInFiEQS7cSoyTmw,5061
|
|
17
17
|
meta_ads_mcp/core/openai_deep_research.py,sha256=68ayGopnBSPEYhN9R1sFvTXtyWtM0lji9aWS3uSXnLY,18649
|
|
18
18
|
meta_ads_mcp/core/pipeboard_auth.py,sha256=vv0yc4RBcGOm7VOovud-QNV1JmvBF-njOKICzAOlyf0,24602
|
|
19
19
|
meta_ads_mcp/core/reports.py,sha256=2pXYCCjYc3MZ8GlrbSHND436W62WlbfbtMll1dfJdqE,5750
|
|
@@ -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.
|
|
25
|
-
meta_ads_mcp-1.0.
|
|
26
|
-
meta_ads_mcp-1.0.
|
|
27
|
-
meta_ads_mcp-1.0.
|
|
28
|
-
meta_ads_mcp-1.0.
|
|
24
|
+
meta_ads_mcp-1.0.2.dist-info/METADATA,sha256=eVXLcTTH5-noZw5fQaSjcDnGdUPr4RKWYFB1sOzOv7c,24297
|
|
25
|
+
meta_ads_mcp-1.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
26
|
+
meta_ads_mcp-1.0.2.dist-info/entry_points.txt,sha256=Dv2RkoBjRJBqj6CyhwqGIiwPCD-SCL1-7B9-zmVRuv0,57
|
|
27
|
+
meta_ads_mcp-1.0.2.dist-info/licenses/LICENSE,sha256=E2d762fbhwKRYn8o7J6Szr6vyBPrHVDlK3jbHPx-d84,3851
|
|
28
|
+
meta_ads_mcp-1.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|