> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Yandex

The Yandex connector lets your AI agent act in each user's Yandex account. Each user signs in to Yandex once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 62 tools.

**Authentication:** OAuth 2.0
**Categories:** Files & Documents, Analytics
**Tools:** 62: 30 read, 24 write, 8 destructive
**Users sign in with:** OAuth
**OAuth app:** Your own Yandex app
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=YANDEX)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Yandex connection

   In **AgentKit > Connections**, create a Yandex connection and copy its redirect URI. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Register an OAuth app

   Yandex connections use your own OAuth app. Register one with Yandex and add the redirect URI you copied.

   Then enter the app's Client ID and Client Secret on the Yandex connection.

5. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'yandex'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Yandex:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'yandex_id_get_user_info',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "yandex"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Yandex:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="yandex_id_get_user_info",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'yandex_disk_get_download_link',
  toolInput: {
    path: '<path>',
  },
  connector: 'yandex',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="yandex_disk_get_download_link",
    tool_input={
        "path": "<path>",
    },
    connection_name="yandex",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `yandex_disk_get_download_link`

Get Download Link · Read-only

Get a temporary direct download URL for a file on Yandex Disk.
Returns an object with href (the download URL), method, and templated. The URL expires after a short time.
Use when you need the file itself. Use Get Resource for metadata only. Use Get Public Download Link for files shared by someone else.
Requires cloud_api:disk.read or cloud_api:disk.app_folder.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Must be a file, not a folder. Example: /Documents/report.pdf.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.

Example input: `{"path":"<path>"}`

### `yandex_disk_get_info`

Get Disk Info · Read-only

Get information about the connected user's Yandex Disk.
Returns total and used space in bytes, trash size, and the system folder paths.
Use to check free space before uploading. Use Get Resource to look inside a folder.
Requires the cloud_api:disk.info scope.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `yandex_disk_get_operation_status`

Get Operation Status · Read-only

Check the status of a background Yandex Disk operation such as copying, moving, deleting, or uploading from a URL.
Returns an object with status: success, failed, or in-progress.
Use after a tool returned an operation link (HTTP 202); pass the ID at the end of that link.
Requires cloud_api:disk.read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `operation_id` (`string`, required): ID of the operation, which is the last segment of the operation link returned with HTTP 202. Example: 790f5cb8e4cb8e7dbd8b9a3e5a4b7a2d.

Example input: `{"operation_id":"<operation_id>"}`

### `yandex_disk_get_public_download_link`

Get Public Download Link · Read-only

Get a temporary direct download URL for a published Yandex Disk file.
Returns an object with href (the download URL), method, and templated.
Use for files shared by others. Use Get Download Link for files on the connected user's own Disk.
Works with a valid access token; no Disk scope is needed for public items.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `public_key` (`string`, required): Public key or full public link of a published Yandex Disk file or folder. Example: https://disk.yandex.com/d/AbCdEf123 or the key returned by Publish Resource.
- `path` (`string`, optional): Path of the file inside the published folder. Only needed when Public Key points to a folder. Example: /photos/cat.png.

Example input: `{"public_key":"<public_key>"}`

### `yandex_disk_get_public_resource`

Get Public Resource · Read-only

Get metadata for a published Yandex Disk file or folder using its public key or link, including the first page of a public folder's contents.
Returns the resource's name, type, size, MIME type, timestamps, and an embedded item list for folders.
Use for links shared by others. Use Get Resource for items on the connected user's own Disk.
Works with a valid access token; no Disk scope is needed for public items.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `public_key` (`string`, required): Public key or full public link of a published Yandex Disk file or folder. Example: https://disk.yandex.com/d/AbCdEf123 or the key returned by Publish Resource.
- `limit` (`integer`, optional): Maximum number of items to return. Yandex Disk returns 20 when omitted. Example: 50.
- `offset` (`integer`, optional): Number of items to skip from the start of the list, for pagination. Example: 20.
- `path` (`string`, optional): Path inside the published folder, relative to its root. Only needed when Public Key points to a folder and you want a resource within it. Example: /photos/cat.png.
- `preview_crop` (`boolean`, optional): When true, crops the preview to the size given in Preview Size. Only applies when Preview Size is set. Example: true.
- `preview_size` (`string`, optional): Size of the file preview image link to include in each item. Use S, M, L, XL, XXL, XXXL, a width such as 120, a height such as x145, or an exact size such as 120x240. Omit for no preview.
- `sort` (`string`, optional): Property to sort a public folder's items by. Allowed: name, path, created, modified, size. Prefix with a hyphen for descending order. Example: -modified. One of: `name`, `path`, `created`, `modified`, `size`, `-name`, `-path`, `-created`, `-modified`, `-size`.

Example input: `{"public_key":"<public_key>"}`

### `yandex_disk_get_resource`

Get Resource · Read-only

Get metadata for a file or folder on Yandex Disk, including the first page of a folder's contents.
Returns the resource's name, path, type (file or dir), size, MIME type, created and modified times, md5, and public URL if published; for a folder, an embedded list of its items.
Use to browse a folder or inspect one file. Use List All Files to search every folder by file type, and Get Trash Resource for items in Trash.
Requires cloud_api:disk.read or cloud_api:disk.app_folder.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Use / for the Disk root. Example: /Documents.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
- `limit` (`integer`, optional): Maximum number of items in a folder to return. Yandex Disk returns 20 when omitted. Example: 50.
- `offset` (`integer`, optional): Number of items in a folder to skip from the start of the list, for pagination. Example: 20.
- `preview_crop` (`boolean`, optional): When true, crops the preview to the size given in Preview Size. Only applies when Preview Size is set. Example: true.
- `preview_size` (`string`, optional): Size of the file preview image link to include in each item. Use S, M, L, XL, XXL, XXXL, a width such as 120, a height such as x145, or an exact size such as 120x240. Omit for no preview.
- `sort` (`string`, optional): Property to sort a folder's items by. Allowed: name, path, created, modified, size. Prefix with a hyphen for descending order. Example: -modified. One of: `name`, `path`, `created`, `modified`, `size`, `-name`, `-path`, `-created`, `-modified`, `-size`.

Example input: `{"path":"<path>"}`

### `yandex_disk_get_trash_resource`

Get Trash Resource · Read-only

List the contents of Yandex Disk Trash or read metadata for one trashed item.
Returns resource metadata with an embedded list of items; each item includes origin_path, the path before it was trashed.
Use to find an item before Restore From Trash or Delete From Trash. Use Get Resource for items not in Trash.
Requires cloud_api:disk.read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Use / for the Trash root. Example: /.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
- `limit` (`integer`, optional): Maximum number of items to return. Yandex Disk returns 20 when omitted. Example: 50.
- `offset` (`integer`, optional): Number of items to skip from the start of the list, for pagination. Example: 20.
- `preview_crop` (`boolean`, optional): When true, crops the preview to the size given in Preview Size. Only applies when Preview Size is set. Example: true.
- `preview_size` (`string`, optional): Size of the file preview image link to include in each item. Use S, M, L, XL, XXL, XXXL, a width such as 120, a height such as x145, or an exact size such as 120x240. Omit for no preview.
- `sort` (`string`, optional): Property to sort Trash items by. Allowed: name, path, created, modified, size. Prefix with a hyphen for descending order. Example: -modified. One of: `name`, `path`, `created`, `modified`, `size`, `-name`, `-path`, `-created`, `-modified`, `-size`.

Example input: `{"path":"<path>"}`

### `yandex_disk_get_upload_link`

Get Upload Link · Read-only

Get a temporary URL for uploading a file's bytes to a path on Yandex Disk.
Returns an object with href (the upload URL), method (PUT), templated, and the operation link. The file bytes must then be sent to href with an HTTP PUT outside this tool.
Use only when the caller can send the PUT itself. Use Upload From URL to have Yandex Disk fetch a file from a public URL.
Requires cloud_api:disk.write.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. The parent folder must exist. Example: /Uploads/photo.png.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
- `overwrite` (`boolean`, optional): When true, replaces an existing file at the path. Yandex Disk fails the upload when omitted (false) and the file exists. Example: false. Default: `false`.

Example input: `{"path":"<path>"}`

### `yandex_disk_list_all_files`

List All Files · Read-only

List files across the whole Yandex Disk in a flat list, optionally filtered by file type.
Returns file items with name, path, size, MIME type, media type, and timestamps, ordered by file name.
Use to find files by media type regardless of folder. Use Get Resource to browse one folder, and List Recent Uploads for newest files.
Requires cloud_api:disk.read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
- `limit` (`integer`, optional): Maximum number of files to return. Yandex Disk returns 20 when omitted. Example: 50.
- `media_type` (`string`, optional): Comma-separated list of file types to include. Allowed: audio, backup, book, compressed, data, development, diskimage, document, encoded, executable, flash, font, image, settings, spreadsheet, text, unknown, video, web. Example: audio,video.
- `offset` (`integer`, optional): Number of files to skip from the start of the list, for pagination. Example: 20.
- `preview_crop` (`boolean`, optional): When true, crops the preview to the size given in Preview Size. Only applies when Preview Size is set. Example: true.
- `preview_size` (`string`, optional): Size of the file preview image link to include in each item. Use S, M, L, XL, XXL, XXXL, a width such as 120, a height such as x145, or an exact size such as 120x240. Omit for no preview.

Example input: `{}`

### `yandex_disk_list_public_resources`

List Published Resources · Read-only

List the files and folders the connected user has published on Yandex Disk.
Returns items with name, path, public_key, public_url, type, and size.
Use to audit what is shared. Use Get Public Resource to read an item published by someone else.
Requires cloud_api:disk.read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`integer`, optional): Maximum number of items to return. Yandex Disk returns 20 when omitted. Example: 50.
- `offset` (`integer`, optional): Number of items to skip from the start of the list, for pagination. Example: 20.
- `preview_crop` (`boolean`, optional): When true, crops the preview to the size given in Preview Size. Only applies when Preview Size is set. Example: true.
- `preview_size` (`string`, optional): Size of the file preview image link to include in each item. Use S, M, L, XL, XXL, XXXL, a width such as 120, a height such as x145, or an exact size such as 120x240. Omit for no preview.
- `type` (`string`, optional): Restrict the list to files or folders. Allowed: file, dir. Omit to list both. One of: `file`, `dir`.

Example input: `{}`

### `yandex_disk_list_recent_uploads`

List Recent Uploads · Read-only

List the files most recently uploaded to Yandex Disk, newest first.
Returns file items with name, path, size, MIME type, media type, and timestamps.
Use to see what was added lately. Use List All Files for a filtered listing of everything.
Requires cloud_api:disk.read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
- `limit` (`integer`, optional): Maximum number of files to return. Yandex Disk returns 20 when omitted. Example: 50.
- `media_type` (`string`, optional): Comma-separated list of file types to include. Allowed: audio, backup, book, compressed, data, development, diskimage, document, encoded, executable, flash, font, image, settings, spreadsheet, text, unknown, video, web. Example: image.
- `preview_crop` (`boolean`, optional): When true, crops the preview to the size given in Preview Size. Only applies when Preview Size is set. Example: true.
- `preview_size` (`string`, optional): Size of the file preview image link to include in each item. Use S, M, L, XL, XXL, XXXL, a width such as 120, a height such as x145, or an exact size such as 120x240. Omit for no preview.

Example input: `{}`

### `yandex_id_get_user_info`

Get User Info · Read-only

Get the Yandex ID profile of the connected user.
Returns login, id, and client_id, plus name, email, and avatar fields when the matching scopes were granted.
Use to identify which Yandex account is connected. Use Get Disk Info for storage details.
Requires login:info; email and avatar fields need login:email and login:avatar.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `format` (`string`, optional): Response format. Allowed: json, xml, jwt. Yandex returns json when omitted. Example: json. One of: `json`, `xml`, `jwt`. Default: `json`.

Example input: `{}`

### `yandex_metrika_evaluate_log_request`

Evaluate Log Request · Read-only

Check whether a Yandex Metrica log request can be created for a period, fields, and source, without creating it.
Returns possible (true or false) and the maximum period allowed.
Use before Create Log Request.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `date1` (`string`, required): First day of the period in YYYY-MM-DD format. Example: 2025-03-01.
- `date2` (`string`, required): Last day of the period in YYYY-MM-DD format; it cannot be today. Example: 2025-03-07.
- `fields` (`string`, required): Comma-separated list of log fields to export, using ym:s: names for sessions or ym:pv: names for hits. Example: ym:s:visitID,ym:s:dateTime,ym:s:clientID.
- `source` (`string`, required): Log source. Allowed: visits (sessions), hits (events). Example: visits. One of: `visits`, `hits`.

Example input: `{"counter_id":44147844,"date1":"<date1>","date2":"<date2>","fields":"<fields>","source":"visits"}`

### `yandex_metrika_get_counter`

Get Counter · Read-only

Get the settings of one Yandex Metrica counter.
Returns id, name, site, status, permission, time zone, code snippet, and any extra sections requested with Fields.
Use after List Counters. Use List Goals, List Filters or List Segments for those collections directly.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `field` (`string`, optional): Comma-separated extra sections to include in each counter. Allowed: goals, mirrors, grants, filters, operations, counter_flags, measurement_tokens. Omit for the base counter fields only. Example: goals,filters.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_get_filter`

Get Filter · Read-only

Get one traffic filter of a Yandex Metrica counter.
Returns the filter's id, attribute, match type, value, action, and status.
Use after List Filters.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `filter_id` (`integer`, required): ID of the filter. Find it with the matching List tool. Example: 98765.

Example input: `{"counter_id":44147844,"filter_id":98765}`

### `yandex_metrika_get_goal`

Get Goal · Read-only

Get one goal of a Yandex Metrica counter.
Returns the goal's id, name, type, conditions, default price, and status.
Use after List Goals.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `goal_id` (`integer`, required): ID of the goal. Find it with the matching List tool. Example: 3214567.

Example input: `{"counter_id":44147844,"goal_id":3214567}`

### `yandex_metrika_get_log_request`

Get Log Request · Read-only

Get the status of one Yandex Metrica log request.
Returns its status (created, processed, canceled, cleaned), source, period, fields, and the list of downloadable parts.
Use after Create Log Request to see when the data is ready.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `request_id` (`integer`, required): ID of the log request. Find it with the matching List tool. Example: 12345.

Example input: `{"counter_id":44147844,"request_id":12345}`

### `yandex_metrika_get_my_grant`

Get My Grant · Read-only

Get the connected user's own access level on a Yandex Metrica counter.
Returns the permission (own, view, or edit).
Use before a write tool to check the user can change the counter. Use List Counter Grants to see everyone's access.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_get_report_by_time`

Get Report By Time · Read-only

Get Yandex Metrica statistics over time, with metric values per day, week, month, quarter, or year.
Returns time intervals and, for each dimension value, a series of metric values.
Use for trends and charts. Use Get Report Table for a single total per row.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `ids` (`string`, required): Comma-separated IDs of the Metrica counters to report on. Example: 44147844 or 44147844,12345678.
- `metrics` (`string`, required): Comma-separated metrics, up to 20, such as ym:s:visits, ym:s:users, ym:s:pageviews, ym:s:bounceRate. Example: ym:s:visits,ym:s:users.
- `accuracy` (`string`, optional): Sampling accuracy: a fraction from 0 to 1, or full for no sampling. Example: full.
- `date1` (`string`, optional): Start of the period as YYYY-MM-DD, today, yesterday, or NdaysAgo. Metrica uses 6daysAgo when omitted. Example: 30daysAgo.
- `date2` (`string`, optional): End of the period as YYYY-MM-DD, today, yesterday, or NdaysAgo. Metrica uses today when omitted. Example: yesterday.
- `dimensions` (`string`, optional): Comma-separated dimensions to group by, up to 10, such as ym:s:date, ym:s:trafficSourceName, ym:s:regionCountry. Example: ym:s:trafficSourceName.
- `filters` (`string`, optional): Segmentation filter in Metrica filter syntax. Example: ym:s:regionCountry=='225'.
- `group` (`string`, optional): Size of each time interval. Allowed: day, week, month, quarter, year. Metrica uses week when omitted. Example: day. One of: `day`, `week`, `month`, `quarter`, `year`.
- `include_undefined` (`boolean`, optional): When true, includes rows whose first dimension is undefined. Metrica excludes them when omitted. Example: false.
- `lang` (`string`, optional): Language of dimension names in the response, such as en or ru. Example: en.
- `preset` (`string`, optional): Name of a Metrica report preset to use instead of choosing metrics and dimensions yourself. Example: sources_summary.
- `timezone` (`string`, optional): Time zone for the period in ±hh:mm format. The counter's own time zone is used when omitted. Example: +03:00.
- `top_keys` (`integer`, optional): Number of top dimension values to chart, up to 30. Metrica uses 7 when omitted. Example: 10.

Example input: `{"ids":"<ids>","metrics":"<metrics>"}`

### `yandex_metrika_get_report_table`

Get Report Table · Read-only

Get a Yandex Metrica statistics table for one or more counters, grouped by dimensions over a period.
Returns query echo, data rows with dimension values and metric values, totals, and whether the data was sampled.
Use for totals and breakdowns. Use Get Report By Time for the same metrics over time intervals.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `ids` (`string`, required): Comma-separated IDs of the Metrica counters to report on. Example: 44147844 or 44147844,12345678.
- `metrics` (`string`, required): Comma-separated metrics, up to 20, such as ym:s:visits, ym:s:users, ym:s:pageviews, ym:s:bounceRate. Example: ym:s:visits,ym:s:users.
- `accuracy` (`string`, optional): Sampling accuracy: a fraction from 0 to 1, or full for no sampling. Example: full.
- `date1` (`string`, optional): Start of the period as YYYY-MM-DD, today, yesterday, or NdaysAgo. Metrica uses 6daysAgo when omitted. Example: 30daysAgo.
- `date2` (`string`, optional): End of the period as YYYY-MM-DD, today, yesterday, or NdaysAgo. Metrica uses today when omitted. Example: yesterday.
- `dimensions` (`string`, optional): Comma-separated dimensions to group by, up to 10, such as ym:s:date, ym:s:trafficSourceName, ym:s:regionCountry. Example: ym:s:trafficSourceName.
- `filters` (`string`, optional): Segmentation filter in Metrica filter syntax. Example: ym:s:regionCountry=='225'.
- `include_undefined` (`boolean`, optional): When true, includes rows whose first dimension is undefined. Metrica excludes them when omitted. Example: false.
- `lang` (`string`, optional): Language of dimension names in the response, such as en or ru. Example: en.
- `limit` (`integer`, optional): Number of rows to return, up to 100000. Metrica returns 100 when omitted. Example: 100.
- `offset` (`integer`, optional): 1-based index of the first row to return. Metrica starts at 1 when omitted. Example: 101.
- `preset` (`string`, optional): Name of a Metrica report preset to use instead of choosing metrics and dimensions yourself. Example: sources_summary.
- `sort` (`string`, optional): Comma-separated metrics or dimensions to sort by; a leading minus sign sorts descending, which is the default. Example: -ym:s:visits.
- `timezone` (`string`, optional): Time zone for the period in ±hh:mm format. The counter's own time zone is used when omitted. Example: +03:00.

Example input: `{"ids":"<ids>","metrics":"<metrics>"}`

### `yandex_metrika_get_segment`

Get Segment · Read-only

Get one API segment of a Yandex Metrica counter.
Returns the segment's id, name, expression, status, and create time.
Use after List Segments.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `segment_id` (`integer`, required): ID of the segment. Find it with the matching List tool. Example: 1234567.

Example input: `{"counter_id":44147844,"segment_id":1234567}`

### `yandex_metrika_list_annotations`

List Annotations · Read-only

List the chart notes on a Yandex Metrica counter.
Returns each note's id, date, time, title, message, and group.
Use to see events marked on report charts. Use Create Annotation to add one.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_list_counters`

List Counters · Read-only

List the Yandex Metrica counters the connected user can access.
Returns each counter's id, name, site, status, permission level, and create time.
Use to find a counter ID for any other Metrica tool. Use Get Counter for the full settings of one counter.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `favorite` (`boolean`, optional): When true, return only counters marked as favorites. Metrica returns all counters when omitted. Example: true.
- `field` (`string`, optional): Comma-separated extra sections to include in each counter. Allowed: goals, mirrors, grants, filters, operations, counter_flags, measurement_tokens. Omit for the base counter fields only. Example: goals,filters.
- `label_id` (`integer`, optional): Return only counters attached to this label. Find IDs with List Labels. Example: 1234.
- `offset` (`integer`, optional): 1-based position of the first counter to return, for pagination. Metrica starts at 1 when omitted. Example: 51.
- `per_page` (`integer`, optional): Number of counters to return. Metrica returns up to 1000 when omitted. Example: 50.
- `permission` (`string`, optional): Filter by the user's access level, one or several separated by commas. Allowed: own, view, edit. Example: own,edit.
- `reverse` (`boolean`, optional): When true, returns the sorted list in descending order. Metrica returns descending order when omitted (true). Example: true.
- `search_string` (`string`, optional): Return only counters whose ID, name, site, or mirror address contains this text; an ID must be given in full. Example: example.com.
- `sort` (`string`, optional): Sort order. Allowed: None, Default, Visits, Hits, Uniques, Name. Metrica uses Default when omitted. Example: Visits. One of: `None`, `Default`, `Visits`, `Hits`, `Uniques`, `Name`.
- `status` (`string`, optional): Filter by counter status. Allowed: Active, Deleted. Metrica returns Active counters when omitted. Example: Active. One of: `Active`, `Deleted`.
- `type` (`string`, optional): Filter by counter type. Allowed: simple (created in Metrica), partner (imported from the Yandex advertising network). Example: simple. One of: `simple`, `partner`.

Example input: `{}`

### `yandex_metrika_list_filters`

List Filters · Read-only

List the traffic filters on a Yandex Metrica counter.
Returns each filter's id, attribute, match type, value, action, and status.
Use to review what traffic is excluded or kept.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_list_goals`

List Goals · Read-only

List the goals configured on a Yandex Metrica counter.
Returns each goal's id, name, type, conditions, default price, and status.
Use to find a goal ID for Get Goal, Update Goal, or Delete Goal, or goal numbers for report metrics.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `useDeleted` (`boolean`, optional): When true, includes deleted goals. Metrica omits them when omitted (false). Example: false. Default: `false`.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_list_grants`

List Counter Grants · Read-only

List who has access to a Yandex Metrica counter and at what permission level.
Returns each grant's user_login, perm, created_at, and comment.
Use to audit access. Use Get My Grant for the connected user's own access level.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_list_labels`

List Labels · Read-only

List the counter labels owned by the connected Yandex Metrica user.
Returns each label's id and name.
Use to find a label ID for filtering List Counters.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `yandex_metrika_list_log_requests`

List Log Requests · Read-only

List the raw-data log requests created for a Yandex Metrica counter.
Returns each request's id, status, source, period, fields, and size.
Use to find a request ID. Use Get Log Request for one request's current status.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_list_operations`

List Counter Operations · Read-only

List the data-processing operations configured on a Yandex Metrica counter, such as URL rewrite rules.
Returns each operation's id, action, attribute, value, and status.
Use to review how Metrica transforms incoming data.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_list_segments`

List Segments · Read-only

List the API segments of a Yandex Metrica counter.
Returns each segment's id, name, expression, status, and create time.
Use to find a segment ID or an expression to reuse as a report filter.
Requires metrika:read.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"counter_id":44147844}`

### `yandex_disk_copy_resource`

Copy Resource · Write

Copy a file or folder to another location on Yandex Disk.
Returns a link to the new item (201), or an operation link (202) when a large folder is processed in the background.
Use Get Operation Status to follow a 202. Use Create Folder first if the destination folder does not exist.
Requires cloud_api:disk.write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `from` (`string`, required): Path of the file or folder to copy, starting at the Disk root. Example: /Documents/report.pdf.
- `path` (`string`, required): Destination path including the new name, starting at the Disk root. Example: /Archive/report.pdf.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
- `overwrite` (`boolean`, optional): When true, replaces an existing item at the destination. Yandex Disk fails the request when omitted (false) and the destination exists. Example: false. Default: `false`.

Example input: `{"from":"<from>","path":"<path>"}`

### `yandex_disk_create_folder`

Create Folder · Write

Create a folder on Yandex Disk.
Returns a link object for the new folder (href, method, templated). Fails if the folder exists or the parent folder is missing.
Use to prepare a location before Copy Resource or Move Resource. Create one level at a time.
Requires cloud_api:disk.write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. The parent folder must already exist. Example: /Reports/2025.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.

Example input: `{"path":"<path>"}`

### `yandex_disk_move_resource`

Move Resource · Write

Move a file or folder to another location on Yandex Disk.
Returns a link to the moved item (201), or an operation link (202) when a large folder is processed in the background.
Use Get Operation Status to follow a 202. Use Create Folder first if the destination folder does not exist.
Requires cloud_api:disk.write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `from` (`string`, required): Path of the file or folder to move, starting at the Disk root. Example: /Documents/report.pdf.
- `path` (`string`, required): Destination path including the new name, starting at the Disk root. Example: /Archive/report.pdf.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
- `overwrite` (`boolean`, optional): When true, replaces an existing item at the destination. Yandex Disk fails the request when omitted (false) and the destination exists. Example: false. Default: `false`.

Example input: `{"from":"<from>","path":"<path>"}`

### `yandex_disk_publish_resource`

Publish Resource · Write

Publish a file or folder on Yandex Disk so anyone with the link can open it.
Returns a link object to the resource; call Get Resource afterward to read the resulting public_url and public_key.
Use to share an item. Use Unpublish Resource to stop sharing.
Requires cloud_api:disk.write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Example: /Documents/report.pdf.

Example input: `{"path":"<path>"}`

### `yandex_disk_restore_from_trash`

Restore From Trash · Write

Restore a file or folder from Yandex Disk Trash to its original location.
Returns 201 with a link to the restored item, or 202 with an operation link for large folders.
Use Get Trash Resource first to find the item path. Use Get Operation Status to follow a 202.
Requires cloud_api:disk.write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Relative to the Trash root. Example: /report.pdf.
- `name` (`string`, optional): New name for the restored item. Yandex Disk keeps the original name when omitted. Example: report-restored.pdf.
- `overwrite` (`boolean`, optional): When true, replaces an existing item at the restore location. Yandex Disk fails the request when omitted (false) and a same-named item exists. Example: false. Default: `false`.

Example input: `{"path":"<path>"}`

### `yandex_disk_save_public_resource`

Save Public Resource to Disk · Write

Copy a published file or folder into the connected user's Yandex Disk Downloads folder.
Returns 201 with a link to the saved item, or 202 with an operation link when saving a large folder.
Use Get Operation Status to follow a 202. Use Get Public Download Link when only the file bytes are needed.
Requires cloud_api:disk.write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `public_key` (`string`, required): Public key or full public link of a published Yandex Disk file or folder. Example: https://disk.yandex.com/d/AbCdEf123 or the key returned by Publish Resource.
- `name` (`string`, optional): Name to save the item under in the Downloads folder. Yandex Disk keeps the original name when omitted. Example: cat-copy.png.
- `path` (`string`, optional): Path inside the published folder, relative to its root. Only needed when Public Key points to a folder and you want a resource within it. Example: /photos/cat.png.

Example input: `{"public_key":"<public_key>"}`

### `yandex_disk_unpublish_resource`

Unpublish Resource · Write

Stop sharing a published file or folder on Yandex Disk; its public link stops working.
Returns a link object to the resource.
Use to revoke a link created with Publish Resource.
Requires cloud_api:disk.write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Example: /Documents/report.pdf.

Example input: `{"path":"<path>"}`

### `yandex_disk_update_resource_properties`

Update Resource Properties · Write

Add or change custom key-value properties on a file or folder on Yandex Disk.
Returns the updated resource metadata including custom_properties.
Use to tag items with your own metadata; new keys are added and existing keys are overwritten. Set a key to null to remove it.
Requires cloud_api:disk.write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `custom_properties` (`object`, required): Object of string keys to string values to add or update; set a value to null to delete that key. Values cannot be arrays or nested objects, and the total size is limited to 1024 characters. Example: {"project": "alpha", "status": "draft"}.
- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Example: /Documents/report.pdf.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.

Example input: `{"custom_properties":{"project":"alpha","status":"draft"},"path":"<path>"}`

### `yandex_disk_upload_from_url`

Upload From URL · Write

Ask Yandex Disk to download a file from a public URL and save it at a path on the user's Disk.
Returns 202 with an operation link; the download runs in the background.
Use Get Operation Status to see success or failure. Use Get Upload Link when the bytes are held by the caller instead.
Requires cloud_api:disk.write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Include the file name; the parent folder must exist. Example: /Uploads/photo.png.
- `url` (`string`, required): Public http or https URL of the file for Yandex Disk to download. Example: https://example.com/photo.png.
- `disable_redirects` (`boolean`, optional): When true, Yandex Disk does not follow redirects from the source URL and downloads nothing if one occurs. Yandex Disk follows redirects when omitted (false). Example: false. Default: `false`.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.

Example input: `{"path":"<path>","url":"<url>"}`

### `yandex_metrika_cancel_log_request`

Cancel Log Request · Write

Cancel a pending Yandex Metrica log request.
Returns the log request with status canceled.
Use Get Log Request to confirm the request is still pending.
Requires metrika:read.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `request_id` (`integer`, required): ID of the log request. Find it with the matching List tool. Example: 12345.

Example input: `{"counter_id":44147844,"request_id":12345}`

### `yandex_metrika_create_annotation`

Create Annotation · Write

Add a note to the report charts of a Yandex Metrica counter, such as a release or campaign start.
Returns the new note with its id.
Use to mark events that explain changes in traffic. Use Update Annotation to edit one.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `date` (`string`, required): Date of the note in YYYY-MM-DD format. Example: 2025-03-14.
- `group` (`string`, required): Group the note belongs to. Allowed: A, B, C, D, E. Example: A. One of: `A`, `B`, `C`, `D`, `E`.
- `title` (`string`, required): Short title of the note. Example: Redesign launched.
- `message` (`string`, optional): Longer text of the note. Example: New homepage went live for all users.
- `time` (`string`, optional): Time of the note in HH:MM:SS format. Example: 12:00:00.

Example input: `{"counter_id":44147844,"date":"<date>","group":"A","title":"<title>"}`

### `yandex_metrika_create_counter`

Create Counter · Write

Create a Yandex Metrica counter for a website.
Returns the new counter with its id, name, site, status, and tracking code.
Use to start tracking a new site. Use Update Counter to change an existing counter.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Display name of the counter. Example: Marketing site.
- `site` (`string`, required): Domain of the site to track, without a scheme. Example: example.com.
- `favorite` (`boolean`, optional): When true, marks the counter as a favorite. Example: false.
- `time_zone_name` (`string`, optional): IANA time zone used for the counter's reports. Metrica uses its own default when omitted. Example: Europe/Berlin.

Example input: `{"name":"<name>","site":"<site>"}`

### `yandex_metrika_create_filter`

Create Filter · Write

Create a traffic filter on a Yandex Metrica counter to exclude or keep matching traffic.
Returns the new filter with its id.
Use to remove internal or bot traffic from reports. Use Update Filter to change an existing one.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `action` (`string`, required): What the filter does with matching traffic. Allowed: exclude (drop it), include (keep only it). Example: exclude. One of: `exclude`, `include`.
- `attr` (`string`, required): Data the filter applies to. Allowed: title (page title), client_ip (visitor IP address), url (page URL), referer (referrer), uniq_id (the Don't count my sessions filter). Example: url. One of: `title`, `client_ip`, `url`, `referer`, `uniq_id`.
- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `type` (`string`, required): How the value is compared. Allowed: equal, start, contain, interval (only with client_ip), me (only with uniq_id), only_mirrors (only with url and action include), regexp. Example: contain. One of: `equal`, `start`, `contain`, `interval`, `me`, `only_mirrors`, `regexp`.
- `end_ip` (`string`, optional): Last IP address of the range; used only with attr client_ip and type interval. Example: 203.0.113.254.
- `start_ip` (`string`, optional): First IP address of the range; used only with attr client_ip and type interval. Example: 203.0.113.1.
- `status` (`string`, optional): Whether the filter is applied. Allowed: active, disabled. Example: active. One of: `active`, `disabled`.
- `value` (`string`, optional): Text or pattern to match. Not needed for types interval, me, and only_mirrors. Example: /internal/.
- `with_subdomains` (`boolean`, optional): When true, the filter also applies to subdomains; used with url filters. Example: true.

Example input: `{"action":"exclude","attr":"title","counter_id":44147844,"type":"equal"}`

### `yandex_metrika_create_goal`

Create Goal · Write

Create a goal on a Yandex Metrica counter, such as a page view, JavaScript event, or page depth goal.
Returns the new goal with its id.
Use to track conversions. Other goal types, such as multi-step or call goals, are not supported here. Use Update Goal to change an existing goal.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `name` (`string`, required): Name of the goal. Example: Checkout complete.
- `type` (`string`, required): Goal type. Allowed: url (page view), action (JavaScript event), number (page depth). Example: url. One of: `url`, `action`, `number`.
- `conditions` (`array`, optional): Conditions that make the goal fire, as a list of objects with a type (contain, exact, start, regexp, or action) and a url value. A page-view goal matches URLs; a JavaScript event goal uses type action with the event identifier. Example: [{"type": "contain", "url": "/thank-you"}].
- `default_price` (`number`, optional): Default monetary value of one goal completion. Example: 49.9.
- `depth` (`integer`, optional): Number of pages a visitor must view; used only with type number. Example: 5.
- `is_favorite` (`boolean`, optional): When true, marks the goal as a favorite. Example: false.

Example input: `{"counter_id":44147844,"name":"<name>","type":"url"}`

### `yandex_metrika_create_label`

Create Label · Write

Create a label for grouping Yandex Metrica counters.
Returns the new label with its id.
Use to organize counters. Use Update Label to rename one.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Name of the label. Example: Client sites.

Example input: `{"name":"<name>"}`

### `yandex_metrika_create_log_request`

Create Log Request · Write

Start preparing a raw-data export (sessions or events) for a Yandex Metrica counter.
Returns the log request with its id and status; preparation runs in the background.
Use Evaluate Log Request first, then Get Log Request until processed. Downloading the parts is not supported by this connector.
Requires metrika:read.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `date1` (`string`, required): First day of the period in YYYY-MM-DD format. Example: 2025-03-01.
- `date2` (`string`, required): Last day of the period in YYYY-MM-DD format; it cannot be today. Example: 2025-03-07.
- `fields` (`string`, required): Comma-separated list of log fields to export, using ym:s: names for sessions or ym:pv: names for hits. Example: ym:s:visitID,ym:s:dateTime,ym:s:clientID.
- `source` (`string`, required): Log source. Allowed: visits (sessions), hits (events). Example: visits. One of: `visits`, `hits`.
- `attribution` (`string`, optional): Attribution model for the export. Allowed: FIRST, LAST, LASTSIGN, LAST_YANDEX_DIRECT_CLICK, CROSS_DEVICE_LAST_SIGNIFICANT, CROSS_DEVICE_FIRST, CROSS_DEVICE_LAST_YANDEX_DIRECT_CLICK, CROSS_DEVICE_LAST, AUTOMATIC. Example: LASTSIGN. One of: `FIRST`, `LAST`, `LASTSIGN`, `LAST_YANDEX_DIRECT_CLICK`, `CROSS_DEVICE_LAST_SIGNIFICANT`, `CROSS_DEVICE_FIRST`, `CROSS_DEVICE_LAST_YANDEX_DIRECT_CLICK`, `CROSS_DEVICE_LAST`, `AUTOMATIC`.

Example input: `{"counter_id":44147844,"date1":"<date1>","date2":"<date2>","fields":"<fields>","source":"visits"}`

### `yandex_metrika_create_segment`

Create Segment · Write

Create an API segment on a Yandex Metrica counter from a filter expression.
Returns the new segment with its id.
Use to save a visitor or session slice for reuse. Use Update Segment to change one.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `expression` (`string`, required): Segment condition written in the Metrica filter syntax, using ym:s: dimensions for sessions. Example: ym:s:deviceCategory=='2' AND ym:s:regionCountry=='225'.
- `name` (`string`, required): Name of the segment. Example: Mobile visitors from Germany.

Example input: `{"counter_id":44147844,"expression":"<expression>","name":"<name>"}`

### `yandex_metrika_restore_counter`

Restore Counter · Write

Restore a deleted Yandex Metrica counter.
Returns a confirmation object.
Use after Delete Counter. List Counters with status Deleted shows candidates.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_update_annotation`

Update Annotation · Write

Change a chart note on a Yandex Metrica counter.
Returns the updated note.
Use List Annotations to find the note ID. Date, title, and group must be passed again.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `annotation_id` (`integer`, required): ID of the chart annotation. Find it with the matching List tool. Example: 5551212.
- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `date` (`string`, required): Date of the note in YYYY-MM-DD format. Example: 2025-03-14.
- `group` (`string`, required): Group the note belongs to. Allowed: A, B, C, D, E. Example: A. One of: `A`, `B`, `C`, `D`, `E`.
- `title` (`string`, required): Short title of the note. Example: Redesign launched.
- `message` (`string`, optional): Longer text of the note. Example: New homepage went live for all users.
- `time` (`string`, optional): Time of the note in HH:MM:SS format. Example: 12:00:00.

Example input: `{"annotation_id":5551212,"counter_id":44147844,"date":"<date>","group":"A","title":"<title>"}`

### `yandex_metrika_update_counter`

Update Counter · Write

Change the name, site, time zone, or favorite flag of a Yandex Metrica counter.
Returns the updated counter.
Use List Counters first to get the counter ID. Fields left empty keep their current value.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `favorite` (`boolean`, optional): Whether the counter is marked as a favorite. Example: true.
- `name` (`string`, optional): New display name of the counter. Example: Marketing site.
- `site` (`string`, optional): New domain of the tracked site, without a scheme. Example: example.com.
- `time_zone_name` (`string`, optional): New IANA time zone for reports. Example: Europe/Berlin.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_update_filter`

Update Filter · Write

Change a traffic filter on a Yandex Metrica counter.
Returns the updated filter.
Use List Filters to find the filter ID. Pass attribute, match type, and action again along with the changes.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `action` (`string`, required): What the filter does with matching traffic. Allowed: exclude (drop it), include (keep only it). Example: exclude. One of: `exclude`, `include`.
- `attr` (`string`, required): Data the filter applies to. Allowed: title (page title), client_ip (visitor IP address), url (page URL), referer (referrer), uniq_id (the Don't count my sessions filter). Example: url. One of: `title`, `client_ip`, `url`, `referer`, `uniq_id`.
- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `filter_id` (`integer`, required): ID of the filter. Find it with the matching List tool. Example: 98765.
- `type` (`string`, required): How the value is compared. Allowed: equal, start, contain, interval (only with client_ip), me (only with uniq_id), only_mirrors (only with url and action include), regexp. Example: contain. One of: `equal`, `start`, `contain`, `interval`, `me`, `only_mirrors`, `regexp`.
- `end_ip` (`string`, optional): Last IP address of the range; used only with attr client_ip and type interval. Example: 203.0.113.254.
- `start_ip` (`string`, optional): First IP address of the range; used only with attr client_ip and type interval. Example: 203.0.113.1.
- `status` (`string`, optional): Whether the filter is applied. Allowed: active, disabled. Example: active. One of: `active`, `disabled`.
- `value` (`string`, optional): Text or pattern to match. Not needed for types interval, me, and only_mirrors. Example: /internal/.
- `with_subdomains` (`boolean`, optional): When true, the filter also applies to subdomains; used with url filters. Example: true.

Example input: `{"action":"exclude","attr":"title","counter_id":44147844,"filter_id":98765,"type":"equal"}`

### `yandex_metrika_update_goal`

Update Goal · Write

Change a goal on a Yandex Metrica counter.
Returns the updated goal.
Use List Goals to find the goal and its type; the type must be passed again. Fields left empty keep their current value.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `goal_id` (`integer`, required): ID of the goal. Find it with the matching List tool. Example: 3214567.
- `type` (`string`, required): Goal type. Allowed: url (page view), action (JavaScript event), number (page depth). Example: url. One of: `url`, `action`, `number`.
- `conditions` (`array`, optional): Conditions that make the goal fire, as a list of objects with a type (contain, exact, start, regexp, or action) and a url value. A page-view goal matches URLs; a JavaScript event goal uses type action with the event identifier. Example: [{"type": "contain", "url": "/thank-you"}].
- `default_price` (`number`, optional): Default monetary value of one goal completion. Example: 49.9.
- `depth` (`integer`, optional): Number of pages a visitor must view; used only with type number. Example: 5.
- `is_favorite` (`boolean`, optional): When true, marks the goal as a favorite. Example: false.
- `name` (`string`, optional): Name of the goal. Example: Checkout complete.

Example input: `{"counter_id":44147844,"goal_id":3214567,"type":"url"}`

### `yandex_metrika_update_label`

Update Label · Write

Rename a Yandex Metrica counter label.
Returns the updated label.
Use List Labels to find the label ID.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `label_id` (`integer`, required): ID of the label. Find it with the matching List tool. Example: 1234.
- `name` (`string`, required): Name of the label. Example: Client sites.

Example input: `{"label_id":1234,"name":"<name>"}`

### `yandex_metrika_update_segment`

Update Segment · Write

Change the name or expression of an API segment on a Yandex Metrica counter.
Returns the updated segment.
Use List Segments to find the segment ID. Both name and expression must be passed.
Requires metrika:write.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `expression` (`string`, required): Segment condition written in the Metrica filter syntax, using ym:s: dimensions for sessions. Example: ym:s:deviceCategory=='2' AND ym:s:regionCountry=='225'.
- `name` (`string`, required): Name of the segment. Example: Mobile visitors from Germany.
- `segment_id` (`integer`, required): ID of the segment. Find it with the matching List tool. Example: 1234567.

Example input: `{"counter_id":44147844,"expression":"<expression>","name":"<name>","segment_id":1234567}`

### `yandex_disk_delete_from_trash`

Delete From Trash · Destructive

Permanently delete one file or folder from Yandex Disk Trash.
Returns 204 with no body, or 202 with an operation link for large folders.
Use Get Trash Resource first to find the item path. This cannot be undone. Use Restore From Trash to recover an item instead.
Requires cloud_api:disk.write.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Relative to the Trash root. Example: /report.pdf.

Example input: `{"path":"<path>"}`

### `yandex_disk_delete_resource`

Delete Resource · Destructive

Delete a file or folder from Yandex Disk, moving it to Trash unless permanent deletion is requested.
Returns 204 with no body for small items, or 202 with an operation link when deleting a large folder in the background.
Use Get Operation Status to follow a 202. Use Delete From Trash to remove an item already in Trash.
Requires cloud_api:disk.write.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `path` (`string`, required): Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. A folder is deleted with all its contents. Example: /Old/report.pdf.
- `fields` (`string`, optional): Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
- `permanently` (`boolean`, optional): When true, deletes the item permanently instead of moving it to Trash. Yandex Disk keeps it in Trash when omitted (false). Example: false. Default: `false`.

Example input: `{"path":"<path>"}`

### `yandex_metrika_delete_annotation`

Delete Annotation · Destructive

Delete a chart note from a Yandex Metrica counter.
Returns a confirmation object.
Use List Annotations to find the note ID.
Requires metrika:write.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `annotation_id` (`integer`, required): ID of the chart annotation. Find it with the matching List tool. Example: 5551212.
- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"annotation_id":5551212,"counter_id":44147844}`

### `yandex_metrika_delete_counter`

Delete Counter · Destructive

Delete a Yandex Metrica counter; it is kept for a short period and can be restored.
Returns a confirmation object.
Use Restore Counter to undo. Use Update Counter to rename instead.
Requires metrika:write.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.

Example input: `{"counter_id":44147844}`

### `yandex_metrika_delete_filter`

Delete Filter · Destructive

Delete a traffic filter from a Yandex Metrica counter.
Returns a confirmation object.
Use Update Filter with status disabled to pause a filter instead.
Requires metrika:write.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `filter_id` (`integer`, required): ID of the filter. Find it with the matching List tool. Example: 98765.

Example input: `{"counter_id":44147844,"filter_id":98765}`

### `yandex_metrika_delete_goal`

Delete Goal · Destructive

Delete a goal from a Yandex Metrica counter.
Returns a confirmation object.
Use List Goals to find the goal ID. Historic statistics for the goal are kept by Metrica but no new conversions are counted.
Requires metrika:write.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `goal_id` (`integer`, required): ID of the goal. Find it with the matching List tool. Example: 3214567.

Example input: `{"counter_id":44147844,"goal_id":3214567}`

### `yandex_metrika_delete_label`

Delete Label · Destructive

Delete a Yandex Metrica counter label; counters keep working but lose the label.
Returns a confirmation object.
Use List Labels to find the label ID.
Requires metrika:write.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `label_id` (`integer`, required): ID of the label. Find it with the matching List tool. Example: 1234.

Example input: `{"label_id":1234}`

### `yandex_metrika_delete_segment`

Delete Segment · Destructive

Delete an API segment from a Yandex Metrica counter.
Returns a confirmation object.
Use List Segments to find the segment ID.
Requires metrika:write.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `counter_id` (`integer`, required): ID of the Metrica counter (called a tag in the Metrica interface). Find it with List Counters. Example: 44147844.
- `segment_id` (`integer`, required): ID of the segment. Find it with the matching List tool. Example: 1234567.

Example input: `{"counter_id":44147844,"segment_id":1234567}`

## Related

Other Files & Documents connectors ([all 41](/agentkit/connectors/?category=files-documents)):

- [Google Drive](/agentkit/connectors/googledrive/): Scalekit connector, OAuth, 47 tools
- [Google Forms](/agentkit/connectors/googleforms/): Scalekit connector, OAuth, 10 tools
- [Microsoft 365](/agentkit/connectors/microsoft365/): Scalekit connector, OAuth, 317 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
