---
name: visibility-report
description: Build an AI visibility report for a Zerply team. Covers mention rate, citation rate and share of voice against competitors, the trend over time, results per AI platform, positive sentiment and accuracy, the strongest and weakest prompts, quotes from AI answers, AI crawler traffic and ads in AI answers. Use when the user asks how their brand shows up in ChatGPT, Claude, Gemini, Perplexity, Copilot or Google AI answers, wants a weekly or monthly AI visibility report, asks how they compare with competitors, or asks why a number went up or down.
---
# AI visibility report
Use the Zerply connector. Run read operations inside its `execute` tool with `await call_tool(name, params)`. Call each operation that changes data as its own connector tool. If you do not know the team yet, call `get_my_teams` and confirm the domain with the user. The `zerply` skill has the full connector rules.
## 1. Set the scope
- **Team**: one `team_id`. Leave out pitches unless the user asks about a pitch.
- **Period**: default to the last 7 complete days, ending yesterday. For "monthly", use the last 4 complete weeks with `group_by: "week"`. Work out the dates yourself. The script has no clock.
- **Comparison**: the period of the same length just before.
- **Focus**: the full report, or only the part the user asked about. Answer a narrow question with a narrow answer.
## 2. Collect the data in one script
Replace the team ID and the dates.
```python
import asyncio
TEAM = 123
CUR = {"from_date": "2026-11-23", "to_date": "2026-11-29"}
PREV = {"from_date": "2026-11-16", "to_date": "2026-11-22"}
engines = (await call_tool("list_available_answer_engines", {}))["result"]
cur, prev, prompts = await asyncio.gather(
call_tool("get_ai_visibility_analytics", {"team_id": TEAM, "group_by": "week", **CUR}),
call_tool("get_ai_visibility_analytics", {"team_id": TEAM, "group_by": "week", **PREV}),
call_tool("list_team_prompts", {"team_id": TEAM, "limit": 200}),
)
per_engine = await asyncio.gather(*[
call_tool("get_ai_visibility_analytics", {"team_id": TEAM, "group_by": "month", "answer_engine_id": e["id"], **CUR})
for e in engines
])
def totals(resp):
out = {}
for domain, rows in resp["data"].items():
<!-- ‹guest · 2026-12-01› -->
n = len(rows) or 1
out[domain] = {
"is_competitor": rows[0]["is_competitor"] if rows else None,
"mention_rate": round(sum(r["mention_rate"] for r in rows) / n, 1),
"citation_rate": round(sum(r["citation_rate"] for r in rows) / n, 1),
"share_of_voice": round(sum(r["avg_share_of_voice"] for r in rows) / n, 1),
"mentions": sum(r["total_mention_count"] for r in rows),
}
return out
return {
"current": totals(cur),
"previous": totals(prev),
"trend": {d: [(r["period"], r["mention_rate"]) for r in rows] for d, rows in cur["data"].items()},
"perception": cur["brand_perception"],
"prompt_counts": cur["prompt_counts"],
"per_engine": {e["name"]: totals(r) for e, r in zip(engines, per_engine)},
"prompts": [
{k: p[k] for k in ("id", "prompt", "funnel_stage", "total_mentions", "avg_share_of_voice", "positive_sentiment_rate", "tags")}
for p in prompts["result"]
],
}
```
The period averages are simple means of the period rows. Say so if you show them. For an exact figure over the whole range, call again with `group_by: "month"` on a range inside one month.
If the team has more than 200 prompts, page through `list_team_prompts` with `offset`. Return only the top and bottom prompts.
## 3. Add detail where it helps
Run these only when they answer the user's question:
- **What AI says**: `get_llm_responses` with `prompt_id` for 2 or 3 key prompts and `limit: 5`. Quote one or two short passages. Return only the answer text you need and the cited URLs (`is_cited` true).
- **Why a number moved**: compare `list_team_prompts` results with the previous report, or filter analytics by `prompt_id` for the prompts that changed most.
- **AI crawler traffic**: `get_ai_traffic_analytics`. Use `crawler_breakdown`, `operator_breakdown`, `top_paths` and `referrals`. If `is_connected` is false, say that Cloudflare is not connected and skip this part.
- **Ads in AI answers**: `get_ads`, and `get_ads` with `is_competitor_ads: true`. Use `get_ad_detail` for the top ad. An empty list means no ads were seen.
## 4. Write the report
Lead with the answer. Use this structure for a full report and drop the sections that have no data:
<!-- ‹guest · 2026-12-01› -->
1. **Headline**: the team domain, the period, and the brand's mention rate with the change against the previous period.
2. **Against competitors**: a table of each domain with mention rate, citation rate and share of voice, sorted by mention rate. Mark the brand row.
3. **Trend**: the mention rate per period. Say if it rises, falls or stays flat.
4. **By AI platform**: a table of the brand's mention rate per platform. Name the strongest and the weakest platform.
5. **How AI describes the brand**: positive sentiment rate and accuracy counts from `brand_perception`. Report inaccurate answers as a risk to fix.
6. **Prompts**: the 3 to 5 prompts with the most mentions, and TOFU prompts with zero mentions where competitors appear.
7. **Next steps**: 3 actions tied to the data. Examples: refresh a page that lost citations (`citation-decay` skill), write content for prompts with no mentions (`blog-publishing` skill), add prompts for a missing topic (`prompt-tracking` skill).
Rules:
- Rates are percentages. Show one decimal place.
- Mention rate, citation rate and share of voice count TOFU prompts only. Say this once in the report.
- Describe AI's view of the brand only as positive sentiment and factual accuracy.
- Do not invent causes. If the data does not show why a number moved, say what to check next.
- If all numbers are zero, check `prompt_counts` and the dates. A new team or a period with no runs gives empty data.
این نسخه با نشانهگذاری اختصاصی حساب شما نمایش داده میشود. برای نصب سریع، به تب نصب و راهاندازی بروید.