Skip to main content
Glama

Create DataLens connection

datalens_connections_create

Create a DataLens connection and return its ID; provide workbook_id or dir_path to specify where it belongs.

Instructions

Create a connection and return its id.

Give workbook_id (or dir_path) for where it lies. The password or the token you give is stored by DataLens and never returned by connections_get. A connection to Google Sheets (gsheets) cannot be created here: the API answers that the type is not editable; it is made in the DataLens interface and then read like any other.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionYesThe new connection; ``type`` says which kind it is and selects its schema. Its schema is not listed here: read `ConnectionCreate` with schema_get(service="datalens", name="ConnectionCreate"), then the definitions it refers to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.122.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this is a non-read, non-destructive, non-idempotent, open-world write, so the safety baseline is covered. The description adds real value beyond that: credentials are stored server-side and never returned by ``connections_get``, and one connection type is rejected by the API. It omits, however, any warning that repeating the call yields duplicate connections despite idempotentHint=false, and gives no permission requirements.

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?

Three short sentences, front-loaded with the action and return value, then placement, then the security note and the exclusion. The final sentence is a little long, but each sentence carries distinct information with no filler.

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?

For a one-parameter create tool with an externally referenced nested schema and no output schema, the description covers the essentials: return value, placement scope, credential handling, and a known unsupported case. Missing only secondary detail such as required permissions or duplicate-creation behavior.

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

Parameters4/5

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

Schema coverage is 100% for the single top-level ``connection`` object, so baseline is 3. The description goes further by explaining that ``workbook_id``/``dir_path`` sit inside that payload and that the actual type-specific schema is external and must be fetched with ``schema_get`` for ``ConnectionCreate``, which is meaningful guidance for a nested-unknown object.

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

Purpose5/5

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

The first sentence states a specific verb and resource ('Create a connection') plus the return value ('return its id'), which no sibling duplicates. The description also implicitly separates it from read/update paths by naming ``connections_get`` as the reader. An agent can identify this as the creation primitive without opening the schema.

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?

It tells the agent where the resource must live (``workbook_id`` or ``dir_path``) and gives an explicit exclusion plus workaround: gsheets connections cannot be created here and must be made in the UI. It does not name a fallback tool or state prerequisites beyond that, so it stops short of full when/when-not/alternatives coverage.

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