Skip to main content
Glama

Create DataLens dataset

datalens_datasets_create

Create an empty dataset in a DataLens workbook and return its ID. Fill it later with datasets_update.

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.

Input Schema

TableJSON 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.
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. 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, idempotentHint=false and destructiveHint=false, so the write/non-destructive profile is covered. The description adds the useful nuance that an empty dataset is legal and that the created entry is returned with an id, but it says nothing about permission requirements or which of the mutually exclusive placement fields is required.

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 nuance. No filler or repetition.

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?

With 11 parameters, nested objects, and no output schema, the description is adequate but thin: it defers the DatasetContent shape to schema_get (as the schema itself instructs) and never clarifies the alternative placement parameters. An agent can call it, but traversal guidance is incomplete.

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 11 parameters; baseline is 3. The description adds no parameter-level detail (e.g., workbook_id vs collection_id vs dir_path selection, or what goes into options) beyond what the schema states.

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 notes the return value (its id). It implicitly separates itself from the mutating sibling by pointing to datasets_update for filling content, though it offers no explicit differentiation from other create-family tools.

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 concrete usage pattern: an empty dataset is valid, create it first and populate it later with datasets_update. That is real guidance about sequencing, though it never states when this tool should not be used or which placement parameter (workbook_id vs collection_id vs dir_path) applies.

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