You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- LD: drop Date from default report fields (period aggregate, not daily split)
- L3: fail-loud on ALL_TIME without campaign filter and on explicit filter -> 0 rows
- L3: clamp list_* limit to MAX_TOOL_LIMIT=1000 (single-page); getAll pages at
DEFAULT_PAGE_LIMIT deterministically, maxPages=100 (~1M cap), loud _truncated marker
@@ -55,7 +60,7 @@ export function registerStatisticsTools(server: McpServer, client: YandexDirectC
55
60
{
56
61
title: "Get statistics",
57
62
description:
58
-
"Requests a TSV performance report via the Yandex Direct Reports service. Returns the report as tab-separated text with a column header row.",
63
+
"Requests a TSV performance report via the Yandex Direct Reports service. Returns tab-separated rows (no header row). By default the report is AGGREGATED over the whole period (one row per object) — add \"Date\" to fieldNames only for day-by-day dynamics or trend questions. ALL_TIME without a campaign filter is rejected for SEARCH_QUERY/CRITERIA reports; pass campaignIds or a bounded date range.",
`ALL_TIME without a campaign filter is not allowed for ${type} (it returns the whole account and explodes in size). Pass campaignIds, or a bounded date range like LAST_30_DAYS or CUSTOM_DATE.`,
89
+
);
90
+
}
91
+
77
92
constselection: Record<string,unknown>={};
78
93
if(range==="CUSTOM_DATE"){
79
94
if(!dateFrom||!dateTo){
@@ -100,6 +115,14 @@ export function registerStatisticsTools(server: McpServer, client: YandexDirectC
100
115
};
101
116
102
117
consttsv=awaitclient.report(params);
118
+
// L3 fail-loud: явный фильтр по кампании, но 0 строк — почти всегда неверный
119
+
// campaignId или период. Пустой ответ провоцирует модель «снять фильтр и
`Report returned 0 rows for campaignIds [${campaignIds.join(", ")}] over ${range}. Check the campaignId(s) and the date range — do not broaden the filter blindly.`,
0 commit comments