Skip to main content
Glama

Create DataLens dataset

datalens_datasets_create

Creates a dataset in a workbook and returns its ID; create it empty, then populate sources, fields, and joins with update calls.

Instructions

Create a dataset in a workbook and return it with its id.

A dataset with no source and no field is valid: create it empty, then fill it with datasets_update.

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": "<dataset>"
    },
    "name": "datalens_datasets_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoThe dataset's name.
rev_idNoThe revision.
datasetYesWhat the dataset holds: sources, their joins, fields. An empty one is valid. Its schema is not listed here: read `DatasetContent` with schema_get(service="datalens", name="DatasetContent"), then the definitions it refers to.
dry_runNoSend nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none).
optionsNoWhat the editor may do with it.
previewNoWhether it is a preview.
dir_pathNoThe folder to create it in (old placement model).
saved_idNoThe saved revision.
created_viaNoHow it is created: `user` or `workbook_copy`.
workbook_idNoThe workbook to create it in.
published_idNoThe published revision.
collection_idNoThe collection to create it 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.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=true, and the description usefully discloses the return value (the created entity with its id) in the absence of an output schema. However it adds nothing about idempotency/duplicate-name behavior on retry, required workbook permissions, or failure modes for a non-idempotent write.

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

Conciseness5/5

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

Two short sentences, front-loaded with the action and return value, then the empty-dataset rule. Nothing is redundant and no sentence fails to earn its place.

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

Completeness3/5

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

It covers the essentials for a create call (what it makes, that empty content is allowed, what comes back) despite the tool's 12 parameters and nested ``options``/``dataset`` objects. Gaps remain around conflict handling and which placement fields (workbook_id vs dir_path vs collection_id) are actually required, which matters for a complex nested mutation.

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 description coverage is 100%, so the schema already documents all 12 parameters, including that ``dataset`` may be empty. The description reinforces that the core ``dataset`` argument tolerates an empty value but adds no syntax or format detail beyond the schema, so 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 ("Create a dataset in a workbook") and adds a concrete return detail ("return it with its id"). The follow-up reference to ``datasets_update`` hints at the division of labor with that sibling, though it never explicitly contrasts it with other create tools such as datalens_workbooks_create or datalens_charts_*_create.

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 a clear usage pattern: an empty dataset is valid, so create it empty and fill it via ``datasets_update``. That is real when-to-use context, but there are no exclusions (e.g. when to prefer copying an existing dataset or when validation should be run before creating) and no prerequisites named.

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