Create DataLens connection
datalens_connections_createCreates a DataLens connection and returns its ID. Supply workbook_id or dir_path to set its location; create Google Sheets connections in the DataLens interface first.
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.
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": {
"connection": "<connection>"
},
"name": "datalens_connections_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Send nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none). | |
| connection | Yes | The 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. |