Download Metrica raw logs
logs_downloadDownload processed log data from Yandex Metrica by request ID. Sample mode returns rows inline; file mode streams the full export to a file.
Instructions
Download prepared log data for a request_id (must be status="processed"; check logs_status). Default mode "sample" returns up to maxRows parsed rows inline — cheap and bounded. Mode "file" streams the FULL export to a file and returns its path plus a small preview; the raw content (potentially millions of rows) is never loaded into context. Read-only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"requestId": "<requestId>"
},
"name": "logs_download"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | sample (default): return up to maxRows parsed rows inline — cheap, bounded, no file. file: stream the FULL export to a file and return its path plus a small preview. | |
| maxRows | No | sample mode only: max rows to return inline (default 100, max 1000). | |
| counterId | No | Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured. | |
| requestId | Yes | Log request id returned by logs_request. | |
| outputPath | No | file mode only: absolute path to write the export to. Defaults to a file in the configured logs directory. |