Skip to main content
Glama

Update DataLens dataset

datalens_datasets_update
Idempotent

Save a DataLens dataset by replacing its entire content with provided data. Validate changes first and re-read after saving to avoid stale revisions.

Instructions

Save a dataset as given: read it, change what it holds, send it back whole.

data.dataset replaces the content. Check a change first with datasets_validate. Read the dataset again after every save: content of an older revision is refused. The reply holds the content and the revisions; its id is null (measured).

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": {
      "dataset_id": "<dataset_id>",
      "data": "<data>"
    },
    "name": "datalens_datasets_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesThe content to save (`dataset`) and how (`mode`: `save` or `publish`). Its schema is not listed here: read `DatasetUpdate` with schema_get(service="datalens", name="DatasetUpdate"), then the definitions it refers to.
dry_runNoSend nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none).
dataset_idYesDataset id.
workbook_idNoThe workbook the dataset lies in.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.142.2
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "default": false,
      +  "description": "Send nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none).",
      +  "type": "boolean"
      +}
  2. Addedv0.122.1

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare non-read-only, idempotent, non-destructive behavior, but the description adds meaningful context they do not: full-replacement semantics, an optimistic-concurrency rule (stale revision content is refused), and a note that the reply carries content and revisions with `id` set to null. It does not discuss permissions or quota, but the added behavioral detail is substantial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences that front-load the core operation before workflow caveats, with no filler. The parenthetical '(measured)' is a minor idiosyncrasy but does not cost readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description usefully summarizes the reply (content plus revisions, null `id`) and explains the read-validate-save-reread loop required by revision checks. Combined with a fully documented nested `data` parameter, an agent has enough to invoke it correctly; only permission and failure-mode details are absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already explains `data`, `dry_run`, `dataset_id`, and `workbook_id`, including pointers to DatasetUpdate. The description reinforces that `data.dataset` replaces the content but adds no syntax, format, or constraints beyond what the schema states, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource plus the operating model: 'Save a dataset as given: read it, change what it holds, send it back whole', and clarifies that `data.dataset` replaces content wholesale rather than patching. It is clearly an update/replace operation on a single dataset, though it does not explicitly distinguish itself from datalens_datasets_create or datalens_datasets_get beyond the read-modify-write framing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete workflow guidance: validate a change first with `datasets_validate`, and re-read the dataset after every save because content from an older revision is refused. This is actionable context for sequencing calls. It lacks explicit exclusion conditions (e.g., when to use create instead), so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools